All Products
Search
Document Center

LongVideo console operations

Last Updated: Oct 15, 2019

Overview

This topic describes the API operations of the LongVideo console.

Response structure

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

result Boolean Indicates 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.

LongVideo console

longVideoUpload

You can call this operation to upload a local long video.

Method POST
URL /console/longVideo/longVideoUpload
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
title String Yes The title of the video.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"3099ee2b-aa30-4c38-b28e-12dc1e1b5229",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

createTvPlay

You can call this operation to add a TV play.

Method POST
URL /console/longVideo/createTvPlay
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
title String Yes The title of the TV play.
tvName String Yes The name of the TV play.
file Multipart file Yes The binary stream file of the TV play.
description String No The description of the TV play.
tags String No The tags of the TV play. Separate multiple tags with commas (,).
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"36f336d6-e3c2-4031-8f13-3d6fc38f1a18",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

updateTvPlayInfo

You can call this operation to modify the information of a TV play in the console.

Method POST
URL /console/longVideo/updateTvPlayInfo
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tvId String Yes The ID of the TV play.
title String Yes The title of the TV play.
tvName String Yes The name of the TV play.
file Multipart file Yes The binary stream file of the TV play.
description String No The description of the TV play.
tags String No The tags of the TV play. Separate multiple tags with commas (,).
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"90c08fe0-1dc9-4fdf-8c68-4b3ae5a1d9d8",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

updateLongVideoInfo

You can call this operation to modify the information of a long video.

Method POST
URL /console/longVideo/updateLongVideoInfo
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
title String Yes The title of the video.
description String No The description of the video.
tags String No The tags of the video. Separate multiple tags with commas (,).
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"ba62239e-76cf-4a63-9823-907c0ee3c528",
  5. "message": "The basic information of the long video has been modified.",
  6. "data":{}
  7. }
  8. }

getLongVideos

You can call this operation to query long videos.

Method GET
URL /console/longVideo/getLongVideos
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
pageIndex Integer Yes The start page number. It starts from 1.
pageSize Integer Yes The number of entries to return on each page.
isRecommend String No Specifies whether to query recommended videos. Valid values: true and false.
isVip String No Specifies whether to query videos exclusive for VIP users. Valid values: true and false.
isHomePage String No Specifies whether to query videos that are displayed on the homepage. Valid values: true and false.
videoId String No The ID of the video.
tags String No The tags of the video.
tvId String No The ID of the TV play.
title String No The title of the TV play.
startTime String No The beginning of the time range where long videos are queried.
endTime String No The end of the time range where long videos are queried.
censorStatus String No The audit status of the video.
Response parameters
Parameter Type Description
total String The total number of videos.
longVideoList List<LongVideo> The list of long video information.

The following table lists parameters in LongVideo.

Parameter Type Description
title String The title of the video.
videoId String The ID of the video.
description String The description of the video.
duration String The length of the video. Unit: seconds.
coverUrl String The URL of the video thumbnail.
firstFrameUrl String The URL of the first frame snapshot.
size String The size of the video mezzanine file. Unit: bytes.
tags String The tags of the video. Separate multiple tags with commas (,).
tvId String The ID of the TV play.
tvName String The name of the TV play.
creationTime String The time when the video was created.
snapshotList list The list of snapshots.
dotList List<dot> The marker list of the video.
transcodeStatus String The transcoding status of the video.
snapshotStatus String The snapshot status of the video.
censorStatus String The audit status of the video.
sort String The sequence number of the video.
isVip String Indicates whether the video is exclusive for VIP users. Valid values: true and false.
isRecommend String Indicates whether the video is recommended. Valid values: true and false.
isHomePage String Indicates whether the video is displayed on the homepage. Valid values: true and false.
isVip String Indicates whether the video is exclusive for VIP users. Valid values: true and false.

The following table lists parameters in dot.

Parameter Type Description
id String The ID.
videoId String The ID of the video.
time String The time when the marker was set. Unit: seconds.
content String The description of the marker.

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "afga23534t-geggtw4-hw4htnytj-45yhsrth",
  4. "message": "Long videos have been queried.",
  5. "code": "200",
  6. "data": {
  7. "total": 7,
  8. "videoList": [
  9. {
  10. "id": "802",
  11. "tvId": "579028",
  12. "tvName": "Chinese Society",
  13. "title": "Chinese Society Episode 8", LongVideo V1.0. ApsaraVideo for VOD solution",
  14. "description": "",
  15. "coverUrl": "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0eb19d/snapshots/normal/2AF06037-16C26293FE1-1103-1445-334-2638600001.jpg",
  16. "creationTime": "2019-07-25 06:45:33.0",
  17. "firstFrameUrl": "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0eb19d/snapshots/normal/2AF06037-16C26293FE1-1103-1445-334-2638600001.jpg",
  18. "size": 16960798,
  19. "cateId": 0,
  20. "cateName": "",
  21. "tags": "Chinese Society",
  22. "isRecommend": "false",
  23. "isHomePage": "false",
  24. "videoId": "d90ab79a49814425b338fc1c6f0eb19d",
  25. "duration": 138,
  26. "transcodeStatus": "success",
  27. "snapshotStatus": "success",
  28. "censorStatus": "success",
  29. "snapshotList": [
  30. "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0eb19d/snapshots/normal/444AE83D-16C26294085-1103-1445-334-2638600001.jpg",
  31. "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0eb19d/snapshots/normal/444AE83D-16C26294085-1103-1445-334-2638600002.jpg"
  32. ],
  33. "dotList": [],
  34. "sort": "8",
  35. "isVip": "false"
  36. }
  37. ]
  38. }
  39. }

getTvPlayList

You can call this operation to query TV plays.

Method GET
URL /console/longVideo/getTvPlayList
Request parameters
Parameter Type Required? Description
consoleToken string Yes The token.
pageIndex Integer Yes The start page number. It starts from 1.
pageSize Integer Yes The number of entries to return on each page.
tvId String No The ID of the TV play.
title String No The title of the TV play.
startTime String No The beginning of the time range where TV plays are queried.
endTime String No The end of the time range where TV plays are queried.
isRecommend String No Specifies whether to query recommended TV plays. Valid values: true and false.
isHomePage String No Specifies whether to query TV plays that are displayed on the homepage. Valid values: true and false.
isRelease String No Specifies whether to query published TV plays. Valid values: true and false.
Response parameters
Parameter Type Description
total String The total number of videos.
tvPlayList List<tvPlay> The list of TV play information.

The following table lists parameters in tvPlay.

Parameter Type Description
id String The ID.
tvId String The ID of the TV play.
title String The title of the TV play.
description String The description of the TV play.
coverUrl String The URL of the TV play thumbnail.
firstFrameUrl String The URL of the first frame snapshot.
tags String The tags of the TV play. Separate multiple tags with commas (,).
cateId String The ID of the category to which the TV play belongs.
cateName String The name of the category to which the TV play belongs.
creationTime String The time when the TV play was created.
sort String The total number of episodes in the TV play.
isRelease String Indicates whether the TV play is published. Valid values: true and false.

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56165f",
  4. "message": "TV plays have been queried.",
  5. "code": "200",
  6. "data": {
  7. "total": 7,
  8. "videoList": [
  9. {
  10. "id": "25",
  11. "tvId": "15",
  12. "longVideoId": "23rfewc23",
  13. "title": "test video",
  14. "description": "test33",
  15. "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
  16. "creationTime": "2019-01-09 22:11:29.0",
  17. "firstFrameUrl": "",
  18. "cateId": 12,
  19. "sort": "2",
  20. "cateName": "12",
  21. "tags": "Test",
  22. "shareUrl": ""
  23. }
  24. ]
  25. }
  26. }

setLongVideoSort

You can call this operation to set the sequence number of a long video (episode in a TV play).

Method POST
URL /console/longVideo/setLongVideoSort
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
tvId String Yes The ID of the TV play.
tvName String Yes The name of the TV play.
sort String Yes The sequence number of the video (episode).
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"12jjhkjf23-23423jhrhuhfi9o2-2hgti",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

relieveLongVideoSort

You can call this operation to disassociate a long video from a TV play.

Method POST
URL /console/longVideo/relieveLongVideoSort
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
tvId String Yes The ID of the TV play.
sort String Yes The sequence number of the video (episode).
Response parameters

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "510aaa4f-0788-4d0e-bfce-44c4ff85366f",
  4. "message": "The long video has been disassociated from the TV play.",
  5. "code": "200",
  6. "data": null
  7. }

deleteTvPlay

You can call this operation to delete a TV play.

Method POST
URL /console/longVideo/deleteTvPlay
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tvId String Yes The ID of the TV play.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"aj12318-aafd-47ef-bd234h98f89-219670",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

deleteLongVideo

You can call this operation to delete a long video.

Method POST
URL /console/longVideo/deleteLongVideo
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"23r2fjjvwf-24gt2veggv-243yjn-h4",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

updateTvPlayReleaseStatus

You can call this operation to publish a TV play or discontinue its playback.

Method POST
URL /console/longVideo/updateTvPlayReleaseStatus
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tvId String Yes The ID of the TV play.
isRelease String Yes Specifies whether to publish the TV play. Valid values: true and false.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

setTvPlayHomePage

You can call this operation to display a TV play on the homepage.

Method POST
URL /console/longVideo/setTvPlayHomePage
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tvId String Yes The ID of the TV play.
tags String Yes The tags of the TV play.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

setTvPlayRecommend

You can call this operation to display a TV play in the recommendation section.

Method POST
URL /console/longVideo/setTvPlayRecommend
Request parameters
Parameter Type Required? Description
token String Yes The token.
tvId String Yes The ID of the TV play.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

setLongVideoHomePage

You can call this operation to display a long video on the homepage.

Method POST
URL /console/longVideo/setLongVideoHomePage
Request parameters
Parameter Type Required? Description
token String Yes The token.
videoId String Yes The ID of the video.
tags String Yes The tags of the video.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

setLongVideoVip

You can call this operation to set a long video to be exclusive for VIP users.

Method POST
URL /console/longVideo/setLongVideoVip
Request parameters
Parameter Type Required? Description
token String Yes The token.
videoId String Yes The ID of the video.
tags String Yes The tags of the video.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

setLongVideoRecommend

You can call this operation to display a long video in the recommendation section.

Method POST
URL /console/longVideo/setLongVideoRecommend
Request parameters
Parameter Type Required? Description
token String Yes The token.
videoId String Yes The ID of the video.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

updateLongVideoStatus

You can call this operation to remove a long video from the recommendation section.

Method POST
URL /console/longVideo/updateLongVideoStatus
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
type String Yes The type of the video. Valid values: 1, 2, and 3. A value of 1 indicates that the video is recommended. A value of 2 indicates that the video is displayed on the homepage. A value of 3 indicates that the video is exclusive for VIP users.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

updateTvPlayStatus

You can call this operation to remove a TV play from the recommendation section.

Method POST
URL /console/longVideo/updateTvPlayStatus
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tvId String Yes The ID of the TV play.
type String Yes The type of the TV play. Valid values: 1 and 2. A value of 1 indicates that the TV play is recommended. A value of 2 indicates that the TV play is displayed on the homepage.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

setLongVideoDot

You can call this operation to set markers for a long video.

Method POST
URL /console/longVideo/setLongVideoDot
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
parms String Yes The marker information of the video.
Response parameters

The following table lists parameters in parms.

Parameter Type Description
videoId String Yes The ID of the video.
time String Yes The time when the marker was set. Unit: seconds.
content String Yes The description of the marker.

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"sdf9afadf-adg34njk6u-sdv45",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

getDotListById

You can call this operation to query the marker information based on the video ID.

Method POST
URL /console/longVideo/setLongVideoDot
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
Response parameters
Parameter Type Description
dotList List<dotList> The marker list of the video.

The following table lists parameters in dotList.

Parameter Type Description
videoId String Yes The ID of the video.
time String Yes The time when the marker was set. Unit: seconds.
content String Yes The description of the marker.

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "5ff790bb-dfbf-4b5d-a3ed-fcc520e4ab29",
  4. "message": "The marker information of the long video has been queried.",
  5. "code": "200",
  6. "data": [
  7. {
  8. "videoId": "411d89fea52549cd9821c113c966e2cb",
  9. "time": "11",
  10. "content": "sdfasdfsf "
  11. },
  12. {
  13. "videoId": "411d89fea52549cd9821c113c966e2cb",
  14. "time": "123",
  15. "content": "adfhgfnhdgn"
  16. }
  17. ]
  18. }

createAudit

You can call this operation to start a manual audit.

Method POST
URL /console/longVideo/createAudit
Request parameters
Parameter Type Required? Description
consoletoken String Yes The token.
videoId String Yes The ID of the video.
status String Yes The audit status of the video. 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
Parameter Type Description

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "c312edd-1dc3-132r313rfef-qfevw42ghrnk",
  4. "message": "The audit has completed.",
  5. "code": "200",
  6. "data": null
  7. }

createTag

You can call this operation to create a tag.

Method POST
URL /console/longVideo/createTag
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tagName String Yes The name of the tag.
type String Yes The type of the tag. Valid values: 1, 2, and 3. A value of 1 indicates long video, 2 indicates TV play, and 3 indicates VIP video.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"adfgerhq35y-h3qy54jwyrh-tn19670",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

deleteTag

You can call this operation to delete a tag.

Method POST
URL /console/longVideo/deleteTag
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tagId String Yes The ID of the tag.
Response parameters

Sample response:

  1. {
  2. "result":"true",
  3. "code":"200",
  4. "requestId":"adfgerhq35y-h3qy54jwyrh-tn19670",
  5. "message":null,
  6. "data":{}
  7. }
  8. }

getTagsListByType

You can call this operation to query tags based on the tag type.

Method GET
URL /console/longVideo/getTagsListByType
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
type String Yes The tag type. Valid values: 1, 2, and 3. A value of 1 indicates long video, 2 indicates TV play, and 3 indicates VIP video.
Response parameters
Parameter Type Description
tagList List<Tag> The list of tag information.

The following table lists parameters in Tag.

Parameter Type Description
id String The ID.
tagId String The ID of the tag.
tagName String The name of the tag.
type STRING The type of the tag. Valid values: 1, 2, and 3. A value of 1 indicates long video, 2 indicates TV play, and 3 indicates VIP video.

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "73ca7051-e517-485c-a5c4-2472c9a4c886",
  4. "message": "Tags have been queried.",
  5. "code": "200",
  6. "data": [
  7. {
  8. "id": "1",
  9. "tagId": "1324",
  10. "tagName": "Feature program",
  11. "type": "1"
  12. }
  13. ]
  14. }

setTvPlayTag

You can call this operation to set tags for a TV play.

Method POST
URL /console/longVideo/setTvPlayTag
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
tvId String Yes The ID of the TV play.
tags String Yes The tags of the TV play.
Response parameters
Parameter Type Description

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "c312edd-1dc3-132r313rfef-qfevw42ghrnk",
  4. "message": "Tags have been set for the TV play.",
  5. "code": "200",
  6. "data": null
  7. }

setLongVideoTag

You can call this operation to set tags for a long video.

Method POST
URL /console/longVideo/setLongVideoTag
Request parameters
Parameter Type Required? Description
consoleToken String Yes The token.
videoId String Yes The ID of the video.
tags String Yes The tags of the video.
Response parameters
Parameter Type Description

Sample response:

  1. {
  2. "result": "true",
  3. "requestId": "c312edd-1dc3-132r313rfef-qfevw42ghrnk",
  4. "message": "Tags have been set for the long video.",
  5. "code": "200",
  6. "data": null
  7. }