调用UpdateMedia更新媒体基本信息。
使用说明
本接口更新的媒体基本信息包括标题、描述、类目等。注意是全量更新,每个属性都要设置,未设置的会被空值覆盖。
QPS限制
本接口的单用户QPS限制为100次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateMedia |
操作接口名,系统规定参数。取值:UpdateMedia。 |
MediaId | String | 是 | 3e1cd21131a94525be55acf65888**** |
需要更新基本信息的媒体ID。可以通过MPS控制台 > 媒体管理 > 媒体列表获取。 |
Title | String | 否 | hello |
媒体标题。支持中英文、数字等。
|
Description | String | 否 | example description |
媒体描述。支持中英文、数字等。
|
CoverURL | String | 否 | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/test****.jpg |
封面URL。即您需要设置的封面的存储地址,可以通过MPS控制台 > 工作流管理 > 媒体Bucket或OSS控制台 > 我的访问路径获取。
|
CateId | Long | 否 | 1 |
类目ID,整数。
|
Tags | String | 否 | tag1,tag2 |
标签列表。
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 6A88246F-C91F-42BD-BABE-DB0DF993F960 |
请求ID。 |
Media | Object |
媒体信息。 |
|
CreationTime | String | 2016-09-14T08:30:33Z |
创建时间。 |
CateId | Long | 1 |
类目ID。 |
Height | String | 1080 |
媒体文件高。 |
CensorState | String | Initiated |
视频审核状态。取值:
|
Tags | Array of String | tag1,tag2 |
标签列表。 |
Bitrate | String | 2659.326 |
码率。 |
MediaId | String | 3e1cd21131a94525be55acf65888**** |
媒体ID。 |
File | Object |
原文件。 |
|
State | String | Normal |
文件状态。取值范围:
|
URL | String | http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4 |
输入文件的OSS Bucket。 |
PublishState | String | Published |
媒体发布状态,表示是否对外发布媒体。取值:
|
Description | String | example description |
媒体文件描述。 |
Width | String | 1920 |
媒体文件宽。 |
Size | String | 2647692 |
媒体文件大小。 |
CoverURL | String | http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg |
封面URL。 |
RunIdList | Array of String | {"RunId":["47b42486019c4f688bf144c1a6ba****"]} |
媒体工作流执行实例ID列表。 |
Duration | String | 7.965000 |
时长。 |
Fps | String | 25.0 |
帧率。 |
Title | String | hello |
标题。 |
Format | String | mov |
格式。支持mov,mp4,m4a,3gp,3g2,mj2。 |
示例
请求示例
http(s)://mts.cn-hangzhou.aliyuncs.com/?Action=UpdateMedia
&MediaId=3e1cd21131a94525be55acf65888****
&Title=hello
&Description=example description
&CoverURL=http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/test****.jpg
&CateId=1
&Tags=tag1,tag2
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateMediaResponse>
<RequestId>6A88246F-C91F-42BD-BABE-DB0DF993F960</RequestId>
<Media>
<CreationTime>2016-09-14T08:30:33Z</CreationTime>
<CateId>1</CateId>
<Height>1080</Height>
<CensorState>Initiated</CensorState>
<Tags>tag1,tag2</Tags>
<Bitrate>2659.326</Bitrate>
<MediaId>3e1cd21131a94525be55acf65888****</MediaId>
<File>
<State>Normal</State>
<URL>http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4</URL>
</File>
<PublishState>Published</PublishState>
<Description>example description</Description>
<Width>1920</Width>
<Size>2647692</Size>
<CoverURL>http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg</CoverURL>
<RunIdList>{"RunId":["47b42486019c4f688bf144c1a6ba****"]}</RunIdList>
<Duration>7.965000</Duration>
<Fps>25.0</Fps>
<Title>hello</Title>
<Format>mov</Format>
</Media>
</UpdateMediaResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6A88246F-C91F-42BD-BABE-DB0DF993F960",
"Media" : {
"CreationTime" : "2016-09-14T08:30:33Z",
"CateId" : 1,
"Height" : "1080",
"CensorState" : "Initiated",
"Tags" : [ "tag1,tag2" ],
"Bitrate" : "2659.326",
"MediaId" : "3e1cd21131a94525be55acf65888****",
"File" : {
"State" : "Normal",
"URL" : "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
},
"PublishState" : "Published",
"Description" : "example description",
"Width" : "1920",
"Size" : "2647692",
"CoverURL" : "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg",
"RunIdList" : [ "{\"RunId\":[\"47b42486019c4f688bf144c1a6ba****\"]}" ],
"Duration" : "7.965000",
"Fps" : "25.0",
"Title" : "hello",
"Format" : "mov"
}
}
错误码
访问错误中心查看更多错误码。