This topic describes how to call the API operations available for the short video console. This topic also describes the response parameters.
Response parameters
JSON-formatted data is returned for all requests. This topic describes only the parameters contained in the data structure data.
Parameter | Type | Description |
---|---|---|
requestId | string | The ID of the request. |
code | string | The HTTP status code of the request. |
message | string | The message returned for the request. The message often indicates the error cause. |
data | object | The business data returned for the request. The value varies depending on different business objects. |
API operations for the short video console
getVideos: queries videos.
GET request URL: /console/vod/getVideos
Request parameters
Response parametersParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. pageIndex int No The number of the page to return. Pages start from page 1. pageSize int No The number of entries to return on each page. videoId string No The ID of the video. userId string No The ID of the user. title string No The title of the video. startTime string No The beginning of the time range to query. endTime string No The end of the time range to query. userName string No The username of the user. censorStatus string No The status of the review job.
Sample success responsesParameter Type Description total string The total number of entries returned. videoList List<Video> The information about the videos. { "result": "true", "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f", "message": "", "code": "200", "data": { "total": 7, "videoList": [ { "id": "25", "videoId": "23rfewc23", "title": "test video", "description": "test33", "duration": 12, "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png", "creationTime": "2019-01-09 22:11:29.0", "status": "", "firstFrameUrl": "", "size": 56, "cateId": 12, "cateName": "12", "tags": "Test", "shareUrl": "", "user": { "userId": "2434793223202", "userName": "Anne", "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70" }, "transcodeStatus": "", "snapshotStatus": "", "censorStatus": "onCensor", "narrowTranscodeStatus": "", "SnapshotList": { "http://sample/covers/990f3820db2948b5b4a13d65d9a449f6-2.jpg" , "http://sample/covers/sprite/990f3820db2948b5b4a13d65d9a449f6-1.jpg" }, "fileUrlList": { "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4" , "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4" } } ] } }
submitTranscode: creates a non-Narrowband HD™ transcoding job.
GET request URL: /console/vod/submitTranscode
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. mediaId String Yes The ID of the video. { "result": "true", "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f", "message": "Initiate a non-Narrowband HD™ transcoding job success.", "code": "200", "data": null }
createAudit: manually reviews a video.
GET request URL: /console/vod/createAudit
Response parameters
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. mediaId String Yes The ID of the video. status String Yes The review result of the video. Valid values: - Blocked
- Normal
reason String No The reason for blocking the video. You must set this parameter if you set the status parameter to Blocked. The reason can be up to 128 bytes in length. comment String No The description of the manual review job. { "result": "true", "requestId": "c312edd-1dc3-132r313rfef-qfevw42ghrnk", "message": "review is complete", "code": "200", "data": null }
submitTabTranscode: creates a Narrowband HD™ transcoding job.
GET request URL: /console/vod/submitTabTranscode
Request parameters
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. mediaId String Yes The ID of the video. { "result": "true", "requestId": "dsgb455-e85f-443f9-a50a-12323rfg34t34g", "message": "Initiate a Narrowband HD™ transcoding job success.", "code": "200", "data": null }
- getVideoById: queries the details of a video based on the ID of the video.
GET request URL: /console/vod/getVideoById
Request parameters
Response parametersParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. videoId string Yes The ID of the video.
Sample success responsesParameter Type Description title string The title of the video. videoId string The ID of the video. description string The description of the video. duration string The duration of the video. Unit: seconds. coverUrl string The URL of the video thumbnail. status string The status of the video. firstFrameUrl string The URL of the first frame of the video. size string The size of the source video file. Unit: byte. tags string The tags of the video. Multiple tags are separated by commas (,). cateId string The category ID of the video. cateName string The category name of the video. creationTime string The time when the video was created. transcodeStatus string The status of the transcoding job. snapshotStatus string The status of the snapshot taking job. censorStatus string The status of the review job. narrowTranscodeStatus string The status of the Narrowband HD™ transcoding job. SnapshotList list The URLs of the snapshots of the video. fileUrilList list The URLs of the media segment files of the video. user User The information about the user. { "result": "true", "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996", "message": "", "code": "200", "data": { "id": "25", "videoId": "23rfewc23", "title": "test video", "description": "test33", "duration": 12, "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png", "creationTime": "2019-01-09 22:11:29.0", "status": "", "firstFrameUrl": "", "size": 56, "cateId": 12, "cateName": "12", "tags": "Test", "shareUrl": "", "user": { "userId": "2434793223202", "userName": "Anne", "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70" }, "transcodeStatus": "", "snapshotStatus": "", "censorStatus": "onCensor", "narrowTranscodeStatus": "", "SnapshotList": { "http://sample/covers/990f3820db2948b5b4a13d65d9a449f6-2.jpg" , "http://sample/covers/sprite/990f3820db2948b5b4a13d65d9a449f6-1.jpg" }, "fileUrilList": { "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4" , "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4" } } }
- getRecommendVideoList: queries the recommended videos.
GET request URL: /console/vod/getRecommendVideos
Response parametersParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. pageIndex int No The number of the page to return. Pages start from page 1. pageSize int No The number of entries to return on each page. videoId string No The ID of the video. userId string No The ID of the user. title string No The title of the video. startTime string No The beginning of the time range to query. endTime string No The end of the time range to query. userName string No The username of the user. censorStatus string No The status of the review job.
Sample success responsesParameter Type Description total string The total number of entries returned. videoList List<Video> The information about the videos. { "result": "true", "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f", "message": "", "code": "200", "data": { "total": 7, "videoList": [ { "id": "25", "videoId": "23rfewc23", "title": "test video", "description": "test33", "duration": 12, "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png", "creationTime": "2019-01-09 22:11:29.0", "status": "", "firstFrameUrl": "", "size": 56, "cateId": 12, "cateName": "12", "tags": "Test", "shareUrl": "", "user": { "userId": "2434793223202", "userName": "Anne", "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70" }, "transcodeStatus": "", "snapshotStatus": "", "censorStatus": "onCensor", "narrowTranscodeStatus": "" } ] } }
recommendVideo: adds a video to the recommendation list.
POST request URL: /console/vod/recommendVideo
Request parameters
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. title string No The title of the video. videoId string No The ID of the video. userId string No The ID of the user. description string No The description of the video. duration String No The duration of the video. Unit: seconds. coverUrl string No The URL of the video thumbnail. size String No The size of the source video file. Unit: byte. tags string No The tags of the video. Separate multiple tags with commas (,). cateId String No The category ID of the video. cateName string No The category name of the video. firstFrameUrl string No The URL of the first frame of the video. transcodeStatus String No The status of the non-Narrowband HD™ transcoding job. snapshotStatus string No The status of the snapshot taking job. censorStatus String No The status of the review job. isNarrow String No Specifies whether to perform Narrowband HD™ transcoding on the video. isCache String No Specifies whether to prefetch the video. { "result": "true", "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996", "message": "Add a video to the recommendation list success.", "code": "200", "data":null }
pushObjectCache: prefetches a video.
POST request URL: /console/vod/pushObjectCache
Request parameters
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. objectPath string No The URL of the object that you want to prefetch for the video. Example: example.aliyundoc.com/image/1.png. Separate multiple URLs with line breaks (\n or \r\n). { "result": "true", "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996", "message": "Prefetches a video success.", "code": "200", "data":null }
getRecommendVideoById: queries the details of a recommended video based on the ID of video.
GET request URL: /console/vod/getRecommendVideoById
Request parameters
Response parametersParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. videoId string Yes The ID of the video.
Sample success responsesParameter Type Description title string The title of the video. videoId string The ID of the video. description string The description of the video. duration string The duration of the video. Unit: seconds. coverUrl string The URL of the video thumbnail. status string The status of the video. firstFrameUrl string The URL of the first frame of the video. size string The size of the source video file. Unit: byte. tags string The tags of the video. Multiple tags are separated by commas (,). cateId string The category ID of the video. cateName string The category name of the video. creationTime string The time when the video was created. transcodeStatus string The status of the transcoding job. snapshotStatus string The status of the snapshot taking job. censorStatus string The status of the review job. narrowTranscodeStatus string The status of the Narrowband HD™ transcoding job. SnapshotList list The URLs of the snapshots of the video. fileUrilList list The URLs of the media segment files of the video. user User The information about the user. { "result": "true", "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996", "message": "Query the details of a recommended video based on the ID of video success.", "code": "200", "data": { "id": "25", "videoId": "23rfewc23", "title": "test video", "description": "test33", "duration": 12, "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png", "creationTime": "2019-01-09 22:11:29.0", "status": "", "firstFrameUrl": "", "size": 56, "cateId": 12, "cateName": "12", "tags": "Test", "shareUrl": "", "user": { "userId": "2434793223202", "userName": "Anne", "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70" }, "transcodeStatus": "success", "snapshotStatus": "success", "censorStatus": "onCensor", "narrowTranscodeStatus": "onCensor" } }
deleteVideoById: deletes a video.
POST request URL: /console/vod/deleteVideoById
Request parameters
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. videoId string Yes The ID of the video. userId string Yes The ID of the user. { "result": "true", "requestId": "f9a8sdf09iaf3-2f23r23-0965iyhk4", "message": "Delete success.", "code": "200", "data":null }
deleteRecommendById: removes a video from the recommendation list.
POST request URL: /console/vod/deleteRecommendById
Request parameters
Sample success responsesParameter Type Required Description consoletoken string Yes The token that is used to access the short video service. You can use the authentication system provided by the short video service. Alternatively, you can use your own authentication system. videoId string Yes The ID of the video. { "result": "true", "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996", "message": "Remove a video from the recommendation list success.", "code": "200", "data":null }
login: logs a user on to the short video console.
POST request URL: /console/user/login
Request parameters
Sample success responsesParameter Type Required Description userName string Yes The username that is used to log on to the short video console. password string Yes The password that is used to log on to the short video console. { "result": "true", "requestId": "c30f63ed-3f66-45e9-9df0-a15e7d3a7e6a", "message": "Log on success.", "code": "200", "data": { "consoleToken": "12351232334123456781548765480698" } }
signOut: logs a user off from the short video console.
POST request URL: /console/user/signOut
Request parameters
Sample success responsesParameter Type Required Description userName string Yes The username of the user to be logged off from the short video console. password string Yes The password of the user to be logged off from the short video console. { "result": "true", "requestId": "d4b6405b-86fb-45e7-826c-68b69926147b", "message": "Log off success.", "code": "200", "data": null }