This topic describes how to call the API operations available for the short video console. This topic also describes the response parameters.

Response parameters

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

ParameterTypeDescription
requestIdstringThe ID of the request.
codestringThe HTTP status code of the request.
messagestringThe message returned for the request. The message often indicates the error cause.
dataobjectThe business data returned for the request. The value varies depending on different business objects.

API operations for the short video console

  • getVideos: queries videos.

    GET request URL: /console/vod/getVideos

    Request parameters

    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    pageIndexintNoThe number of the page to return. Pages start from page 1.
    pageSizeintNoThe number of entries to return on each page.
    videoIdstringNoThe ID of the video.
    userIdstringNoThe ID of the user.
    titlestringNoThe title of the video.
    startTimestringNoThe beginning of the time range to query.
    endTimestringNoThe end of the time range to query.
    userNamestringNoThe username of the user.
    censorStatusstringNoThe status of the review job.
    Response parameters
    ParameterTypeDescription
    totalstringThe total number of entries returned.
    videoListList<Video>The information about the videos.
    Sample success responses
    {
      "result": "true",
      "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f",
      "message": "",
      "code": "200",
      "data": {
        "total": 7,
        "videoList": [
          {
            "id": "25",
            "videoId": "23rfewc23",
            "title": "test video",
            "description": "test33",
            "duration": 12,
            "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
            "creationTime": "2019-01-09 22:11:29.0",
            "status": "",
            "firstFrameUrl": "",
            "size": 56,
            "cateId": 12,
            "cateName": "12",
            "tags": "Test",
            "shareUrl": "",
            "user": {
              "userId": "2434793223202",
              "userName": "Anne",
              "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70"
            },
            "transcodeStatus": "",
            "snapshotStatus": "",
            "censorStatus": "onCensor",
            "narrowTranscodeStatus": "",
            "SnapshotList": { "http://sample/covers/990f3820db2948b5b4a13d65d9a449f6-2.jpg"
                  , "http://sample/covers/sprite/990f3820db2948b5b4a13d65d9a449f6-1.jpg"
                },
            "fileUrlList": { "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4"
                  , "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4"
                }
          }
        ]
      }
    }
  • submitTranscode: creates a non-Narrowband HD™ transcoding job.

    GET request URL: /console/vod/submitTranscode

    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    mediaIdStringYesThe ID of the video.
    Sample success responses
    {
      "result": "true",
      "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f",
      "message": "Initiate a non-Narrowband HD™ transcoding job success.",
      "code": "200",
      "data": null
    }
  • createAudit: manually reviews a video.

    GET request URL: /console/vod/createAudit

    Response parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    mediaIdStringYesThe ID of the video.
    statusStringYesThe review result of the video. Valid values:
    • Blocked
    • Normal
    reasonStringNoThe reason for blocking the video. You must set this parameter if you set the status parameter to Blocked. The reason can be up to 128 bytes in length.
    commentStringNoThe description of the manual review job.
    Sample success responses
    {
      "result": "true",
      "requestId": "c312edd-1dc3-132r313rfef-qfevw42ghrnk",
      "message": "review is complete",
      "code": "200",
      "data": null
    }
  • submitTabTranscode: creates a Narrowband HD™ transcoding job.

    GET request URL: /console/vod/submitTabTranscode

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    mediaIdStringYesThe ID of the video.
    Sample success responses
    {
      "result": "true",
      "requestId": "dsgb455-e85f-443f9-a50a-12323rfg34t34g",
      "message": "Initiate a Narrowband HD™ transcoding job success.",
      "code": "200",
      "data": null
    }
  • getVideoById: queries the details of a video based on the ID of the video.

    GET request URL: /console/vod/getVideoById

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    videoIdstringYesThe ID of the video.
    Response parameters
    ParameterTypeDescription
    titlestringThe title of the video.
    videoIdstringThe ID of the video.
    descriptionstringThe description of the video.
    durationstringThe duration of the video. Unit: seconds.
    coverUrlstringThe URL of the video thumbnail.
    statusstringThe status of the video.
    firstFrameUrlstringThe URL of the first frame of the video.
    sizestringThe size of the source video file. Unit: byte.
    tagsstringThe tags of the video. Multiple tags are separated by commas (,).
    cateIdstringThe category ID of the video.
    cateNamestringThe category name of the video.
    creationTimestringThe time when the video was created.
    transcodeStatusstringThe status of the transcoding job.
    snapshotStatusstringThe status of the snapshot taking job.
    censorStatusstringThe status of the review job.
    narrowTranscodeStatusstringThe status of the Narrowband HD™ transcoding job.
    SnapshotListlistThe URLs of the snapshots of the video.
    fileUrilListlistThe URLs of the media segment files of the video.
    userUserThe information about the user.
    Sample success responses
    {
      "result": "true",
      "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
      "message": "",
      "code": "200",
      "data": {
            "id": "25",
            "videoId": "23rfewc23",
            "title": "test video",
            "description": "test33",
            "duration": 12,
            "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
            "creationTime": "2019-01-09 22:11:29.0",
            "status": "",
            "firstFrameUrl": "",
            "size": 56,
            "cateId": 12,
            "cateName": "12",
            "tags": "Test",
            "shareUrl": "",
            "user": {
              "userId": "2434793223202",
              "userName": "Anne",
              "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70"
            },
            "transcodeStatus": "",
            "snapshotStatus": "",
            "censorStatus": "onCensor",
            "narrowTranscodeStatus": "",
            "SnapshotList": { "http://sample/covers/990f3820db2948b5b4a13d65d9a449f6-2.jpg"
                  , "http://sample/covers/sprite/990f3820db2948b5b4a13d65d9a449f6-1.jpg"
                },
            "fileUrilList": { "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4"
                  , "http://example.aliyundoc.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4"
                }
      }
    }
  • getRecommendVideoList: queries the recommended videos.

    GET request URL: /console/vod/getRecommendVideos

    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    pageIndexintNoThe number of the page to return. Pages start from page 1.
    pageSizeintNoThe number of entries to return on each page.
    videoIdstringNoThe ID of the video.
    userIdstringNoThe ID of the user.
    titlestringNoThe title of the video.
    startTimestringNoThe beginning of the time range to query.
    endTimestringNoThe end of the time range to query.
    userNamestringNoThe username of the user.
    censorStatusstringNoThe status of the review job.
    Response parameters
    ParameterTypeDescription
    totalstringThe total number of entries returned.
    videoListList<Video>The information about the videos.
    Sample success responses
    {
      "result": "true",
      "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f",
      "message": "",
      "code": "200",
      "data": {
        "total": 7,
        "videoList": [
          {
            "id": "25",
            "videoId": "23rfewc23",
            "title": "test video",
            "description": "test33",
            "duration": 12,
            "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
            "creationTime": "2019-01-09 22:11:29.0",
            "status": "",
            "firstFrameUrl": "",
            "size": 56,
            "cateId": 12,
            "cateName": "12",
            "tags": "Test",
            "shareUrl": "",
            "user": {
              "userId": "2434793223202",
              "userName": "Anne",
              "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70"
            },
            "transcodeStatus": "",
            "snapshotStatus": "",
            "censorStatus": "onCensor",
            "narrowTranscodeStatus": ""
          }
        ]
      }
    }
  • recommendVideo: adds a video to the recommendation list.

    POST request URL: /console/vod/recommendVideo

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    titlestringNoThe title of the video.
    videoIdstringNoThe ID of the video.
    userIdstringNoThe ID of the user.
    descriptionstringNoThe description of the video.
    durationStringNoThe duration of the video. Unit: seconds.
    coverUrlstringNoThe URL of the video thumbnail.
    sizeStringNoThe size of the source video file. Unit: byte.
    tagsstringNoThe tags of the video. Separate multiple tags with commas (,).
    cateIdStringNoThe category ID of the video.
    cateNamestringNoThe category name of the video.
    firstFrameUrlstringNoThe URL of the first frame of the video.
    transcodeStatusStringNoThe status of the non-Narrowband HD™ transcoding job.
    snapshotStatusstringNoThe status of the snapshot taking job.
    censorStatusStringNoThe status of the review job.
    isNarrowStringNoSpecifies whether to perform Narrowband HD™ transcoding on the video.
    isCacheStringNoSpecifies whether to prefetch the video.
    Sample success responses
    {
      "result": "true",
      "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
      "message": "Add a video to the recommendation list success.",
      "code": "200",
      "data":null
    }
  • pushObjectCache: prefetches a video.

    POST request URL: /console/vod/pushObjectCache

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    objectPathstringNoThe URL of the object that you want to prefetch for the video. Example: example.aliyundoc.com/image/1.png. Separate multiple URLs with line breaks (\n or \r\n).
    Sample success responses
    {
      "result": "true",
      "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
      "message": "Prefetches a video success.",
      "code": "200",
      "data":null
    }
  • getRecommendVideoById: queries the details of a recommended video based on the ID of video.

    GET request URL: /console/vod/getRecommendVideoById

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    videoIdstringYesThe ID of the video.
    Response parameters
    ParameterTypeDescription
    titlestringThe title of the video.
    videoIdstringThe ID of the video.
    descriptionstringThe description of the video.
    durationstringThe duration of the video. Unit: seconds.
    coverUrlstringThe URL of the video thumbnail.
    statusstringThe status of the video.
    firstFrameUrlstringThe URL of the first frame of the video.
    sizestringThe size of the source video file. Unit: byte.
    tagsstringThe tags of the video. Multiple tags are separated by commas (,).
    cateIdstringThe category ID of the video.
    cateNamestringThe category name of the video.
    creationTimestringThe time when the video was created.
    transcodeStatusstringThe status of the transcoding job.
    snapshotStatusstringThe status of the snapshot taking job.
    censorStatusstringThe status of the review job.
    narrowTranscodeStatusstringThe status of the Narrowband HD™ transcoding job.
    SnapshotListlistThe URLs of the snapshots of the video.
    fileUrilListlistThe URLs of the media segment files of the video.
    userUserThe information about the user.
    Sample success responses
    {
      "result": "true",
      "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
      "message": "Query the details of a recommended video based on the ID of video success.",
      "code": "200",
      "data": {
            "id": "25",
            "videoId": "23rfewc23",
            "title": "test video",
            "description": "test33",
            "duration": 12,
            "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
            "creationTime": "2019-01-09 22:11:29.0",
            "status": "",
            "firstFrameUrl": "",
            "size": 56,
            "cateId": 12,
            "cateName": "12",
            "tags": "Test",
            "shareUrl": "",
            "user": {
              "userId": "2434793223202",
              "userName": "Anne",
              "avatarUrl": "https://alivc-demo-vod.aliyuncs.com/dd38cab5-2951-43a0-b9ed-ad0eebf83a70"
            },
            "transcodeStatus": "success",
            "snapshotStatus": "success",
            "censorStatus": "onCensor",
            "narrowTranscodeStatus": "onCensor"
      }
    }
  • deleteVideoById: deletes a video.

    POST request URL: /console/vod/deleteVideoById

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    videoIdstringYesThe ID of the video.
    userIdstringYesThe ID of the user.
    Sample success responses
    {
      "result": "true",
      "requestId": "f9a8sdf09iaf3-2f23r23-0965iyhk4",
      "message": "Delete success.",
      "code": "200",
      "data":null
    }
  • deleteRecommendById: removes a video from the recommendation list.

    POST request URL: /console/vod/deleteRecommendById

    Request parameters
    ParameterTypeRequiredDescription
    consoletokenstringYesThe 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.
    videoIdstringYesThe ID of the video.
    Sample success responses
    {
      "result": "true",
      "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
      "message": "Remove a video from the recommendation list success.",
      "code": "200",
      "data":null
    }
  • login: logs a user on to the short video console.

    POST request URL: /console/user/login

    Request parameters
    ParameterTypeRequiredDescription
    userNamestringYesThe username that is used to log on to the short video console.
    passwordstringYesThe password that is used to log on to the short video console.
    Sample success responses
    {
        "result": "true",
        "requestId": "c30f63ed-3f66-45e9-9df0-a15e7d3a7e6a",
        "message": "Log on success.",
        "code": "200",
        "data": {
            "consoleToken": "12351232334123456781548765480698"
        }
    }
  • signOut: logs a user off from the short video console.

    POST request URL: /console/user/signOut

    Request parameters
    ParameterTypeRequiredDescription
    userNamestringYesThe username of the user to be logged off from the short video console.
    passwordstringYesThe password of the user to be logged off from the short video console.
    Sample success responses
    {
        "result": "true",
        "requestId": "d4b6405b-86fb-45e7-826c-68b69926147b",
        "message": "Log off success.",
        "code": "200",
        "data": null
    }