edit-icon download-icon

UpdateMedia

Last Updated: Apr 19, 2018

Description

The UpdateMedia API updates media set basic information, such as the title, description, and category. This API implements full update. Each attribute must be set; otherwise, it is overwritten by a null value.

Request parameters

Parameter Type Required or not Description
Action String Yes API of the action, system required parameter. Set this parameter to UpdateMedia.
MediaId String Yes Media ID
Title String No Media title. If not set, this parameter is cleared. The parameter value consists of up to 128 UTF-8 encoded bytes.
Description String No Description. If not set, this parameter is cleared. The parameter value consists of up to 1,024 UTF-8 encoded bytes.
CateId Long No Category ID. If not set, this parameter is cleared. The parameter value cannot be negative.
Tags String No A list of tags separated by commas (,). Up to 16 tags can be entered. The name of a single tag consists of up to 32 bytes. The tag name is encoded by UTF-8.
CoverURL String No Cover. The URL format follows the RFC 2396 standard and is subject to UTF-8 encoding and URL encoding. A URL consists of up to 3,200 bytes.

Return parameters

Name Type Description
Media Media Media

Example

Request example

  1. http://mts.cn-hangzhou.aliyuncs.com?Title=hello&<public parameter>

Return example

XML

  1. <UpdateMediaResponse>
  2. <Media>
  3. <Format>mov,mp4,m4a,3gp,3g2,mj2</Format>
  4. <PublishState>Published</PublishState>
  5. <File>
  6. <State>Normal</State>
  7. <URL>http://zzzinput-test.oss-cn-hangzhou.aliyuncs.com/output-2016-01-07-09%3A37%3A17.mp485191.mp4</URL>
  8. </File>
  9. <Height>1080</Height>
  10. <MediaId>3e1cd21131a94525be55acf65888bf46</MediaId>
  11. <Title>hello</Title>
  12. <CreationTime>2016-09-14T08:30:33Z</CreationTime>
  13. <RunIdList>
  14. <RunId>47b42486019c4f688bf144c1a6ba059a</RunId>
  15. </RunIdList>
  16. <CateId>0</CateId>
  17. <Duration>7.965000</Duration>
  18. <Width>1920</Width>
  19. <Fps>25.0</Fps>
  20. <Bitrate>2659.326</Bitrate>
  21. <Size>2647692</Size>
  22. </Media>
  23. <RequestId>C876E3A4-4CA1-40E7-BB29-D541E6B9D9D9</RequestId>
  24. </UpdateMediaResponse>

JSON

  1. {
  2. "Media": {
  3. "Format": "mov,mp4,m4a,3gp,3g2,mj2",
  4. "PublishState": "Published",
  5. "File": {
  6. "State": "Normal",
  7. "URL": "http://zzzinput-test.oss-cn-hangzhou.aliyuncs.com/output-2016-01-07-09%3A37%3A17.mp485191.mp4"
  8. },
  9. "Height": "1080",
  10. "MediaId": "3e1cd21131a94525be55acf65888bf46",
  11. "Title": "hello",
  12. "CreationTime": "2016-09-14T08:30:33Z",
  13. "RunIdList": {
  14. "RunId": [
  15. "47b42486019c4f688bf144c1a6ba059a"
  16. ]
  17. },
  18. "CateId": 0,
  19. "Duration": "7.965000",
  20. "Width": "1920",
  21. "Fps": "25.0",
  22. "Bitrate": "2659.326",
  23. "Size": "2647692"
  24. },
  25. "RequestId": "C481C0BC-FD8F-448B-8C67-1C48716764D1"
  26. }
Thank you! We've received your feedback.