All Products
Search
Document Center

AppServer SmartVideo methods

Last Updated: Aug 01, 2019

Overview

The methods of the SmartVideo AppServer are classified into several types, including methods for credentials, users, videos, resources, and callback event notifications.

Response structure

The AppServer returns JSON-formatted data for all requests. Only data in the [data] structure is described in the return result of all methods.

Result Boolean Whether the operation is successful
requestId String The GUID generated by the AppServer for the request.
code String The code generated by the AppServer for the request.
message String The message returned by the AppServer to describe the result of the operation or the cause of an error.
data Object The business structure data returned by the AppServer. The data structure varies with the business.

Credentials

getSTS

You can call this operation to use a token to obtain authorization from STS.

Method GET
URL /vod/getSts
Request parameters
Name Type Required Description
token String Yes The token.
Response parameters
Name Type Description
expiration String The validity period for upload authorization. For a video upload credential, the validity period is 3,000 seconds. You need to update the upload credential after it expires.
accessKeyId String The AccessKey ID for upload authorization.
accessKeySecret String The AccessKey Secret for upload authorization.
securityToken String The security token for upload authorization.

Sample response:

{
"result": "true",
"requestId": "c17f13d1-4ce8-407f-a82b-c4799f84xxx",
"message": "",
"code": "200",
"data": {
"Expiration": "2018-12-28T08:26:13Z",
"accessKeyId": "<yourAccessKeyId>",
"securityToken": "CAIS9QF1q6Ft5B2yfSjIr4jhLujii5gV1LfYSBfj0UxhOPZNhrbNqTz2IHxFfnloBuwfvvw+lG5U6/cYlqFtTJMAX0vAYJP1A1OgZkfzDbDasumZsJY86vT8a0vxZjf/2MjNGZKbKPrWZvaqbX3diyZ32sGUXD6+XlujQ/Lr5IBgYoZVJEDaCwBLH9BLPABvhdYHPH/KT5aXPwXtn3DbATgF2GE0yytdkf3mmpbFtkaD1wamkLFO99rLT8L6P5U2DvBWSMyo2eF6TK3F3RNL5gJCnKUM1/AVo2ef4Y3EUwEAs0vabruO6L1xKwM8fK8+Fr7+RSREIHzq0xqAAZzSIQzyi/0dmEAJpmiUciXfX6sSSCYD/3NaNxLFG+mrImN+NjnAaR38cuXV50y/4WLc18RBmW9LmQ+fXd/DroAZRWXyFgIOp3KS8rR/YyOh2ghihCoLBjhyrIgaCsRUZTu2egpBx/B/nZu4fIwp9/NoMQ4kXzIcKlNNDMwFbNRr",
"accessKeySecret": "<yourAccessKeySecret>" 
}
}

getVideoUploadAuth

You can call this operation to obtain the video upload credential based on a token and the information about a video, such as its title and mezzanine file name.

Method GET
URL /vod/getVideoUploadAuth
Request parameters
Name Type Required Description
token String Yes The token.
title String Yes The video title. Length constraint: maximum length of 128 bytes. Encoding: UTF-8.
fileName String Yes The name of the video mezzanine file, including the file name extension that is case-insensitive. For more information about file name extensions supported by ApsaraVideo for VOD, see the "Overview" topic of the "Media import" chapter in Developer Guide.
fileSize String No The size of the video mezzanine file. Unit: bytes.
description String No The video description.
coverURL String No The URL of the custom video thumbnail.
tags String No The video tags. Separate multiple video tags with a comma (,).
Response parameters
Name Type Description
videoId String The video ID.
uploadAddress String The upload URL.
uploadAuth String The upload credential.

Sample response:

{
"result": "true",
"requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aadxxxx",
"message": "",
"code": "200",
"data": {
"videoId": "034813ff97984171a57aefe71c84xxxx",
"uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
"uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1Z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WNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM2MDAiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
}
}

refreshVideoUploadAuth

You can call this operation to update the video upload credential.

Method GET
URL /vod/refreshVideoUploadAuth
Request parameters
Name Type Required Description
token String Yes The token.
videoId String Yes The video ID.
Response parameters
Name Type Description
uploadAddress String The upload URL.
uploadAuth String The upload credential.

Sample response:

{
"result": "true",
"requestId": "efe66931-2a98-4bd9-9c46-e3a92eeexxxx",
"message": "",
"code": "200",
"data": {
"uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
"uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQ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4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM1NDEiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
}
}

getImageUploadAuth

You can call this operation to obtain the image upload credential based on a token and the information about an image, such as the image type.

Method GET
URL /vod/getImageUploadAuth
Request parameters
Name Type Required Description
token String Yes The token.
imageType String Yes The image type. Default value: cover.
imageExt String No The file name extension of the image. Default value: png.
title String No The image title.
tags String No The image tags. Separate multiple image tags with a comma (,).
Response parameters
Name Type Description
uploadAddress String The upload URL.
uploadAuth String The upload credential.
imageURL String The image URL.
imageId String The image ID.

Sample response:

{
"result": "true",
"requestId": "c9fc9bf0-b172-441c-9624-2b700204xxxx",
"message": "",
"code": "200",
"data": {
"uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJpbWFnZS9jb3Zlci84RUI3MDMxODhGOUQ0OTIwQjZFM0ExREREQjc5N0I1MC02LTIuanBnIn0=",
"uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUVljejU5WnNtSjI4V2Y3d2FmK0FVQkxHQ1RtZDVNQVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24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U1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVENUaW1lIjoiMjAxOC0xMi0yOFQwODo0OTozNFoiLCJBY2Nlc3NLZXlTZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV4cGlyYXRpb24iOiIzNTY2IiwiUmVnaW9uIjoiY24tc2hhbmdoYWkifQ==",
"imageId": "76ac9d24882544e7a2b94758d34bceac",
"imageURL": "https://outin-12ebe01f029d11e9b63300163e1c8dba.oss-cn-shanghai.aliyuncs.com/image/cover/8EB703188F9D4920B6E3A1DDDB797B50-6-2.jpg?Expires=1545987008&OSSAccessKeyId=XXXXXXX&Signature=cb6kwDuABBH%2FUDk7qviXy0MC2mE%3D"
}
}

Credentials (without a token)

getSTS

You can call this operation to obtain authorization from STS.

Method GET
URL /demo/getSts
Request parameters
Response parameters
Name Type Description
expiration String The validity period for upload authorization. For a video upload credential, the validity period is 3,000 seconds. You need to update the upload credential after it expires.
accessKeyId String The AccessKey ID for upload authorization.
accessKeySecret String The AccessKey Secret for upload authorization.
securityToken String The security token for upload authorization.

Sample response:

{
"result": "true",
"requestId": "c17f13d1-4ce8-407f-a82b-c4799f84xxxx",
"message": "",
"code": "200",
"data": {
"Expiration": "2018-12-28T08:26:13Z",
"accessKeyId": "<yourAccessKeyId>",
"securityToken": "CAIS9QF1q6Ft5B2yfSjIr4jhLujii5gV1LfYSBfj0UxhOPZNhrbNqTz2IHxFfnloBuwfvvw+lG5U6/cYlqFtTJMAX0vAYJP1A1OgZkfzDbDasumZsJY86vT8a0vxZjf/2MjNGZKbKPrWZvaqbX3diyZ32sGUXD6+XlujQ/Lr5IBgYoZVJEDaCwBLH9BLPABvhdYHPH/KT5aXPwXtn3DbATgF2GE0yytdkf3mmpbFtkaD1wamkLFO99rLT8L6P5U2DvBWSMyo2eF6TK3F3RNL5gJCnKUM1/AVo2ef4Y3EUwEAs0vabruO6L1xKwM8fK8+Fr7+RSREIHzq0xqAAZzSIQzyi/0dmEAJpmiUciXfX6sSSCYD/3NaNxLFG+mrImN+NjnAaR38cuXV50y/4WLc18RBmW9LmQ+fXd/DroAZRWXyFgIOp3KS8rR/YyOh2ghihCoLBjhyrIgaCsRUZTu2egpBx/B/nZu4fIwp9/NoMQ4kXzIcKlNNDMwFbNRr",
"accessKeySecret": "<yourAccessKeySecret>"
}
}

getVideoUploadAuth

You can call this operation to obtain the video upload credential based on the information about a video, such as its title and mezzanine file name.

Method GET
URL /demo/getVideoUploadAuth
Request parameters
Name Type Required Description
title String Yes The video title.
fileName String Yes The name of the video mezzanine file.
fileSize String No The size of the video mezzanine file. Unit: bytes.
description String No The video description.
coverURL String No The URL of the custom video thumbnail.
tags String No The video tags. Separate multiple video tags with a comma (,).
Response parameters
Name Type Description
videoId String The video ID.
uploadAddress String The upload URL.
uploadAuth String The upload credential.

Sample response:

{
"result": "true",
"requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aadxxxx",
"message": "",
"code": "200",
"data": {
"videoId": "034813ff97984171a57aefe71c84xxxx",
"uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
"uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDV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RDRwbU9KMFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM2MDAiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
}
}

refreshVideoUploadAuth

You can call this operation to update the video upload credential.

Method GET
URL /demo/refreshVideoUploadAuth
Request parameters
Name Type Required Description
videoId String Yes The video ID.
Response parameters
Name Type Description
uploadAddress String The upload URL.
uploadAuth String The upload credential.

Sample response:

{
"result": "true",
"requestId": "efe66931-2a98-4bd9-9c46-e3a92eeexxxx",
"message": "",
"code": "200",
"data": {
"uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
"uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUE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ktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM1NDEiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
}
}

getVideoPlayAuth

You can call this operation to obtain the video playback credential.

Method GET
URL /demo/getVideoPlayAuth
Request parameters
Name Type Required Description
videoId String Yes The video ID.
Response parameters
Name Type Description
coverURL String The URL of the video thumbnail.
duration String The video size.
videoId String The video ID.
playAuth String The playback credential.

Sample response:

{
"result": "true",
"requestId": "b766e688-1fee-4635-9ed8-e86529d8xxxx",
"message": "",
"code": "200",
"data": {
"coverURL": "https://alivc-demo-vod.aliyuncs.com/5ef00e3c0ef24547a6dcff851be0b6ab/snapshots/a02dfc16dfab48a6ae27529edc906cd7-00002.jpg",
"duration": "10.4167",
"videoId": "5ef00e3c0ef24547a6dcff851be0xxxx",
"playAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzN3SjFxNkZ0NUIyeWZTaklyNG41SDhueGhvd1MrN2UvTkczNm9EZzJTczF1bUpidWxqejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2Nsck1xRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcExGc3QySjZyOEpqc1ZHeEpkTDVsdXBzdlhKYXNEVkVma3VFNVhFTWlJNS8wMGU2TC8rY2lyWVhEN0JHSmFWaUpsaFE4MEtWdzJqRjFSdkQ4dFhJUTBRazYxOUszemRaOW1nTGlidWkzdnhDa1J2MkhCaWptOHR4cW1qL015UTV4MzFpMXYweStCM3dZSHRPY3FjYThCOU1ZMVdUc3Uxdm9oemFyR1Q2Q3BaK2psTStxQVU2cWxZNG1YcnM5cUhFa0ZOd0JpWFNaMjJsT2RpTndoa2ZLTTNOcmR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ZmMxNmRmYWI0OGE2YWUyNzUyOWVkYzkwNmNkNy0wMDAwMi5qcGciLCJEdXJhdGlvbiI6MTAuNDE2N30sIkFjY2Vzc0tleUlkIjoiU1RTLk5KTFRzRWtTM0x1VDZLS0Q4Y0ZCQndTRXQiLCJQbGF5RG9tYWluIjoiYWxpdmMtZGVtby12b2QuYWxpeXVuY3MuY29tIiwiQWNjZXNzS2V5U2VjcmV0IjoiOXcyNVlDeXVyblpxM2YyN3ZBQTNxZVJhYWZVSzhvVTFuUXN2aGJ3UUhVR0giLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSIsIkN1c3RvbWVySWQiOjExMDMxNDQ1MzM0MjYzODZ9"
}
}

getImageUploadAuth

You can call this operation to obtain the image upload credential based on the information about an image, such as the image type.

Method GET
URL /demo/getImageUploadAuth
Request parameters
Name Type Required Description
imageType String Yes The image type. Default value: cover.
imageExt String No The file name extension of the image. Default value: png.
title String No The image title.
tags String No The image tags. Separate multiple image tags with a comma (,).
Response parameters
Name Type Description
uploadAddress String The upload URL.
uploadAuth String The upload credential.
imageURL String The image URL.
imageId String The image ID.

Sample response:

{
"result": "true",
"requestId": "c9fc9bf0-b172-441c-9624-2b700204xxxx",
"message": "",
"code": "200",
"data": {
"uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJpbWFnZS9jb3Zlci84RUI3MDMxODhGOUQ0OTIwQjZFM0ExREREQjc5N0I1MC02LTIuanBnIn0=",
"uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0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56bmZkaFZ4U0ZObVA2aFVlU204Q1ZkSUJMUVFwaWZxR2hyVDJRTEtadVVxTHplRDBqU01FUllnclNZRGo3cVRJUUM1aVZ5T2l3K0dORGxscmlUREwvV1BXQkVMSVFBPSIsIkFjY2Vzc0tleUlkIjoiU1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVENUaW1lIjoiMjAxOC0xMi0yOFQwODo0OTozNFoiLCJBY2Nlc3NLZXlTZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV4cGlyYXRpb24iOiIzNTY2IiwiUmVnaW9uIjoiY24tc2hhbmdoYWkifQ==",
"imageId": "76ac9d24882544e7a2b94758d34bxxxx",
"imageURL": "https://outin-12ebe01f029d11e9b63300163e1c8dba.oss-cn-shanghai.aliyuncs.com/image/cover/8EB703188F9D4920B6E3A1DDDB797B50-6-2.jpg?Expires=1545987008&OSSAccessKeyId=XXXXXXXX&Signature=cb6kwDuABBH%2FUDk7qviXy0MC2mE%3D"
}
}

Users

login

You can call this operation to log on as a user.

Method GET
URL /user/login
Request parameters
Name Type Required Description
username String Yes The username.
password String Yes The password.
Response parameters
Name Type Description
token String The token.

Sample response:

{ 
"result":"true",
"code":"200",
"requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
"message":null,
"data":{}
}
}

register

You can call this operation to register as a user.

Method GET
URL /user/register
Request parameters
Name Type Required Description
username String Yes The username.
password String Yes The password.
Response parameters

Sample response:

{ 
"result":"true",
"code":"200",
"requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
"message":null,
"data":{}
}
}

updateUser

You can call this operation to modify the username of a user.

Method POST
URL /user/updateUser
Request parameters
Name Type Required Description
token String Yes The token.
userId String Yes The user ID.
nickname String Yes The user nickname.
Response parameters

Sample response:

{ 
"result":"true",
"code":"200",
"requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
"message":null,
"data":{}
}
}

randomUser

You can call this operation to create a random user and generate user information, including the user ID, token, user nickname, user avatar, ingest URL, FLV playback URL, and HLS playback URL.

Method GET
URL /user/randomUser
Request parameters
Response parameters userId String The user ID.
token String The token.
nickName String The user nickname.
avatar String The user avatar.
gmtCreate String The creation time.
gmtModified String The modification time.

Sample response:

{ 
"result":"true",
"requestId":"d5b1f423-0186-41d0-bf20-98606472xxxx",
"message":null,
"data":{
"id":"37",
"userId":"243124930xxxx",
"token":"234fwef23-fsdf4f7-ahjktghsrt65ujs87rukmslsgbfxlry91",
"nickName":"8313e974-f6a8-4527-af6e-8b4c3a4f1xxxx",
"gmtCreate":"2018-11-16 15:40:18",
"gmtModified":""
} 
}

Videos

videoPublish

You can call this operation to publish a video. The uploaded video is inserted into the backend so that you can view the published video in the user center.

Method POST
URL /vod/videoPublish
Request parameters
Name Type Required Description
token String Yes The token.
title String No The video title.
videoId String No The video ID.
description String No The video description.
duration Float No The video duration. Unit: seconds.
coverUrl String No The URL of the video thumbnail.
size Integer No The size of the video mezzanine file. Unit: bytes.
tags String No The video tags. Separate multiple video tags with a comma (,).
cateId Integer No The video category ID.
cateName String No The video category name.
Response parameters

Sample response:

{ 
"result":"true",
"code":"200",
"requestId":"ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
"message":null,
"data":{}
}
}

getRecommendVideoList

You can call this operation to obtain a list of recommended videos.

Method GET
URL /vod/getRecommendVideoList
Request parameters
Name Type Required Description
token String Yes The token.
pageIndex Integer Yes The start page number.
pageSize Integer Yes The number of data records per page.
Response parameters
Name Type Description
total String The total number of videos.
videoList List<Video > The video information list.

Video

Name Type Description
title String The video title.
videoId String The video ID.
description String The video description.
duration String The video duration. Unit: seconds.
coverUrl String The URL of the video thumbnail.
status String The video status.
firstFrameUrl String The URL of the first frame snapshot.
size String The size of the video mezzanine file. Unit: bytes.
tags String The video tags. Separate multiple video tags with a comma (,).
cateId String The video category ID.
cateName String The video category name.
creationTime String The creation time.
transcodeStatus String The transcoding status.
snapshotStatus String The snapshot status.
censorStatus String The review status.
narrowTranscodeStatus String The Narrowband HD transcoding status.
fileUrl String The playback URL.
user User The user information.

User

Name Type Description
userId String The user ID.
userName String The username.
avatarUrl String The URL of the user avatar.

Sample response:

{
"result": "true",
"requestId": "27596e99-0083-4701-80b5-90969f55xxxx",
"message": "",
"code": "200",
"data": {
"total": 59,
"videoList": [
{
"id": "110",
"videoId": "a34f34e0fc744d00a5269e8a7c6a60c7",
"title": "Hot air balloon",
"description": "Hot air balloon",
"duration": 7,
"coverUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/snapshots/0c3a4b0e8f37494f83202d6e6bb83ecc-00001.jpg",
"creationTime": "",
"status": "1",
"firstFrameUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/snapshots/0c3a4b0e8f37494f83202d6e6bb83ecc-00001.jpg",
"size": 389938,
"cateId": 1,
"cateName": "Recommendation list",
"tags": "Hot air balloon",
"shareUrl": "",
"user": {
"userId": "2435470766044",
"userName": "",
"avatarUrl": ""
},
"transcodeStatus": "",
"snapshotStatus": "",
"censorStatus": "",
"narrowTranscodeStatus": "",
"fileUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/02528a756dd04693dc3c44d68b1bcf28-fd.mp4"
},
{
"id": "109",
"videoId": "febc0388fab9491d8199bdad1958b756",
"title": "Beach chair",
"description": "Beach chair",
"duration": 16,
"coverUrl": "https://alivc-demo-vod.aliyuncs.com/febc0388fab9491d8199bdad1958b756/snapshots/6b6ad9bfc80d4bc49f96e6111cbffd02-00002.jpg",
"creationTime": "",
"status": "1",
"firstFrameUrl": "https://alivc-demo-vod.aliyuncs.com/febc0388fab9491d8199bdad1958b756/snapshots/6b6ad9bfc80d4bc49f96e6111cbffd02-00002.jpg",
"size": 2763135,
"cateId": 1,
"cateName": "Recommendation list",
"tags": "Beach chair",
"shareUrl": "",
"user": {
"userId": "243547076xxxx",
"userName": "",
"avatarUrl": ""
},
"transcodeStatus": "",
"snapshotStatus": "",
"censorStatus": "",
"narrowTranscodeStatus": "",
"fileUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/02528a756dd04693dc3c44d68b1bcf28-fd.mp4"
}
]
}
}

getPersonalVideoList

You can call this method to obtain a list of videos in the user center.

Method GET
URL /vod/getPersonalVideoList
Request parameters
Name Type Required Description
token String Yes The token.
pageIndex Integer Yes The start page number, which starts from 1.
pageSize Integer Yes The number of data records per page.
Response parameters
Name Type Description
total String The total number of videos.
videoList List<Video > The list of video information in the user center.

Video

Name Type Description
title String The video title.
videoId String The video ID.
description String The video description.
duration String The video duration. Unit: seconds.
coverUrl String The URL of the video thumbnail.
status String The video status.
firstFrameUrl String The URL of the first frame snapshot.
size String The size of the video mezzanine file. Unit: bytes.
tags String The video tags. Separate multiple tags with a comma (,).
cateId String The video category ID.
cateName String The video category name.
creationTime String The creation time.
transcodeStatus String The transcoding status.
snapshotStatus String The snapshot status.
censorStatus String The review status.
narrowTranscodeStatus String The Narrowband HD transcoding status.
user User The user information.

User

Name Type Description
userId String The user ID.
userName String The username.
avatarUrl String The URL of the user avatar.

Sample response:

{
"result": "true",
"requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56xxxx",
"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": "243479322xxxx",
"userName": "xx",
"avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70"
},
"transcodeStatus": "",
"snapshotStatus": "",
"censorStatus": "onCensor",
"narrowTranscodeStatus": ""
}
]
}
}

deleteVideoById

You can call this operation to delete a video.

Method POST
URL /vod/deleteVideoById
Request parameters
Name Type Required Description
token String Yes The token.
videoId String Yes The video ID.
userId String Yes The user ID.
Response parameters
Name Type Description

Sample response:

{
"result": "true",
"requestId": "f8163b40-6192-4edc-97ec-52c6cd96xxxx",
"message": "Video deleted.",
"code": "200",
"data":null
}

Callback event notifications

Callback for the completion of an automated review job, a transcoding job, and a video snapshot job

If you configure callback events in the ApsaraVideo for VOD console for the completion of an automated review job, a transcoding job, and a video snapshot job, the AppServer can receive callback event notifications from the console. The following table lists the common parameters in callback event notifications and relevant event types.

Name Type Description
EventTime String The time when the event occurred in UTC. Format: yyyy-MM-ddTHH:mm:ssZ.
EventType String The event type.
VideoId String The video ID.
Status String The processing result. Valid values: success and fail.

EventType

Event type Description
StreamTranscodeComplete The event indicating that a video is transcoded in a single definition.
SnapshotComplete The event indicating that video snapshots are taken.
AIVideoCensorComplete The event indicating that an automated review is completed.

After a job is completed, the AppServer receives the relevant callback event notification and updates the database accordingly.

Music

getRecommendMusic

You can call this operation to obtain a list of recommended music.

Method GET
URL /music/getRecommendMusic
Request parameters
Name Type Required Description
pageNo String Yes The start page number. Valid values:[1,50]
pageSize String Yes The number of data records per page. Valid values:[1,50]
Response parameters
Name Type Description
total String The total number of music records.
musicList List<MusicInfo> The music information list.

MusicInfo

Name Type Description
musicId String The music ID, which is globally unique.
title String The display name of the music.
artistName String The artist name.
duration String The duration.
source String The music source, which is currently TaiHe.

Sample response:

{
"result": "true",
"requestId": "56a393dc-b1f9-4641-b998-6a7ff40dxxxx",
"message": "",
"code": "200",
"data": {
"musicList": [
{
"musicId": "T10033153675",
"title": "Super Feelings",
"artistName": "N.O.D",
"duration": "219",
"source": "TaiHe"
},
{
"musicId": "T10033153447",
"title": "Candybae",
"artistName": "N.O.D",
"duration": "200",
"source": "TaiHe"
},
{
"musicId": "T10033153645",
"title": "Ring Ring Ring",
"artistName": "N.O.D",
"duration": "208",
"source": "TaiHe"
}
],
"total": "40"
}
}

getPlayPath

You can call this operation to obtain the music playback URL based on a music ID.

Method GET
URL /music/getPlayPath
Request parameters
Name Type Required Description
musicId String Yes The music ID.
Response parameters
Name Type Description
playPath String The playback URL.
expireTime String The validity period.

Sample response:

{
"result": "true",
"requestId": "56a393dc-b1f9-4641-b998-6a7ff40dxxxx",
"message": "",
"code": "200",
"data": {
"playPath": "https://audio01.dmhmusic.com/117_15_T10033153675_64_4_1_0_sdk-ts/0105/M00/B2/F4/ChR45VnaKfaAK01QABrJJdrL4Yk. 64.aac?xcode=af09abf9f9e26b644165614d13a46776755f023",
"expireTime": "1551772473"
}

Resources

getPasterInfo

Method GET
URL /resource/getPasterInfo
Request parameters
Name Type Required Description
Response parameters
Name Type Description
id Integer The ID.
icon String The icon.
description String The description.
level Integer The level.
name String The name.
preview String The preview.
sort Integer The sequence number.
type Integer The type.
createTime String The creation time.

Sample response:

{
"result": "true",
"requestId": "cc52d16b-3c1d-4694-abf1-c0633ddaxxxx",
"message": "",
"code": "200",
"data": [
{
"id": 84,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/85157CBE88A14CBC95C5216F3D0579D1-6-2.png",
"description": "Valentine's Day motion graphics",
"name": "Most Beautiful Valentine's Day",
"level": 1,
"preview": "http://30.40.34.91:8080/?id=84",
"sort": 46,
"type": 1,
"createTime": "2019-03-19 14:32:38.0"
},
{
"id": 108,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/44F675192F144BDA9B2A324F7664911E-6-2.png",
"description": "New year motion graphics",
"name": "2017 Happy Spring Festival 2",
"level": 1,
"preview": "http://30.40.34.91:8080/?id=108",
"sort": 45,
"type": 1,
"createTime": "2019-03-19 14:32:18.0"
}
...
]
}

getPasterList

Method GET
URL /resource/getPasterList
Request parameters
Name Type Required Description
pasterId String Yes The ID of the motion graphics material.
type String Yes The motion graphics type. Valid values: 1 (indicating facial motion graphics) and 2 (indicating animated stickers).
Response parameters
Name Type Description
id String The ID.
fontId Integer The font ID.
icon String The icon.
name String The name.
url String The download URL.
preview String The preview.
sort Integer The sequence number.
type Integer The type.
createTime String The creation time.

Sample response:

{
"result": "true",
"requestId": "395f0d19-7f3d-4df3-ac56-e7715e4fxxxx",
"message": "",
"code": "200",
"data": [
{
"id": 1083,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/145F371646EB4CA595A7BD6C43F0EA9E-6-2.jpg",
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/9862890CE93C4248B8B1F6F2C96E4289-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/12044FD09B6C432B874A925952F526F2-6-2.gif",
"name": "bianpao",
"sort": 0,
"type": 0,
"fontId": 0,
"createTime": "2019-03-19 14:32:18.0"
},
{
"id": 1092,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/F78BDD275CE84186A67730BC93BF23ED-6-2.jpg",
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/ABE3DAE450C3482896BA5AEAE8C82283-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/4154C9D2FE3A4B4191A58357F1C403C6-6-2.gif",
"name": "zhaofudamo",
"sort": 0,
"type": 0,
"fontId": 0,
"createTime": "2019-03-19 14:32:19.0"
}
...
]
}

getFrontPasterList

Method GET
URL /resource/getFrontPasterList
Request parameters
Name Type Required Description
Response parameters
Name Type Description
id Integer The ID.
fontId String The font ID.
icon String The icon.
name String The name.
url String The download URL.
preview String The preview.
sort String The sequence number.
type String The type.
createTime String The creation time.

Sample response:

{
"result": "true",
"requestId": "0423771c-ad6b-4557-9ef1-ce71fcb0xxxx",
"message": "",
"code": "200",
"data": [
{
"id": 5871,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/EFA0567FF6CE4E6D866A25D909DE05C3-6-2.jpg",
"mediaId": 0,
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/BD74BC09CB3341169F319727340B78CF-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/2A768BDC4D024366BCCBFF950C2B3051-6-2.gif",
"name": "bixin",
"duration": 0,
"desc": "",
"sort": 0,
"aspect": 0,
"type": 0,
"fontId": 0,
"createTime": "2019-03-19 14:32:45.0"
},
{
"id": 5872,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/497006AE17DB46FA9DAFE6B5405D9576-6-2.jpg",
"mediaId": 0,
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/7E3079293ACE44A48271E1D6CB07D217-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/E6567EDDD03540C7931980928CA12E05-6-2.gif",
"name": "gaobai",
"duration": 0,
"desc": "",
"sort": 0,
"aspect": 0,
"type": 0,
"fontId": 0,
"createTime": "2019-03-19 14:32:46.0"
},
{
"id": 5873,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/CB1BB92B7BCB44E28AA50F26C96D0109-6-2.jpg",
"mediaId": 0,
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/A5EBA7E610D84265B53539964EFD89C4-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/E1BF246F042A4A30A0E7F41673316BD7-6-2.gif",
"name": "liwune",
"duration": 0,
"desc": "",
"sort": 0,
"aspect": 0,
"type": 0,
"fontId": 0,
"createTime": "2019-03-19 14:32:48.0"
}
...
]
}

getTextPaster

Method GET
URL /resource/getTextPaster
Request parameters
Name Type Required Description
Response parameters
Name Type Description
id Integer The ID.
icon String The icon.
description String The description.
name String The name.
preview String The preview.
sort Integer The sequence number.
type Integer The type.
createTime String The creation time.

Sample response:

{
"result": "true",
"requestId": "23b4de5e-0b89-40f0-b78c-d4122537xxxx",
"message": "",
"code": "200",
"data": [
{
"id": 189,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/BB11DAF8ED0842408A4A04F09893D454-6-2.png",
"description": "Bubble box",
"name": "Bubble box",
"preview": "http://30.40.34.91:8080/?type=text&id=189",
"sort": 3,
"type": 2,
"createTime": "2019-03-19 14:21:58.0"
},
{
"id": 196,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/7858EDE1DCD8457E976BCAB42FB9845D-6-2.png",
"description": "Simple bubble box",
"name": "Simple bubble box",
"preview": "http://30.40.34.91:8080/?type=text&id=196",
"sort": 2,
"type": 2,
"createTime": "2019-03-19 14:21:42.0"
}
...
]
}

getTextPasterList

Method GET
URL /resource/getTextPasterList
Request parameters
Name Type Required Description
textPasterId String Yes The caption ID.
Response parameters
Name Type Description
id Integer The ID.
fontId Integer The font ID.
icon String The icon.
name String The name.
url String The download URL.
preview String The preview.
sort Integer The sequence number.
type Integer The type.
createTime String The creation time.

Sample response:

{
"result": "true",
"requestId": "49ec9fc0-d2e2-4702-afe3-a1fadda7xxxx",
"message": "",
"code": "200",
"data": [
{
"id": 963,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/4326259B143E4D5EB979CFE2D021608D-6-2.jpg",
"mediaId": 1849,
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/599ED868D7DC405BB3EE093FFCFEF576-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/B43F76D23D58401C9ABD90AD3C623BAC-6-2.gif",
"name": "beiers",
"duration": 0,
"desc": "",
"sort": 0,
"type": 0,
"fontId": 52,
"createTime": "2019-03-19 14:21:42.0"
},
{
"id": 964,
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/1148257C961547848690C275B860B340-6-2.jpg",
"mediaId": 1862,
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/15CD1557EAAC49B1BA2FD3C30236A657-7-4.mat",
"preview": "http://alivc-demo-vod.aliyuncs.com/image/default/79DB242DD30446AC91DC74EAC3384271-6-2.gif",
"name": "yajing",
"duration": 0,
"desc": "",
"sort": 0,
"type": 0,
"fontId": 89,
"createTime": "2019-03-19 14:21:43.0"
}
...
]
}

getMv

Method GET
URL /resource/getMv
Request parameters
Name Type Required Description
Response parameters
Name Type Description
id Integer The ID.
icon String The icon.
duration String The duration.
name String The name.
previewPic String The playback preview.
previewMp4 String The playback URL.
sort Integer The sequence number.
createTime String The creation time.
aspectList List<Aspect > The music video (MV) list.

Aspect

Name Type Description
aspect String The aspect ratio. Valid values: 1 (indicating 1:1), 2 (indicating 4:3), and 3 (indicating 16:9).
download String The download URL.

Sample response:

{
"result": "true",
"requestId": "3dae0e53-39ff-4376-bc8d-e94c3380xxxx",
"message": "",
"code": "200",
"data": [
{
"id": 104,
"previewPic": "http://alivc-demo-vod.aliyuncs.com/image/default/FB35E16CC72C4B85AF6C776EB8034947-6-2.png",
"previewMp4": "http://alivc-demo-vod.aliyuncs.com/video/material/EC8C09EB055248B1A1DD8803D08D4D16-7-4.mp4",
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/DFB64DE1892B4DEAA34F01D594D5AE81-6-2.png",
"duration": 15,
"name": "relax",
"sort": 8,
"createTime": "2019-03-19 14:21:21.0",
"aspectList": [
{
"aspect": 1,
"download": "http://alivc-demo-vod.aliyuncs.com/video/material/14FF3D3297CF442A9A3E160C5F191752-7-4.mat"
},
{
"aspect": 2,
"download": "http://alivc-demo-vod.aliyuncs.com/video/material/53CC516C4B3A49CABD0B13A093CABCCE-7-4.mat"
},
{
"aspect": 3,
"download": "http://alivc-demo-vod.aliyuncs.com/video/material/CB7444406A0B4249A80897EFF6E40B8B-7-4.mat"
}
]
}
...
]
}

getFont

You can call this operation to obtain the font information based on the font ID.

Method GET
URL /resource/getFont
Request parameters
Name Type Required Description
fontId String No The font ID. If you do not set this parameter, the information about all fonts is listed.
Response parameters
id Integer The ID.
banner String The banner.
name String The name.
url String The download URL.
icon String The icon.
sort Integer The sequence number.

Sample response:

{
"result": "true",
"requestId": "b9c72eb4-9d42-4fda-934c-23c60493xxxx",
"message": "",
"code": "200",
"data": {
"id": 52,
"name": "Fun. Expectation",
"banner": "http://alivc-demo-vod.aliyuncs.com/image/default/BD4E71CE644043019E89A5737A79AC51-6-2.jpg",
"icon": "http://alivc-demo-vod.aliyuncs.com/image/default/C1F83D29D3B64C3C87CF7E3BDEF3B08F-6-2.jpg",
"url": "http://alivc-demo-vod.aliyuncs.com/video/material/B12F02D94A184481A9DE629ECFCD8C0D-7-4.mat",
"sort": 1
}
}