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 callbacks.

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.

Credential management (with access tokens)

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

    GET request 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 expiration time of the upload credential. The validity period of upload credentials is 3,000 seconds. You must refresh the upload credentials after they expire.
    accessKeyId string The AccessKey ID.
    accessKeySecret string The AccessKey secret.
    securityToken string The STS token.
    Sample success responses
    {
        "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: 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 request 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: byte.
    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 success responses
    {
        "result": "true",
        "requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aadxxxx",
        "message": "",
        "code": "200",
        "data": {
            "videoId": "034813ff97984171a57aefe71c84xxxx",
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJUY1RHbF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NVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM2MDAiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
        }
    }
  • refreshVideoUploadAuth: refreshes the credential for uploading a video.

    GET request 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 success responses
    {
        "result": "true",
        "requestId": "efe66931-2a98-4bd9-9c46-e3a92eeexxxx",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS5tcDQifQ==",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzBBUjFxNkZ0NUIyeWZTaklyNGorR3RQZ283eDBnNWFxVVZQQnZuQmpYZjFvdXZMSWhUejJJSGxQZTNGaEFPb2V2L2svbVc5VTdmb2NsclVxRXNjZUhCQ1lNSkFyc3M0SnFsUC9KcGZadjh1ODRZQURpNUNqUWJkVjJlbHNtSjI4V2Y3d2FmK0FVQlhHQ1RtZDVNTVlvOWJ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MFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM1NDEiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
        }
    }
  • 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 request URL: /vod/getImageUploadAuth

    Requests 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 success responses
    {
        "result": "true",
        "requestId": "c9fc9bf0-b172-441c-9624-2b700204xxxx",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJpbWFnZS9jb3Zlci84RUI3MDMxODhGOUQ0OTIwQjZFM0ExREREQjc5N0I1MC02LTIuanBnIn0=",
            "uploadAuth": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzB3UjFxNkZ0NUIyeWZTaklyNG4rUHNEdHF1a1pnSWl2TUczcHNWSUVQOHRJM29uamhUejJJSGxQZTNGaEFP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WMzU1ZWR4Ni9WM21kd0p0VHdOMHF5NXFNTFFvSXdZem56bmZkaFZ4U0ZObVA2aFVlU204Q1ZkSUJMUVFwaWZxR2hyVDJRTEtadVVxTHplRDBqU01FUllnclNZRGo3cVRJUUM1aVZ5T2l3K0dORGxscmlUREwvV1BXQkVMSVFBPSIsIkFjY2Vzc0tleUlkIjoiU1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVENUaW1lIjoiMjAxOC0xMi0yOFQwODo0OTozNFoiLCJBY2Nlc3NLZXlTZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV4cGlyYXRpb24iOiIzNTY2IiwiUmVnaW9uIjoiY24tc2hhbmdoYWkifQ==",
            "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"
        }
    }

Credential management (without access tokens)

  • getSts: obtains an STS token.

    GET request URL: /demo/getSts

    Response parameters
    Parameter Type Description
    Expiration string The expiration time of the upload credential. The validity period of upload credentials is 3,000 seconds. You must refresh the upload credentials after they expire.
    accessKeyId string The AccessKey ID.
    accessKeySecret string The AccessKey secret.
    securityToken string The STS token.
    Sample success responses
    {
        "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: obtains the credential for uploading a video based on the information about the video, such as the title and name of the video.

    GET request 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: byte.
    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 success responses
    {
        "result": "true",
        "requestId": "1490ee0b-3660-4d4c-be1b-9e1d4aadxxxx",
        "message": "",
        "code": "200",
        "data": {
            "videoId": "034813ff97984171a57aefe71c84xxxx",
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy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mdTJrS3ZSaHBrUnZ2WWsxQXN3WElqejdoSVoxR2phRFFtaTFlZm81WG1QWEZUUW1uOGw1cEFNbXkvNjB4WHVkdmJIL3U3RVVQSytrQ0dvQUJrcGhERlVGRUtGbEtsaUlFYk9BYk0wUmRGMlNabGw2WklpY0J3VUR3cmxRbGx1MW1XajB6OEZmb0hYeG50aGJZOXV5U0ZzeWYvOEVtWlhzZVR2eXNETldjNEhUNmdnMDZFWStPN2hSOENKN1MrZWNHL0hrVUl2azB6djZrZm5jc0xzZHlwVzVtS09adGdJRDRwbU9KMFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM2MDAiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
        }
    }
  • refreshVideoUploadAuth: refreshes the credential for uploading a video.

    GET request 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 success responses
    {
        "result": "true",
        "requestId": "efe66931-2a98-4bd9-9c46-e3a92eeexxxx",
        "message": "",
        "code": "200",
        "data": {
            "uploadAddress": "eyJFbmRwb2ludCI6Imh0dHBzOi8vb3NzLWNuLXNoYW5naGFpLmFsaXl1bmNzLmNvbSIsIkJ1Y2tldCI6Im91dGluLTEyZWJlMDFmMDI5ZDExZTliNjMzMDAxNjNlMWM4ZGJhIiwiRmlsZU5hbWUiOiJzdi8yYzc1NzhkNy0xNjdmM2I3YTg4NS8yYzc1NzhkNy0xNjdmM2I3YTg4NS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aTFlZm81WG1QWEZUUW1uOGw1cEFNbXkvNjB4WHVkdmJIL3U3RVVQSytrQ0dvQUJrcGhERlVGRUtGbEtsaUlFYk9BYk0wUmRGMlNabGw2WklpY0J3VUR3cmxRbGx1MW1XajB6OEZmb0hYeG50aGJZOXV5U0ZzeWYvOEVtWlhzZVR2eXNETldjNEhUNmdnMDZFWStPN2hSOENKN1MrZWNHL0hrVUl2azB6djZrZm5jc0xzZHlwVzVtS09adGdJRDRwbU9KMFdNWHZNVkN4dXVlNUw5dDlMTmM5RTQ9IiwiQWNjZXNzS2V5SWQiOiJTVFMuTktLUWlUTmNVNFRBU3VwWnA2UXJEVTdjZyIsIkV4cGlyZVVUQ1RpbWUiOiIyMDE4LTEyLTI4VDA4OjI5OjE5WiIsIkFjY2Vzc0tleVNlY3JldCI6IkdZTlZBbXJBQnE1VVNWWW5YbWI1QmlVeEZvQ2ZVYXpTQUw0dTRaMzFDRDVSIiwiRXhwaXJhdGlvbiI6IjM1NDEiLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSJ9"
        }
    }
  • getVideoPlayAuth: obtains the credential for playing a video.

    GET request 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 success responses
    {
        "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": "eyJTZWN1cml0eVRva2VuIjoiQ0FJUzN3SjFxNkZ0NUIyeWZTaklyNG41SDhueGhvd1MrN2UvTkczNm9EZzJTczF1bUpidWxqejJJSGxQZTN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vLXZvZC5hbGl5dW5jcy5jb21cIixcIlNpZ25hdHVyZVwiOlwiNTZvRVJoRHBKbXZXQ0xaSUlvb1A3MFozQXFNPVwifSIsIlZpZGVvTWV0YSI6eyJTdGF0dXMiOiJOb3JtYWwiLCJWaWRlb0lkIjoiNWVmMDBlM2MwZWYyNDU0N2E2ZGNmZjg1MWJlMGI2YWIiLCJUaXRsZSI6IuWknOaZrzIiLCJDb3ZlclVSTCI6Imh0dHBzOi8vYWxpdmMtZGVtby12b2QuYWxpeXVuY3MuY29tLzVlZjAwZTNjMGVmMjQ1NDdhNmRjZmY4NTFiZTBiNmFiL3NuYXBzaG90cy9hMDJkZmMxNmRmYWI0OGE2YWUyNzUyOWVkYzkwNmNkNy0wMDAwMi5qcGciLCJEdXJhdGlvbiI6MTAuNDE2N30sIkFjY2Vzc0tleUlkIjoiU1RTLk5KTFRzRWtTM0x1VDZLS0Q4Y0ZCQndTRXQiLCJQbGF5RG9tYWluIjoiYWxpdmMtZGVtby12b2QuYWxpeXVuY3MuY29tIiwiQWNjZXNzS2V5U2VjcmV0IjoiOXcyNVlDeXVyblpxM2YyN3ZBQTNxZVJhYWZVSzhvVTFuUXN2aGJ3UUhVR0giLCJSZWdpb24iOiJjbi1zaGFuZ2hhaSIsIkN1c3RvbWVySWQiOjExMDMxNDQ1MzM0MjYzODZ9"
        }
    }
  • getImageUploadAuth: obtains the credential for uploading an image based on the information about the image, such as the type of the image.

    GET request 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 success responses
    {
        "result": "true",
        "requestId": "c9fc9bf0-b172-441c-9624-2b700204xxxx",
        "message": "",
        "code": "200",
        "data": {
            "uploadA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0pWS0RwaUdXRzNSTE5uK3p0Sjl4YmtlRStzS1VsZmJCK1o0NFNRVjJ2SUZUVkZpSUlOd3o5QWMrdS9Mc3RCbksrNy92V0hudC8yOHg5ZFNmdmFzM3NCVTBMNmI4M3JYTjVHV0c1Q0xPT3BOVXdwbUhCRGRkSmoyc1lHRjh6ZnlvZ1hZS21nc01pV25jT1d4RXNnL09qVGZwSnBWS2o2eldtUzhmWHZsSjVjM2NTaWE5K0Z0bkJlbUE2cTB3UmZoWWUrUkRRbWtjWTdMYU1CV01Hb0FCRDlpdzM2ZENFcmJMUFRUb3JaYi9lL0NYQW12YjdVWHFySTZWNHFNWmJLYk1WMzU1ZWR4Ni9WM21kd0p0VHdOMHF5NXFNTFFvSXdZem56bmZkaFZ4U0ZObVA2aFVlU204Q1ZkSUJMUVFwaWZxR2hyVDJRTEtadVVxTHplRDBqU01FUllnclNZRGo3cVRJUUM1aVZ5T2l3K0dORGxscmlUREwvV1BXQkVMSVFBPSIsIkFjY2Vzc0tleUlkIjoiU1RTLk5KS3V6WUc2ODdKRDJLWFVSUTNEZDFMSGciLCJFeHBpcmVVVENUaW1lIjoiMjAxOC0xMi0yOFQwODo0OTozNFoiLCJBY2Nlc3NLZXlTZWNyZXQiOiJIMWlkWUFucXFQaDNIQWs1dFpDaUJjRzJpQTdRSm1pM01pM25OQjc4Z3ZkVCIsIkV4cGlyYXRpb24iOiIzNTY2IiwiUmVnaW9uIjoiY24tc2hhbmdoYWkifQ==",
            "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"
        }
    }

User management

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

    GET request URL: /user/login

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

    GET request URL: /user/register

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

    POST request 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 ID of the user.
    nickname string Yes The nickname of the user.
    Sample success responses
    {
        "result": "true",
        "code": "200",
        "requestId": "ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
        "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 request URL: /user/randomUser

    Response parameters
    Parameter Type Description
    userId string The ID of the user.
    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 random user was generated.
    gmtModified string The time when the random user was modified.
    Sample success responses
    {
        "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": ""
        }
    }

Video management

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

    POST request 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: byte.
    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 success responses
    {
        "result": "true",
        "code": "200",
        "requestId": "ad5ce518-aafd-47ef-bd42-36a809a1xxxx",
        "message": null,
        "data": {}
    }
    }
  • getRecommendVideoList: queries the recommended videos.

    GET request 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 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 success responses
    {
        "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": "Recommended videos",
                "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 chairs",
                "description": "Beach chairs",
                "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": "Recommended videos",
                "tags": "Beach chairs",
                "shareUrl": "",
                "user": {
                    "userId": "243547076xxxx",
                    "userName": "",
                    "avatarUrl": ""
                },
                "transcodeStatus": "",
                "snapshotStatus": "",
                "censorStatus": "",
                "narrowTranscodeStatus": "",
                "fileUrl": "https://alivc-demo-vod.aliyuncs.com/a34f34e0fc744d00a5269e8a7c6a60c7/02528a756dd04693dc3c44d68b1bcf28-fd.mp4"
            }]
        }
    }
  • getPersonalVideoList: queries videos in the personal center.

    GET request 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 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 success responses
    {
        "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: deletes a video.

    POST request 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 ID of the user.
    Sample success responses
    {
        "result": "true",
        "requestId": "f8163b40-6192-4edc-97ec-52c6cd96xxxx",
        "message": "删除完成",
        "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 taking.

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 taking 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 type of the event.
VideoId string The ID of the video.
Status string The result of the event. Valid values:
  • success
  • fail

EventType

Event Description
StreamTranscodeComplete The video in a single definition is transcoded.
SnapshotComplete Snapshots are taken.
AIVideoCensorComplete 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 request URL: /music/getRecommendMusic

    Request parameters
    Parameter Type Required Description
    pageNo string Yes The number of the page to return. Valid value: 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 success responses
    {
        "result": "true",
        "requestId": "56a393dc-b1f9-4641-b998-6a7ff40dxxxx",
        "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 request 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 expiration time of the song.
    Sample success responses
    {
        "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"
        }
    }

Resource management

  • getPasterInfo: queries the information about a dynamic image.

    GET request URL: /resource/getPasterInfo

    Response parameters
    Parameter Type Description
    id int The ID of the dynamic image.
    icon string The URL of the icon of the dynamic image.
    description string The description of the dynamic image.
    level int The level of the dynamic image.
    name string The name of the dynamic image.
    preview string The URL used to preview the dynamic image.
    sort int The ordinal number of the dynamic image.
    type int The type of the dynamic image.
    createTime string The time when the dynamic image was created.
    Sample success responses
    {
        "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": "Dynamic image for the Valentine's Day",
            "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": "Dynamic image for the Spring Festival",
            "name": "Happy Spring Festival 2017 (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: queries packages of dynamic images based on the IDs of dynamic images.

    GET request URL: /resource/getPasterList

    Request parameters
    Parameter Type Required Description
    pasterId string Yes The ID of the dynamic image.
    type string Yes The type of the dynamic image. Valid values:
    • 1: dynamic images for videos captured by front-facing cameras
    • 2: dynamic images for videos captured by rear-facing cameras
    Response parameters
    Parameter Type Description
    id string The ID of the dynamic image.
    fontId int The ID of the font.
    icon string The URL of the icon of the dynamic image.
    name string The name of the dynamic image.
    url string The URL used to download the package of the dynamic image.
    preview string The URL used to preview the dynamic image.
    sort int The ordinal number of the dynamic image.
    type int The type of the dynamic image.
    createTime string The time when the dynamic image was created.
    Sample success responses
    {
        "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: queries packages of dynamic images for videos captured by front-facing cameras.

    GET request URL: /resource/getFrontPasterList

    Response parameters
    Parameter Type Description
    id int The ID of the dynamic image.
    fontId string The ID of the font.
    icon string The URL of the icon of the dynamic image.
    name string The name of the dynamic image.
    url string The URL used to download the package of the dynamic image.
    preview string The URL used to preview the dynamic image.
    sort string The ordinal number of the dynamic image.
    type string The type of the dynamic image.
    createTime string The time when the dynamic image was created.
    Sample success responses
    {
        "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: queries the information about a text bubble.

    GET request URL: /resource/getTextPaster

    Response parameters
    Parameter Type Description
    id int The ID of the text bubble.
    icon string The URL of the icon of the text bubble.
    description string The description of the text bubble.
    name string The name of the text bubble.
    preview string The URL used to preview the text bubble.
    sort int The ordinal number of the text bubble.
    type int The type of the text bubble.
    createTime string The time when the text bubble was created.
    Sample success responses
    {
        "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",
            "name": "Bubble",
            "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",
            "name": "Simple bubble",
            "preview": "http://30.40.34.91:8080/?type=text&id=196",
            "sort": 2,
            "type": 2,
            "createTime": "2019-03-19 14:21:42.0"
        }]
    }
  • getTextPasterList: queries text bubble packages based on the IDs of text bubbles.

    GET request URL: /resource/getTextPasterList

    Request parameters
    Parameter Type Required Description
    textPasterId String Yes The ID of the text bubble.
    Response parameters
    Parameter Type Description
    id int The ID of the text bubble.
    fontId int The ID of the font.
    icon string The URL of the icon of the text bubble.
    name string The name of the text bubble.
    url string The URL used to download the text bubble package.
    preview string The URL used to preview the text bubble.
    sort int The ordinal number of the text bubble.
    type int The type of the text bubble.
    createTime string The time when the text bubble was created.
    Sample success responses
    {
        "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: queries the information about a music video (MV).

    GET request URL: /resource/getMv

    Response parameters
    Parameter Type Description
    id int MV ID
    icon string The URL of the icon of the MV.
    duration string The duration of the MV.
    name string The name of the MV.
    previewPic string The URL of the thumbnail of the MV.
    previewMp4 string The URL used to play the MV.
    sort int The ordinal number of the MV.
    createTime string The time when the MV was created.
    aspectList List<Aspect> The information about the materials of the MV.
    Aspect
    Parameter Type Description
    aspect string The aspect ratio of the MV.
    • 1:1
    • 4:3
    • 16:9
    download string The URL used to download the MV.
    Sample success responses
    {
        "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"
            }]
        }]
    }

Font management

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

GET request URL: /resource/getFont

Request parameters
Parameter Type Required Description
fontId string No The ID of the font. If you do not specify a value for this parameter, all fonts are returned.
Response parameters
Parameter Type Description
id int The ID of the font.
banner string The URL of the banner of the font.
name string The name of the font.
url string The URL used to download the font.
icon string The URL of the icon of the font.
sort int The ordinal number of the font.
Sample success responses
{
    "result": "true",
    "requestId": "b9c72eb4-9d42-4fda-934c-23c60493xxxx",
    "message": "",
    "code": "200",
    "data": {
        "id": 52,
        "name": "An interestingsight",
        "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
    }
}