This topic describes the API operations available for the short video AppServer of ApsaraVideo VOD. The operations allow you to manage credentials, users, videos, resources, and callback notifications.

Response parameters

JSON-formatted data is returned for all requests. This topic describes only the parameters contained in the data structure.

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. In most cases, the error message is returned.
data object The business data returned for the request. The value varies based on different business data structures.

API operations for credential management (with access tokens)

  • getSts: obtains a Security Token Service (STS) token.

    get url: /vod/getSts

    Request parameters
    Parameter Type Required Description
    token 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.
    Response parameters
    Parameter Type Description
    expiration string The time when the upload credential expires. The validity period of upload credentials is 3,000 seconds. You must update the upload credentials after they expire.
    accessKeyId string The AccessKey ID.
    accessKeySecret string The AccessKey secret.
    securityToken string The STS token.
    Sample response
    {
        "result": "true",
        "requestId": "c17f13d1-4ce8-407f-a82b-c4799f8****",
        "message": "",
        "code": "200",
        "data": {
            "Expiration": "2018-12-28T08:26:13Z",
            "accessKeyId": "<yourAccessKeyId>",
            "securityToken": "CAIS9QF1q6Ft5B2yfSjIr4jhLujii5gV1LfYSBfj0UxhOPZNhr****/cYlqFtTJMAX0vAYJP1A1OgZkfzDbDasum****/2MjNGZKbKPrWZvaqbX3diyZ32sGU****/Lr5L1xKwM8fK8+Fr7+RSREIHzq0xqAAZzSI****",
            "accessKeySecret": "<yourAccessKeySecret>"
        }
    }
  • getVideoUploadAuth: obtains the credential for uploading a video based on the access token and the information about the video, such as the title and name of the video.

    get url: /vod/getVideoUploadAuth

    Request parameters
    Parameter Type Required Description
    token 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 Yes The title of the video. The value can be up to 128 bytes in length and must be encoded in the UTF-8 format.
    fileName string Yes The name of the source video file. The file name must contain an extension, which is not case-sensitive. For more information about the supported file name extensions, see the media upload overview topic in the Developer Guide.
    fileSize string No The size of the video. Unit: bytes.
    description string No The description of the video.
    coverURL string No The URL of the custom video thumbnail.
    tags string No The tags of the video. Separate multiple tags with commas (,).
    Response parameters
    Parameter Type Description
    videoId string The ID of the video.
    uploadAddress string The upload URL.
    uploadAuth string The upload credential.
    Sample response
    {
        "result": "true",
        "requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aad****",
        "message": "",
        "code": "200",
        "data": {
            "videoId": "034813ff97984171a57aefe71c84****",
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy****",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTTQ5L2l6YzdQNlFIMzViNFJpTkw4L1o3dFFOWHdoaWZmb2JIYTlZcmZIZ21OaGx2dkRTajQzdDF5dFZPZVpjWDBha1E1dTdrdTdaSFArb0x0OGphWXZqUDNQRTNyTHBNWUx1NFQ0OFpYVVNPRHREWWNaRFVIaHJFazRSVWpYZEk2T2Y4VXJXU1FDN1dzcjIxN290ZzdGeXlrM3M4TWFIQWtXTFg3U0IyRHdFQjRjNGFFb2tWVzRSeG5lelc2VUJhUGI5Ty9kcHhKM2xQMFIwV2dteWRuQkR4L1NmdTJrS3ZSaHBrUnZ2WWsxQXN3WElqejdoSVoxR2phRFFtaTFlZm81WG1QWEZUUW1uOGw1cEFNbXkvNjB4WHVkdmJIL3U3RVVQSytrQ0dvQUJrcGhERlVGRUtGbEtsaUlFYk9BYk0wUmRGMlNabGw2WklpY0J3VUR3cmxRbGx1MW1XajB6OEZmb0hYeG50aGJZOXV5U0ZzeWYvOEVtWlhzZVR2eXNETldjNEhUNmdnMDZFWStPN2hSOENKN1MrZWNHL0hrVUl2azB6djZrZm5jc0xzZHlwVzVtS09adGdJRDRwbU9KMFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ****"
        }
    }
  • refreshVideoUploadAuth: updates the upload credential.

    get url: /vod/refreshVideoUploadAuth

    Request parameters
    Parameter Type Required Description
    token 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.
    Response parameters
    Parameter Type Description
    uploadAddress string The upload URL.
    uploadAuth string The upload credential.
    Sample response
    {
        "result": "true",
        "requestId": "efe66931-2a98-4bd9-9c46-e3a92eee****",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y****",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M9****"
        }
    }
  • getImageUploadAuth: obtains the credential for uploading an image based on the access token and the information about the image, such as the type of the image.

    get url: /vod/getImageUploadAuth

    Request parameters
    Parameter Type Required Description
    token 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.
    imageType string Yes The type of the image. Valid values:
    • default
    • cover
    imageExt string No The file name extension of the image. Default value: png.
    title string No The title of the image.
    tags string No The tags of the image. Separate multiple tags with commas (,).
    Response parameters
    Parameter Type Description
    uploadAddress string The upload URL.
    uploadAuth string The upload credential.
    imageURL string The URL of the image.
    imageId string The ID of the image.
    Sample response
    {
        "result": "true",
        "requestId": "c9fc9bf0-b172-441c-9624-2b700204****",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im****",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXVljejU5WnNtSjI4V2Y3d2FmK0FVQc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTTQArb0x0OGphWXZqUDNQRTNyTHBNWUx1NFQ0OFpYVVNPRHREWWNaRFVIaHJFazRSVWpYZEk2T2Y4VXJXU1FDN1dzcjIxN290ZzdGeXlrM3M4TWFIQWtXTFg3U0IyRHdFQjRjNGFFb2tWVzRSeG5lelc2VUJhUkJwYmxkN0JxNmNWNWxPZEJSWm9LK0t6UXJKVFg5RXoycExtdUQ2ZS9MT3M3b0RWSjM3V1p0S3l1aDRZNDlkNFU4clZFalBRcWl5a1Qwa0ZncGZUSzFSemJQbU5MS205YmFCMjUvelcrUGREZTBkc1Znb0pWS0RwaUdXRzNSTE5uK3p0Sjl4YmtlRStzS1VsZmJCK1o0NFNRVjJ2SUZUVkZpSUlOd3o5QWMrdS9Mc3RCbksrNy92V0hudC8yOHg5ZFNmdmFzM3NCVTBMNmI4M3JYTjVHV0c1Q0xPT3BOVXdwbUhCRGRkSmoyc1lHRjh6ZnlvZ1hZS21nc01pV25jT1d4RXNnL09qVGZwSnBWS2o2eldtUzhmWHZsSjVjM2NTaWE5K0Z0bkJlbUE2cTB3UmZoWWUrUkRRbWtjWTdMYU1CV01Hb0FCRDlpdzM2ZENFcmJMUFRUb3JaYi9lL0NYQW12YjdVWHFySTZWNHFNWmJLYk1WMzU1ZWR4Ni9WM21kd0p0VHdOMHF5NXFNTFFvSXdZem56bmZkaFZ4U0ZObVA2aFVlU204Q1ZkSUJMUVFwaWZxR2hyVDJRTEtadVVxTHplRDBqU01FUllnclNZRGo3cVRJUUM1aVZ5T2l3K0dORGxscmlUREwvV1BXQkVMSVFBPSIsIkFjY2Vzc0tleUlkIjoiU1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVENUaW1lIjoiMjAxOC0xMi0yOFQwODo0OTozNFoiLCJBY2Nlc3NLZXlTZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV****",
            "imageId": "76ac9d24882544e7a2b94758d34****",
            "imageURL": "https://examplebucket****.oss-cn-shanghai.aliyundoc.com/image/cover/8EB703188F9D4920B6E3A1DDDB797B****.jpg?Expires=1545987008&OSSAccessKeyId=****XXX&Signature=cb6kwDuABBH%2FUDk7qviXy0M****"
        }
    }

API operations for credential management (without access tokens)

  • getSts: obtains an STS token.

    get url: /demo/getSts

    Response parameters
    Parameter Type Description
    expiration string The time when the upload credential expires. The validity period of upload credentials is 3,000 seconds. You must update the upload credentials after they expire.
    accessKeyId string The AccessKey ID.
    accessKeySecret string The AccessKey secret.
    securityToken string The STS token.
    Sample response
    {
        "result": "true",
        "requestId": "c17f13d1-4ce8-407f-a82b-c4799f84****",
        "message": "",
        "code": "200",
        "data": {
            "Expiration": "2018-12-28T08:26:13Z",
            "accessKeyId": "<yourAccessKeyId>",
            "securityToken": "CAIS9QF1q6Ft5B2yfSjIr4jhLujii5gV1LfYSBfj0UxhOPZNhrbNqTz2IH****/cYlqFtTJMAX0vAYJP1A1OgZkfzDbDaH9BLPABvhdYHPH****/KT5aXPwXtn3DbATgF2GE0yytdkf3mmpbFtkaD1wamkLFO99rLT8L6P5U2DvBWSMyo2eF6TK3F3R****/AVo2ef4Y3EUwEAs0vabruO6L1xKwM8fK8+Fr7+RSREIHzq0xqA****/0dmEAJpmiUciXfX6sSSCYD/3N****",
            "accessKeySecret": "<yourAccessKeySecret>"
        }
    }
  • getVideoUploadAuth: obtains the credential for uploading a video based on the information about the video, such as the title and name of the video.

    get url: /demo/getVideoUploadAuth

    Request parameters
    Parameter Type Required Description
    title string Yes The title of the video. The value can be up to 128 bytes in length and must be encoded in the UTF-8 format.
    fileName string Yes The name of the source video file. The file name must contain an extension, which is not case-sensitive. For more information about the supported file name extensions, see the media upload overview topic in the Developer Guide.
    fileSize string No The size of the video. Unit: bytes.
    description string No The description of the video.
    coverURL string No The URL of the custom video thumbnail.
    tags string No The tags of the video. Separate multiple tags with commas (,).
    Response parameters
    Parameter Type Description
    videoId string The ID of the video.
    uploadAddress string The upload URL.
    uploadAuth string The upload credential.
    Sample response
    {
        "result": "true",
        "requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aad****",
        "message": "",
        "code": "200",
        "data": {
            "videoId": "034813ff97984171a57aefe71c84****",
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2****",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTTQ5L2l6YzdQNlFIMzViNFJpTkw4L1o3dFFOWHdoaWZmb2JIYTlZcmZIZ21OaGx2dkRTajQzdDF5dFZPZVpjWDBha1E1dTdrdTdaSFArb0x0OGphWXZqUDNQRTNyTHBNWUx1NFQ0OFpYVVNPRHREWWNaRFVIaHJFazRSVWpYZEk2T2Y4VXJXU1FDN1dzcjIxN290ZzdGeXlrM3M4TWFIQWtXTFg3U0IyRHdFQjRjNGFFb2tWVzRSeG5lelc2VUJhUkJwYmxkN0JxNmNWNWxPZEJSWm9LK0t6UXJKVFg5RXoycExtdUQ2ZS9MT3M3b0RWSjM3V1p0S3l1aDRZNDlkNFU4clZFalBRcWl5a1QwcEZncGZUSzFSemJQbU5MS205YmFCMjUvelcrUGREZTBkc1Znb0lGS09waUdXRzNSTE5uK3p0Sjl4YmtlRStzS1VsZmJCK1o0NFNRVjJ2SUZUVkZpSUlOd3o5QWMrdS9Mc3RCbksrNy92V0hudDVYUi91UHVncHRjZnVCbzhJNjM3MmJUSzVtQ0E1MGI5Ty9kcHhKM2xQMFIwV2dteWRuQkR4L1NmdTJrS3ZSaHBrUnZ2WWsxQXN3WElqejdoSVoxR2phRFFtaTFlZm81WG1QWEZUUW1uOGw1cEFNbXkvNjB4WHVkdmJIL3U3RVVQSytrQ0dvQUJrcGhERlVGRUtGbEtsaUlFYk9BYk0wUmRGMlNabGw2WklpY0J3VUR3cmxRbGx1MW1XajB6OEZmb0hYeG50aGJZOXV5U0ZzeWYvOEVtWlhzZVR2eXNETldjNEhUNmdnMDZFWStPN2hSOENKN1MrZWNHL0hrVUl2azB6djZrZm5jc0xzZHlwVzVtS09adGdJRDRwbU9KMFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIkdZTlZBbXJBQnE1VVNWWW5YbWI1Qml****"
        }
    }
  • refreshVideoUploadAuth: updates the upload credential.

    get url: /demo/refreshVideoUploadAuth

    Request parameters
    Parameter Type Required Description
    videoId string Yes The ID of the video.
    Response parameters
    Parameter Type Description
    uploadAddress string The upload URL.
    uploadAuth string The upload credential.
    Sample response
    {
        "result": "true",
        "requestId": "efe66931-2a98-4bd9-9c46-e3a92eee****",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1Nz****",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTTQ5L2l6YzdQNlFIMzViNFJpTkw4L1o3dFFOWHdoaWZmb2JIYTlZcmZIZ21OaGx2dkRTajQzdDF5dFZPZVpjWDBha1E1dTdrdTdaSFArb0x0OGphWXZqUDNQRTNyTHBNWUx1NFQ0OFpYVVNPRHREWWNaRFVIaHJFazRSVWpYZEk2T2Y4VXJXU1FDN1dzcjIxN290ZzdGeXlrM3M4TWFIQWtXTFg3U0IyRHdFQjRjNGFFb2tWVzRSeG5lelc2VUJhUkJwYmxkN0JxNmNWNWxPZEJSWm9LK0t6UXJKVFg5RXoycExtdUQ2ZS9MT3M3b0RWSjM3V1p0S3l1aDRZNDlkNFU4clZFalBRcWl5a1QwcEZncGZUSzFSemJQbU5MS205YmFCMjUvelcrUGREZTBkc1Znb0lGS09waUdXRzNSTE5uK3p0Sjl4YmtlRStzS1VsZmJCK1o0NFNRVjJ2SUZUVkZpSUlOd3o5QWMrdS9Mc3RCbksrNy92V0hudDVYUi91UHVncHRjZnVCbzhJNjM3MmJUSzVtQ0E1MGI5Ty9kcHhKM2xQMFIwV2dteWRuQkR4L1NmdTJrS3ZSaHBrUnZ2WWsxQXN3WElqejdoSVoxR2phRFFtaTFlZm81WG1QWEZUUW1uOGw1cEFNbXkvNjB4WHVkdmJIL3U3RVVQSytrQ0dvQUJrcGhERlVGRUtGbEtsaUlFYk9BYk0wUmRGMlNabGw2WklpY0J3VUR3cmxRbGx1MW1XajB6OEZmb0hYeG50aGJZOXV5U0ZzeWYvOEVtWlhzZVR2eXNETldjNEhUNmdnMDZFWStPN2hSOENKN1MrZWNHL0hrVUl2azB6djZrZm5jc0xzZHlwVzVtS09adGdJRDRwbU9KMFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI****"
        }
    }
  • getVideoPlayAuth: obtains the credential for playing a video.

    get url: /demo/getVideoPlayAuth

    Request parameters
    Parameter Type Required Description
    videoId string Yes The ID of the video.
    Response parameters
    Parameter Type Description
    coverURL string The URL of the video thumbnail.
    duration string The size of the video.
    videoId string The ID of the video.
    playAuth string The playback credential.
    Sample response
    {
        "result": "true",
        "requestId": "b766e688-1fee-4635-9ed8-e86529d8****",
        "message": "",
        "code": "200",
        "data": {
            // Sample coverURL: https://example.aliyundoc.com/5ef00e3c0ef24547a6dcff851be0****/snapshots/a02dfc16dfab48a6ae27529edc906cd7-0****.jpg
            "coverURL": "<your coverURL>",
            "duration": "10.4167",
            "videoId": "5ef00e3c0ef24547a6dcff851be0****",
            "playAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzN3SjFxNkZ0NUIyeWZTaklyNG41SDhueGhvd1MrN2UvTkczNm9EZzJTczF1bUpidWxqejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2Nsck1xRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcExGc3QySjZyOEpqc1ZHeEpkTDVsdXBzdlhKYXNEVkVma3VFNVhFTWlJNS8wMGU2TC8rY2lyWVhEN0JHSmFWaUpsaFE4MEtWdzJqRjFSdkQ4dFhJUTBRazYxOUszemRaOW1nTGlidWkzdnhDa1J2MkhCaWptOHR4cW1qL015UTV4MzFpMXYweStCM3dZSHRPY3FjYThCOU1ZMVdUc3Uxdm9oemFyR1Q2Q3BaK2psTStxQVU2cWxZNG1YcnM5cUhFa0ZOd0JpWFNaMjJsT2RpTndoa2ZLTTNOcmRacGZ6bjc1MUN0L2ZVaXA3OHhtUW1YNGdYY1Z5R0d0RHhrWk9aUXJ6emJZN1RT2xiK0cvWGFqUHBxajRBSjVsSHA3TWVNR1YrRGVMeVF5aDBFSWFVN2EwNDRxTDZvYnQ4WG1zUWFnQUVyWk03Z3BsL2hta01MM0d1WW5pK1RValZDdlF0bTdiOGpRZEJUN3pmZGxIV0RJa282REZ6T3VWckFLMDRSWjgxTkJEOG1wbWp6a0Q4RXozWVVQcWJkVmNOZGJzWVBKS1kyTnMyNDZRc2Q3U01STi9uR3h2NDJMU2xnejJyVytEa3E5UWYrYnJ5RklNUFNIWWNkY3o2QlZVN3diVWRuOHRXWmd5dUs1UlFtNGc9PSIsIkF1dGhJbmZvIjoie1wiQ2FsbGVyXCI6XCJQZG93YUpCVnMzSm9ySXBRMmNqS1JTNFo3cGRyZHFHeXBTUWVFMXZ6V05vPVxcclxcblwiLFwiRXhwaXJlVGltZVwiOlwiMjAxOS0wMS0xNlQwODo0NTo1M1pcIixcIk1lZGlhSWRcIjpcIjVlZjAwZTNjMGVmMjQ1NDdhNmRjZmY4NTFiZTBiNmFiXCIsXCJQbGF5RG9tYWluXCI6XCJhbGl2Yy1kZW1vLXZvZC5hbGl5dW5jcy5jb21cIixcIlNpZ25hdHVyZVwiOlwiNTZvRVJoRHBKbXZXQ0xaSUlvb1A3MFozQXFNPVwifSIsIlZpZGVvTWV0YSI6eyJTdGF0dXMiOiJOb3JtYWwiLCJWaWRlb0lkIjoiNWVmMDBlM2MwZWYyNDU0N2E2ZGNmZjg1MWJlMGXVuY3MuY29tLzVlZjAwZTNjMGVmMjQ1NDdhNmRjZmY4NTFiZTBiNmFiL3NuYXBzaG90cy9hMDJkZmMxNmRmYWI0OGE2YWUyNzUyOWVkYzkwNmNkNy0wMDAwMi5qcGciLCJEdXJhdGlvbiI6MTAuNDE2N30sIkFjY2Vzc0tleUlkIjoiU1RTLk5KTFRzRWtTM0x1VDZLS0Q4Y0ZCQndTRXQiLCJQ****"
        }
    }
  • getImageUploadAuth: obtains the credential for uploading an image based on the information about the image, such as the type of the image.

    get url: /demo/getImageUploadAuth

    Request parameters
    Parameter Type Required Description
    imageType string Yes The type of the image. Valid values:
    • default
    • cover
    imageExt string No The file name extension of the image. Default value: png.
    title string No The title of the image.
    tags string No The tags of the image. Separate multiple tags with commas (,).
    Response parameters
    Parameter Type Description
    uploadAddress string The upload URL.
    uploadAuth string The upload credential.
    imageURL string The URL of the image.
    imageId string The ID of the image.
    Sample response
    {
        "result": "true",
        "requestId": "c9fc9bf0-b172-441c-9624-2b700204****",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJpbWFnZS9jb3Zlci84RUI3MDMxODhG****",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUVljejU5WnNtSjI4V2Y3d2FmK0FVQkxHQ1RtZDVNQVlvOWJUY1RHbFFDWnVXLy90b0pWN2I5TVJjeENsWkQ1ZGZybC9MUmRqcjhsbzF4R3pVUEcyS1V6U24zYjNCa2hsc1JZZTcyUms4dmFIeGRhQXpSRGNnVmJtcUpjU3ZKK2pDNEM4WXM5Z0c1MTlYdHlwdm9weGJiR1Q4Q05aNXo5QTlxcDlrTTQ5L2l6YzdQNlFIMzViNFJpTkw4L1o3dFFOWHdoaWZmb2JIYTlZcmZIZ21OaGx2dkRTajQzdDF5dFZPZVpjWDBha1E1dTdrdTdaSFArb0x0OGphWXZqUDNQRTNyTHBNWUx1NFQ0OFpYVVNPRHREWWNaRFVIaHJFazRSVWpYZEk2T2Y4VXJXU1FDN1dzcjIxN290ZzdGeXlrM3M4TWFIQWtXTFg3U0IyRHdFQjRjNGFFb2tWVzRSeG5lelc2VUJhUkJwYmxkN0JxNmNWNWxPZEJSWm9LK0t6UXJKVFg5RXoycExtdUQ2ZS9MT3M3b0RWSjM3V1p0S3l1aDRZNDlkNFU4clZFalBRcWl5a1Qwa0ZncGZUSzFSemJQbU5MS205YmFCMjUvelcrSUlOd3o5QWMrdS9Mc3RCbksrNy92V0hudC8yOHg5ZFNmdmFzM3NCVTBMNmI4M3JYTjVHV0c1Q0xPT3BOVXdwbUhCRGRkSmoyc1lHRjh6ZnlvZ1hZS21nc01pV25jT1d4RXNnL09qVGZwSnBWS2o2eldtUzhmWHZsSjVjM2NTaWE5K0Z0bkJlbUE2cTB3UmZoWWUrUkRRbWtjWTdMYU1CV01Hb0FCRDlpdzM2ZENFcmJMUFRUb3JaYi9lL0NYQW12YjdVWHFySTZWNHFNWmJLYk1WMzU1ZWR4Ni9WM21kd0p0VHdOMHF5NXFNTFFvSXdZem56bmZkaFZ4U0ZObVA2aFVlU204Q1ZkSUJMUVFwaWZxR2hyVDJRTEtadVVxTHplRDBqU01FUllnclNZRGo3cVRJUUM1aVZ5T2l3K0dORGxscmlUREwvV1BXQkVMSVFBPSIsIkFjY2Vzc0tleUlkIjoiU1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVEN****",
            "imageId": "76ac9d24882544e7a2b94758d34b****",
            // Sample imageURL: https://exampleBucket****.oss-cn-shanghai.aliyun.com/image/cover/8EB703188F9D4920B6E3A1DDDB797B****.jpg?Expires=154598****&OSSAccessKeyId=********&Signature=cb6kwDuABBH%2FUDk7qviXy0MC2mE%****
            "imageURL": "<your image URL>"
        
    }
    }

API operations for user management

  • login: logs a user on to the short video AppServer.

    get url: /user/login

    Request parameters
    Parameter Type Required Description
    username string Yes The username.
    password string Yes The password.
    Response parameters
    Parameter Type Description
    token string The token that is used to access the short video service.
    Sample response
    {
        "result": "true",
        "code": "200",
        "requestId": "ad5ce518-aafd-47ef-bd42-36a809a1****",
        "message": null,
        "data": {}
    }
    }
  • register: registers a user.

    get url: /user/register

    Request parameters
    Parameter Type Required Description
    username string Yes The username.
    password string Yes The password.
    Sample response
    {
        "result": "true",
        "code": "200",
        "requestId": "ad5ce518-aafd-47ef-bd42-36a809a1****",
        "message": null,
        "data": {}
    }
    }
  • updateUser: modifies the username of a user.

    post url: /user/updateUser

    Request parameters
    Parameter Type Required Description
    token 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.
    userId string Yes The user ID.
    nickname string Yes The nickname of the user.
    Sample response
    {
        "result": "true",
        "code": "200",
        "requestId": "ad5ce518-aafd-47ef-bd42-36a809a1****",
        "message": null,
        "data": {}
    }
    }
  • randomUser: generates a random user. The following information is provided: the ID, nickname, and profile picture of the user, the access token, the ingest URL, and the streaming URLs in the Flash Video (FLV) and HTTP Live Streaming (HLS) formats.

    get url: /user/randomUser

    Response parameters
    Parameter Type Description
    userId string The user ID.
    token string The token that is used to access the short video service.
    nickName string The nickname of the user.
    avatar string The profile picture of the user.
    gmtCreate string The time when the user was created.
    gmtModified string The time when the user information was modified.
    Sample response
    {
        "result": "true",
        "requestId": "d5b1f423-0186-41d0-bf20-98606472****",
        "message": null,
        "data": {
            "id": "37",
            "userId": "243124930****",
            "token": "234fwef23-fsdf4f7-ahjktghsrt65ujs87rukmsls****",
            "nickName": "8313e974-f6a8-4527-af6e-8b4c3a4f1****",
            "gmtCreate": "2018-11-16 15:40:18",
            "gmtModified": ""
        }
    }

API operations for video management

  • videoPublish: uploads a video to the short video AppServer. Then, you can view the uploaded video in the personal center.

    post url: /vod/videoPublish

    Request parameters
    Parameter Type Required Description
    token 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.
    description string No The description of the video.
    duration float No The duration of the video. Unit: seconds.
    coverUrl string No The URL of the video thumbnail.
    size int No The size of the source video file. Unit: bytes.
    tags string No The tags of the video. Separate multiple tags with commas (,).
    cateId int No The category ID of the video.
    cateName string No The category name of the video.
    Sample response
    {
        "result": "true",
        "code": "200",
        "requestId": "ad5ce518-aafd-47ef-bd42-36a809a1****",
        "message": null,
        "data": {}
    }
    }
  • getRecommendVideoList: queries the recommended videos.

    get url: /vod/getRecommendVideoList

    Request parameters
    Parameter Type Required Description
    token 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 Yes The number of the page to return.
    pageSize int Yes The number of data entries to return on each page.
    Response parameters
    Parameter Type Description
    total string The total number of entries returned.
    videoList List<Video> The information about the recommended videos.
    Sample response
    {
        "result": "true",
        "requestId": "27596e99-0083-4701-80b5-90969f55****",
        "message": "",
        "code": "200",
        "data": {
            "total": 59,
            "videoList": [{
                "id": "110",
                "videoId": "a34f34e0fc744d00a5269e8a7c****",
                "title": "Hot air balloon",
                "description": "Hot air balloon",
                "duration": 7,
                // Sample coverURL: https://example.aliyundoc.com/a34f34e0fc744d00a5269e8a7c6a****/snapshots/0c3a4b0e8f37494f83202d6e6bb83ecc-0****.jpg
                "coverUrl": "<your cover URL>",
                "creationTime": "",
                "status": "1",
                "firstFrameUrl": "https://example.aliyundoc.com/a34f34e0fc744d00a5269e8a7****/snapshots/0c3a4b0e8f37494f83202d6e6bb****.jpg",
                "size": 389938,
                "cateId": 1,
                "cateName": "Recommended list",
                "tags": "Hot air balloon",
                "shareUrl": "",
                "user": {
                    "userId": "2435470766044",
                    "userName": "",
                    "avatarUrl": ""
                },
                "transcodeStatus": "",
                "snapshotStatus": "",
                "censorStatus": "",
                "narrowTranscodeStatus": "",
                // Sample fileURL: https://example.aliyundoc.com/a34f34e0fc744d00a5269e8a7c6a****/02528a756dd04693dc3c44d68b1bcf28-fd****.mp4
                "fileUrl": "<your file URL>"
            },
            {
                "id": "109",
                "videoId": "febc0388fab9491d8199bdad1958b756",
                "title": "Beach chair",
                "description": "Beach chair",
                "duration": 16,
                "coverUrl": "https://example.aliyundoc.com/febc0388fab9491d8199****/snapshots/6b6ad9bfc80d4bc49f96e6111cbffd02-00002.jpg",
                "creationTime": "",
                "status": "1",
                "firstFrameUrl": "https://example.aliyundoc.com/febc0388fab9491d8199bda****/snapshots/6b6ad9bfc80d4bc49f96e6111cbffd02-00002.jpg",
                "size": 2763135,
                "cateId": 1,
                "cateName": "Recommended list",
                "tags": "Beach chair",
                "shareUrl": "",
                "user": {
                    "userId": "243547076****",
                    "userName": "",
                    "avatarUrl": ""
                },
                "transcodeStatus": "",
                "snapshotStatus": "",
                "censorStatus": "",
                "narrowTranscodeStatus": "",
                "fileUrl": "https://example.aliyundoc.com/a34f34e0fc744d00a5269e8a7****/02528a756dd04693dc3c44d68b1bcf****.mp4"
            }]
        }
    }
  • getPersonalVideoList: queries videos in the personal center.

    get url: /vod/getPersonalVideoList

    Request parameters
    Parameter Type Required Description
    token 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 Yes The number of the page to return. Pages start from page 1.
    pageSize int Yes The number of data entries to return on each page.
    Response parameters
    Parameter Type Description
    total string The total number of entries returned.
    videoList List<Video> The information about the videos in the personal center.
    Sample response
    {
        "result": "true",
        "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56****",
        "message": "",
        "code": "200",
        "data": {
            "total": 7,
            "videoList": [{
                "id": "25",
                "videoId": "23rfewc23",
                "title": "test video",
                "description": "test33",
                "duration": 12,
                "coverUrl": "https://example.aliyundoc.com/image9sfsa0-dfco****.png",
                "creationTime": "2019-01-09 22:11:29.0",
                "status": "",
                "firstFrameUrl": "",
                "size": 56,
                "cateId": 12,
                "cateName": "12",
                "tags" : "Test",
                "shareUrl": "",
                "user": {
                    "userId": "243479322****",
                    "userName": "xx",
                    "avatarUrl": "https://example.aliyundoc.com/dd38cab5-2951-43a0-b9ed-ad0eebf8****"
                },
                "transcodeStatus": "",
                "snapshotStatus": "",
                "censorStatus": "onCensor",
                "narrowTranscodeStatus": ""
            }]
        }
    }
  • deleteVideoById: deletes a video.

    post url: /vod/deleteVideoById

    Request parameters
    Parameter Type Required Description
    token 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 user ID.
    Sample response
    {
        "result": "true",
        "requestId": "f8163b40-6192-4edc-97ec-52c6cd96****",
        "message": "Deletion completed",
        "code": "200",
        "data": null
    }

Callback management

ApsaraVideo VOD allows you to configure callbacks to perform related operations upon the completion of automated review, video transcoding, and snapshot capture.

To make sure that the AppServer can properly receive request headers returned by the console, you must configure the callback URLs in the console, and specify the callback function on the AppServer after you submit automated review, video transcoding, and snapshot capture jobs. The following tables describe the common callback parameters and event types.

Parameter Type Description
EventTime string The time when the event occurs. The time is displayed in the yyyy-MM-ddTHH:mm:ssZ format and in UTC.
EventType string The event type.
VideoId string The ID of the video.
Status string The result of the event. Valid values:
  • success
  • fail

EventType

Event type EventType
StreamTranscodeComplete The video in a single definition is transcoded.
SnapshotComplete The snapshot is captured.
AIVideoCensorComplete The automated review is complete.

After an event is complete, a data request is sent to the callback URL. The AppServer updates the database based on the request.

Music management

  • getRecommendMusic: queries popular songs.

    get url: /music/getRecommendMusic

    Request parameters
    Parameter Type Required Description
    pageNo string Yes The number of the page to return. Valid values: 1 to 50.
    pageSize string Yes The number of entries to return on each page. Valid values: 1 to 50.
    Response parameters
    Parameter Type Description
    total string The total number of entries returned.
    musicList List<MusicInfo> The information about the popular songs.

    MusicInfo

    Parameter Type Description
    musicId string The unique ID of the song.
    title string The display name of the song.
    artistName string The artist of the song.
    duration string The duration of the song.
    source string The service provider of the song. Songs can be obtained only from Taihe Music Group.
    Sample response
    {
        "result": "true",
        "requestId": "56a393dc-b1f9-4641-b998-6a7ff40d****",
        "message": "",
        "code": "200",
        "data": {
            "musicList": [{
                "musicId": "T10033153675",
                "title": "Superinduction",
                "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: queries the playback URL of a song based on the ID of the song.

    get url: /music/getPlayPath

    Request parameters
    Parameter Type Required Description
    musicId string Yes The ID of the song.
    Response parameters
    Parameter Type Description
    playPath string The playback URL of the song.
    expireTime string The validity period.
    Sample response
    {
        "result": "true",
        "requestId": "56a393dc-b1f9-4641-b998-6a7ff40d****",
        "message": "",
        "code": "200",
        "data": {
            "playPath": "https://example.aliyundoc.com/117_15_T10033153675_64_4_1_0_sdk-ts/0105/M00/B2/F4/ChR45VnaKfaAK01QABrJJdrL4Yk.64.aac?xcode=af09abf9f9e26b64416****",
            "expireTime": "1551772473"
        }
    }

Resource management

  • getPasterInfo: queries the information about an animated image.

    get url: /resource/getPasterInfo

    Response parameters
    Parameter Type Description
    id int The ID of the category to which the animated image belongs.
    icon string The icon of the animated image.
    description string The description of the animated image.
    level int The level of the animated image.
    name string The name of the animated image.
    preview string The preview of the animated image.
    sort int The ordinal number of the animated image.
    type int The type of the animated image.
    createTime string The time when the animated image was created.
    Sample response
    {
        "result": "true",
        "requestId": "cc52d16b-3c1d-4694-abf1-c0633dda****",
        "message": "",
        "code": "200",
        "data": [{
            "id": 84,
            "icon": "http://example.aliyundoc.com/image/default/85157CBE88A14CBC95C52****.png",
            "description": "Valentine's Day",
            "name": "The most beautiful Valentine's Day",
            "level": 1,
            "preview": "http://192.168.0.0:8080/?id=84",
            "sort": 46,
            "type": 1,
            "createTime": "2019-03-19 14:32:38.0"
        },
        {
            "id": 108,
            "icon": "http://example.aliyundoc.com/image/default/44F675192F144BDA9B2A32****.png",
            "description": "New Year material",
            "name": "Happy 2017 Chinese New Year 2",
            "level": 1,
            "preview": "http://192.168.0.0:8080/?id=108",
            "sort": 45,
            "type": 1,
            "createTime": "2019-03-19 14:32:18.0"
        }]
    }
  • getPasterList: queries packages of animated images based on the ID of the category to which the animated image belongs.

    get url: /resource/getPasterList

    Request parameters
    Parameter Type Required Description
    pasterId string Yes The ID of the category to which the animated image belongs.
    type string Yes The type of the animated image. Valid values:
    • 1: animated images captured by front cameras
    • 2: animated images captured by rear cameras
    Response parameters
    Parameter Type Description
    id string The ID of the category to which the animated image belongs.
    fontId int The ID of the font.
    icon string The icon of the animated image.
    name string The name of the animated image.
    url string The download URL of the animated image.
    preview string The preview of the animated image.
    sort int The ordinal number of the animated image.
    type int The type of the animated image.
    createTime string The time when the animated image was created.
    Sample response
    {
        "result": "true",
        "requestId": "395f0d19-7f3d-4df3-ac56-e7715e4f****",
        "message": "",
        "code": "200",
        "data": [{
            "id": 1083,
            "icon": "http://example.aliyundoc.com/image/default/145F371646EB4CA59****6C43F0EA9E-6-2.jpg",
            "url": "http://example.aliyundoc.com/video/material/9862890CE93C4248B****F2C96E4289-7-4.mat",
            "preview": "http://example.aliyundoc.com/image/default/12044FD09B6C43****925952F526F2-6-2.gif",
            "name": "bianpao",
            "sort": 0,
            "type": 0,
            "fontId": 0,
            "createTime": "2019-03-19 14:32:18.0"
        },
        {
            "id": 1092,
            "icon": "http://example.aliyundoc.com/image/default/F78BDD275CE84186A6****ED-6-2.jpg",
            "url": "http://example.aliyundoc.com/video/material/ABE3DAE450C3482894****8C82283-7-4.mat",
            "preview": "http://example.aliyundoc.aliyundoc.com/image/default/4154C****A4B4191A58357F1C403C6-6-2.gif",
            "name": "zhaofudamo",
            "sort": 0,
            "type": 0,
            "fontId": 0,
            "createTime": "2019-03-19 14:32:19.0"
        }]
    }
  • getFrontPasterList: queries packages of animated images captured by front cameras.

    get url: /resource/getFrontPasterList

    Response parameters
    Parameter Type Description
    id int The ID of the category to which the animated image belongs.
    fontId string The ID of the font.
    icon string The icon of the animated image.
    name string The name of the animated image.
    url string The download URL of the animated image.
    preview string The preview of the animated image.
    sort string The ordinal number of the animated image.
    type string The type of the animated image.
    createTime string The time when the animated image was created.
    Sample response
    {
        "result": "true",
        "requestId": "0423771c-ad6b-4557-9ef1-ce71fcb0****",
        "message": "",
        "code": "200",
        "data": [{
            "id": 5871,
            "icon": "http://example.aliyundoc.com/image/default/EFA0567FF6CE4E6D866A25D909DE05C3-6-2.jpg",
            "mediaId": 0,
            "url": "http://example.aliyundoc.com/video/material/BD74BC09CB3341169F319727340B78CF-7-4.mat",
            "preview": "http://example.aliyundoc.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://example.aliyundoc.com/image/default/497006AE17DB46FA9DAFE6B5405D9576-6-2.jpg",
            "mediaId": 0,
            "url": "http://example.aliyundoc.com/video/material/7E3079293ACE44A48271E1D6CB07D217-7-4.mat",
            "preview": "http://example.aliyundoc.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://example.aliyundoc.com/image/default/CB1BB92B7BCB44E285****26C96D0109-6-2.jpg",
            "mediaId": 0,
            "url": "http://example.aliyundoc.com/video/material/A5EBA7E610D84265B4****64EFD89C4-7-4.mat",
            "preview": "http://example.aliyundoc.com/image/default/E1BF246F042A4A3****41673316BD7-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: queries the information about a caption box.

    get rul: /resource/getTextPaster

    Response parameters
    Parameter Type Description
    id int The ID of the category to which the caption box belongs.
    icon string The icon of the caption box.
    description string The description of the caption box.
    name string The name of the caption box.
    preview string The preview of the caption box.
    sort int The ordinal number of the caption box.
    type int The type of the caption box.
    createTime string The time when the caption box was created.
    Sample response
    {
        "result": "true",
        "requestId": "23b4de5e-0b89-40f0-b78c-d4122537****",
        "message": "",
        "code": "200",
        "data": [{
            "id": 189,
            "icon": "http://example.aliyundoc.com/image/default/BB11DAF8ED0842408A4****09893D454-6-2.png",
            "description": "Text bubble",
            "name": "Text bubble",
            "preview": "http://192.168.0.0:8080/?type=text&id=189",
            "sort": 3,
            "type": 2,
            "createTime": "2019-03-19 14:21:58.0"
        },
        {
            "id": 196,
            "icon": "http://example.aliyundoc.com/image/default/7858EDE1DCD8457E9746****2FB9845D-6-2.png",
            "description": "Simple text bubble",
            "name": "Simple bubble",
            "preview": "http://192.168.0.0:8080/?type=text&id=196",
            "sort": 2,
            "type": 2,
            "createTime": "2019-03-19 14:21:42.0"
        }]
    }
  • getTextPasterList: queries caption box packages based on the ID of the category to which the caption box belongs.

    get url: /resource/getTextPasterList

    Request parameters
    Parameter Type Required Description
    textPasterId String Yes The ID of the category to which the caption box belongs.
    Response parameters
    Parameter Type Description
    id int The ID of the caption box package.
    fontId int The ID of the font.
    icon string The icon of the caption box.
    name string The name of the caption box.
    url string The download URL of the caption box.
    preview string The preview of the caption box.
    sort int The ordinal number of the caption box.
    type int The type of the caption box.
    createTime string The time when the caption box was created.
    Sample response
    {
        "result": "true",
        "requestId": "49ec9fc0-d2e2-4702-afe3-a1fadda7****",
        "message": "",
        "code": "200",
        "data": [{
            "id": 963,
            "icon": "http://example.aliyundoc.com/image/default/4326259B143E4D5EB97****021608D-6-2.jpg",
            "mediaId": 1849,
            "url": "http://example.aliyundoc.com/video/material/599ED868D7DC405BB3E****FCFEF576-7-4.mat",
            "preview": "http://example.aliyundoc.com/image/default/B43F76D23D58401C****90AD3C623BAC-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://example.aliyundoc.com/image/default/1148257C961547848****5B860B340-6-2.jpg",
            "mediaId": 1862,
            "url": "http://example.aliyundoc.com/video/material/15CD1557EAAC49B1B****C30236A657-7-4.mat",
            "preview": "http://example.aliyundoc.com/image/default/79DB242DD30446****DC74EAC3384271-6-2.gif",
            "name": "yajing",
            "duration": 0,
            "desc": "",
            "sort": 0,
            "type": 0,
            "fontId": 89,
            "createTime": "2019-03-19 14:21:43.0"
        }]
    }
  • getMv: queries the information about a music video (MV).

    get url: /resource/getMv

    Response parameters
    Parameter Type Description
    id int The MV ID.
    icon string The icon of the MV.
    duration string The duration of the MV.
    name string The name of the MV.
    previewPic string The preview image of the MV.
    previewMp4 string The playback URL the MV.
    sort int The ordinal number of the MV.
    createTime string The time when the MV was created.
    aspectList List<Aspect> The MV list.
    Aspect
    Parameter Type Description
    aspect string The aspect ratio of the MV.
    • 1:1
    • 4:3
    • 16:9
    download string The download link of the MV.
    Sample response
    {
        "result": "true",
        "requestId": "3dae0e53-39ff-4376-bc8d-e94c3380****",
        "message": "",
        "code": "200",
        "data": [{
            "id": 104,
            "previewPic": "http://example.aliyundoc.com/image/default/FB35E16CC72C4B85****EB8034947-6-2.png",
            "previewMp4": "http://example.aliyundoc.com/video/material/EC8C09EB055248B****D8803D08D4D16-7-4.mp4",
            "icon": "http://example.aliyundoc.com/image/default/DFB64DE1892B4DEAA34F04****5AE81-6-2.png",
            "duration": 15,
            "name": "relax",
            "sort": 8,
            "createTime": "2019-03-19 14:21:21.0",
            "aspectList": [{
                "aspect": 1,
                "download": "http://example.aliyundoc.com/video/material/14FF3D3297CF44****160C5F191752-7-4.mat"
            },
            {
                "aspect": 2,
                "download": "http://example.aliyundoc.com/video/material/53CC516C4B34A4****B13A093CABCCE-7-4.mat"
            },
            {
                "aspect": 3,
                "download": "http://example.aliyundoc.com/video/material/CB7444406A0B442****897EFF6E40B8B-7-4.mat"
            }]
        }]
    }

Font management

getFont: queries the information about a font based on the font ID.

get url: /resource/getFont

Request parameters
Parameter Type Required Description
fontId string No The ID of the font. If you leave this parameter empty, all fonts are returned.
Response parameters
Parameter Type Description
id int The ID of the font.
banner string The banner of the font.
name string The name of the font.
url string The download URL of the font.
icon string The icon of the font.
sort int The ordinal number of the font.
Sample response
{
    "result": "true",
    "requestId": "b9c72eb4-9d42-4fda-934c-23c60493****",
    "message": "",
    "code": "200",
    "data": {
        "id": 52,
        "name": "Vision",
        "banner": "http://example.aliyundoc.com/image/default/BD4E71CE64404301****7A79AC51-6-2.jpg",
        "icon": "http://example.aliyundoc.com/image/default/C1F83D29D3B64C3C48****BDEF3B08F-6-2.jpg",
        "url": "http://example.aliyundoc.com/video/material/B12F02D94A184481A4****ECFCD8C0D-7-4.mat",
        "sort": 1
    }
}