Publish Video or Image Program

555

# Publish Video or Image Program

Path:

/api/program/program_name.vsn

Method: POST

Content-type: multipart/form-data

API Description: The resource name in the .vsn file must match the material name. Both the .vsn file and all material files should be added to Body.form-data, as shown in the example below. (api/program/program_name.vsn?autoplay=0 indicates that the program will not play immediately after being published.)

Request
Refer to Definition of Program File Format for relevant fields.

Example
Curl Example:
..\bin\curl.exe --verbose -X POST -F "f1=@video_and_pic.vsn" -F "f2=@assets/12638.jpg" -F "f3=@assets/1.mp4" "http://admin:console@192.168.42.129/api/program/video_and_pic.vsn"

Postman Example:
avatar
video_and_pic.vsn

{
	"Programs": {
		"Program": {
			"Pages": [{
				"Regions": [{
						"Layer": 1,
						"Rect": {
							"X": "0",
							"Y": "0",
							"Width": "64",
							"Height": "64"
						},
						"Items": [{
							"Type": "2",
							"Volume": "1.000000",
							"Alpha": "1.000000",
							"FileSource": {
								"IsRelative": "1",
								"FilePath": ".\\video_and_pic.files\\12638.jpg"
							},
							"ReserveAS": "0"
						}]
					},
					{
						"Layer": 2,
						"Rect": {
							"X": "0",
							"Y": "0",
							"Width": "256",
							"Height": "256"
						},
						"Items": [{
							"Type": "3",
							"Volume": "1.000000",
							"FileSource": {
								"IsRelative": "1",
								"FilePath": ".\\video_and_pic.files\\1.mp4"
							},
							"ReserveAS": "0"
						}]
					}
				]
			}]
		}
	}
}