All Products
Search
Document Center

:LongVideo console operations

Last Updated:May 10, 2023

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"3099ee2b-aa30-4c38-b28e-12dc1e1b****",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"36f336d6-e3c2-4031-8f13-3d6fc38f****",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"90c08fe0-1dc9-4fdf-8c68-4b3ae5a1****",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"ba62239e-76cf-4a63-9823-907c0ee3****",
     "message": "The basic information of the long video has been modified.",
     "data":{}
    }

}

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:

{
  "result": "true",
  "requestId": "afga23534t-geggtw4-hw4htnytj-45yh****",
  "message": "Long videos have been queried.",
  "code": "200",
  "data": {
    "total": 7,
    "videoList": [
      {
        "id": "802",
                "tvId": "579028",
                "tvName": "Chinese Society",
                "title": "Chinese Society Episode 8", LongVideo V1.0. ApsaraVideo VOD solution",
                "description": "",
                "coverUrl": "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0****/snapshots/normal/2AF06037-16C26293FE1-1103-1445-334-2638600001.jpg",
                "creationTime": "2019-07-25 06:45:33.0",
                "firstFrameUrl": "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0****/snapshots/normal/2AF06037-16C26293FE1-1103-1445-334-2638600001.jpg",
                "size": 16960798,
                "cateId": 0,
                "cateName": "",
                "tags": "Chinese Society",
                "isRecommend": "false",
                "isHomePage": "false",
                "videoId": "d90ab79a49814425b338fc1c6f0****",
                "duration": 138,
                "transcodeStatus": "success",
                "snapshotStatus": "success",
                "censorStatus": "success",
                "snapshotList": [
                    "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0****/snapshots/normal/444AE83D-16C26294085-1103-1445-334-2638600001.jpg",
                    "http://alivc-demo-vod.aliyuncs.com/d90ab79a49814425b338fc1c6f0****/snapshots/normal/444AE83D-16C26294085-1103-1445-334-2638600002.jpg"
                ],
                "dotList": [],
                "sort": "8",
                "isVip": "false"
      }
    ]
  }
}

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:

{
  "result": "true",
  "requestId": "c3bcb60d-e85f-4e19-a50a-16bedb56****",
  "message": "TV plays have been queried.",
  "code": "200",
  "data": {
    "total": 7,
    "videoList": [
      {
        "id": "25",
         "tvId": "15",
        "longVideoId": "23rfewc23",
        "title": "test video",
        "description": "test33", 
        "coverUrl": "https://alivc-demo-vod.aliyuncs.com/image9sfsa0-dfcoverurl.png",
        "creationTime": "2019-01-09 22:11:29.0", 
        "firstFrameUrl": "", 
        "cateId": 12,
        "sort": "2",
        "cateName": "12",
        "tags": "Test",
        "shareUrl": ""

      }
    ]
  }
}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"12jjhkjf23-23423jhrhuhfi9o2-2hgti",
     "message":null,
     "data":{}
    }

}

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:

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

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"aj12318-aafd-47ef-bd234h98f89-219670",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"23r2fjjvwf-24gt2veggv-243yjn-h4",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"hawiugeb,6remtd-sw75iejyrnsryj-w56ijrg34tewrg",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"sdf9afadf-adg34njk6u-sdv45",
     "message":null,
     "data":{}
    }

}

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:

{
    "result": "true",
    "requestId": "5ff790bb-dfbf-4b5d-a3ed-fcc520e4ab29",
    "message": "The marker information of the long video has been queried.",
    "code": "200",
    "data": [
        { 
            "videoId": "411d89fea52549cd9821c113c966e2cb",
            "time": "11",
            "content": "sdfasdfsf "
        },
        { 
            "videoId": "411d89fea52549cd9821c113c966e2cb",
            "time": "123",
            "content": "adfhgfnhdgn"
        }
    ]
}

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:

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

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"adfgerhq35y-h3qy54jwyrh-tn19670",
     "message":null,
     "data":{}
    }

}

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:

{ 
     "result":"true",
     "code":"200",
     "requestId":"adfgerhq35y-h3qy54jwyrh-tn19670",
     "message":null,
     "data":{}
    }

}

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:

{
    "result": "true",
    "requestId": "73ca7051-e517-485c-a5c4-2472c9a4c886",
    "message": "Tags have been queried.",
    "code": "200",
    "data": [
        {
            "id": "1",
            "tagId": "1324",
            "tagName": "Feature program",
            "type": "1"
        }
    ]
}

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:

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

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:

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