All Products
Search
Document Center

AppServer console methods

Last Updated: Aug 01, 2019

Overview

This topic describes the methods of the SmartVideo console and their return values.

Response structure

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

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

Console methods

getVideos

You can call this operation to obtain a list of videos based on query criteria.

Method GET
URL /console/vod/getVideos
Request parameters
Name Type Required Description
consoletoken String Yes The token.
pageIndex Integer No The start page number, which starts from 1.
pageSize Integer No The number of data records per page.
videoId String No The video ID.
userId String No The user ID.
title String No The video title.
startTime String No The start time of queried data.
endTime String No The end date of queried data.
userName String No The username.
censorStatus String No The review status.
Response parameters
Name Type Description
total String The total number of videos.
videoList List<Video > The list of video information in the user center.

Video

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

User

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

Sample response:

{
  "result": "true",
  "requestId": "c3bcb60d-e85f-4e19-a50a-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://vod.aliyunsample.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4"       
              , "http://vod.aliyunsample.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4" 
            }
      }
    ]
  }
}

submitTranscode

You can call this operation to submit a non-Narrowband HD transcoding job.

Method GET
URL /console/vod/submitTranscode
Request parameters
Name Type Required Description
consoletoken String Yes The token.
mediaId String Yes The video ID.
Response parameters
Name Type Description

Sample response:

{
  "result": "true",
  "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f",
  "message": "Non-Narrowband HD transcoding job submitted.",
  "code": "200",
  "data": null
}

createAudit

You can call this operation to start a manual review.

Method GET
URL /console/vod/createAudit
Request parameters
Name Type Required Description
consoletoken String Yes The token.
mediaId String Yes The video ID.
status String Yes The review status. Valid values: Blocked and Normal.
reason String No The reason for blocking the video if the Status parameter is set to Blocked. Length constraint: maximum length of 128 bytes.
comment String No The remarks.
Response parameters
Name Type Description

Sample response:

{
  "result": "true",
  "requestId": "c312edd-1dc3-132r313rfef-qfevw42ghrnk",
  "message": "Review completed.", 
  "code": "200",
  "data": null
}

submitTranscode

You can call this operation to submit a Narrowband HD transcoding job.

Method GET
URL /console/vod/submitTabTranscode
Request parameters
Name Type Required Description
consoletoken String Yes The token.
mediaId String Yes The video ID.
Response parameters
Name Type Description

Sample response:

{
  "result": "true",
  "requestId": "dsgb455-e85f-443f9-a50a-12323rfg34t34g",
  "message": "Narrowband HD transcoding job submitted.",
  "code": "200",
  "data": null
}

getVideoById

You can call this operation to obtain the details of a video based on the video ID.

Method GET
URL /console/vod/getVideoById
Request parameters
Name Type Required Description
consoletoken String Yes The token.
videoId String Yes The video ID.
Response parameters
Name Type Description
title String The video title.
videoId String The video ID.
description String The video description.
duration String The video duration. Unit: seconds.
coverUrl String The URL of the video thumbnail.
status String The video status.
firstFrameUrl String The URL of the first frame snapshot.
size String The size of the video mezzanine file. Unit: bytes.
tags String The video tags. Separate multiple tags with a comma (,).
cateId String The video category ID.
cateName String The video category name.
creationTime String The creation time.
transcodeStatus String The transcoding status.
snapshotStatus String The snapshot status.
censorStatus String The review status.
narrowTranscodeStatus String The Narrowband HD transcoding status.
SnapshotList List The list of snapshots.
fileUrilList List The list of video mezzanine file URLs.
user User The user information.

User

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

Sample response:

{
  "result": "true",
  "requestId": "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://vod.aliyunsample.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4"       
              , "http://vod.aliyunsample.com/ABEBDE15CC479FD4D1329/52a53151eba5226f8e2da3b55bc57c49.mp4" 
            }

  }
}

getRecommendVideos

You can call this operation to obtain a list of recommended videos based on query criteria.

Method GET
URL /console/vod/getRecommendVideos
Request parameters
Name Type Required Description
consoletoken String Yes The token.
pageIndex Integer No The start page number, which starts from 1.
pageSize Integer No The number of data records per page.
videoId String No The video ID.
userId String No The user ID.
title String No The video title.
startTime String No The start time of queried data.
endTime String No The end date of queried data.
userName String No The username.
censorStatus String No The review status.
Response parameters
Name Type Description
total String The total number of videos.
videoList List<Video > The list of video information in the user center.

Video

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

User

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

Sample response:

{
  "result": "true",
  "requestId": "c3bcb60d-e85f-4e19-a50a-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

You can call this operation to add videos to the list of recommended videos.

Method POST
URL /console/vod/recommendVideo
Request parameters
Name Type Required Description
consoletoken String Yes The token.
title String No The video title.
videoId String No The video ID.
userId String No The user ID.
description String No The video description.
duration String No The video duration. Unit: seconds.
coverUrl String No The URL of the video thumbnail.
size String No The size of the video mezzanine file. Unit: bytes.
tags String No The video tags. Separate multiple tags with a comma (,).
cateId String No The video category ID.
cateName String No The video category name.
firstFrameUrl String No The URL of the first frame snapshot.
transcodeStatus String No The non-Narrowband HD transcoding status.
snapshotStatus String No The snapshot status.
censorStatus String No The review status.
isNarrow String No Indicates whether the video is in Narrowband HD.
isCache String No Indicates whether the video is preloaded.

Sample response:

{
  "result": "true",
  "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
  "message": "Video added to the list of recommended videos.",
  "code": "200",
  "data":null
}

pushObjectCache

You can call this operation to preload the content of trending videos.

Method POST
URL /console/vod/pushObjectCache
Request parameters
Name Type Required Description
consoletoken String Yes The token.
objectPath String No The URL of the content to be preloaded, for example, a.com/image/1.png. Separate multiple URLs with a line break (\n or \r\n).

Sample response:

{
  "result": "true",
  "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
  "message": "Content preloaded.",
  "code": "200",
  "data":null
}

getRecommendVideoById

You can call this operation to obtain the details of a recommended video based on the video ID.

Method GET
URL /console/vod/getRecommendVideoById
Request parameters
Name Type Required Description
consoletoken String Yes The token.
videoId String Yes The video ID.
Response parameters
Name Type Description
title String The video title.
videoId String The video ID.
description String The video description.
duration String The video duration. Unit: seconds.
coverUrl String The URL of the video thumbnail.
status String The video status.
firstFrameUrl String The URL of the first frame snapshot.
size String The size of the video mezzanine file. Unit: bytes.
tags String The video tags. Separate multiple tags with a comma (,).
cateId String The video category ID.
cateName String The video category name.
creationTime String The creation time.
transcodeStatus String The transcoding status.
snapshotStatus String The snapshot status.
censorStatus String The review status.
narrowTranscodeStatus String The Narrowband HD transcoding status.
SnapshotList List The list of snapshots.
fileUrilList List The list of video mezzanine file URLs.
user User The user information.

User

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

Sample response:

{
  "result": "true",
  "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
  "message": "Video details obtained based on the video ID.",
  "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

You can call this operation to delete a video.

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

Sample response:

{
  "result": "true",
  "requestId": "f9a8sdf09iaf3-2f23r23-0965iyhk4",
  "message": "Video deleted.",
  "code": "200",
  "data":null
}

deleteRecommendById

You can call this operation to remove a video from the list of recommended videos.

Method POST
URL /console/vod/deleteRecommendById
Request parameters
Name Type Required Description
consoletoken String Yes The token.
videoId String Yes The video ID.

Sample response:

{
  "result": "true",
  "requestId": "f8163b40-6192-4edc-97ec-52c6cd96e996",
  "message": "Video removed from the list of recommended videos.",
  "code": "200",
  "data":null
}

login

You can call this operation to log on to the console.

Method POST
URL /console/user/login
Request parameters
Name Type Required Description
userName String Yes The username.
password String Yes The password.

Sample response:

{
   "result": "true",
   "requestId": "c30f63ed-3f66-45e9-9df0-a15e7d3a7e6a",
   "message": "Logged on successfully.",
   "code": "200",
   "data": {
       "consoleToken": "12351232334123456781548765480698"
   }
}

signOut

You can call this operation to log off from the console.

Method POST
URL /console/user/signOut
Request parameters
Name Type Required Description
userName String Yes The username.
password String Yes The password.

Sample response:

{
   "result": "true",
   "requestId": "d4b6405b-86fb-45e7-826c-68b69926147b",
   "message": "Logged off successfully.",
   "code": "200",
   "data": null
}