edit-icon download-icon

UpdateMediaPublishState

Last Updated: Feb 14, 2018

Description

The UpdateMediaPublishState API updates the status of media publishing. Publishing is equivalent to setting all media resources to be played. The screenshot file access permission inherits the access permission on the bucket that stores the screenshot file. Media resources that are not published are set to Private.

Request parameters

Parameter Type Required or not Description
Action String Yes API of the action, system required parameter. Set this parameter to UpdateMediaPublishState.
MediaId String Yes Media ID.
Publish Boolean Yes Publication status, which can be True or False.

Rules of media publication status transition:

  • Default status

    The default status of media publication is “Initial”. A media file is in the default status under two conditions:

    • Add media

      After a media file is generated (a media workflow is also triggered) for the first time, the media file is neither published nor unpublished while workflow execution is in progress. The media file is in “Initial” state. After workflow execution is complete, the media file is set to a definite state (according to the workflow configuration).

    • Delete media

      After a media file is deleted, the publication status is meaningless and the file is in “Initial” state. To restore the deleted media file to the library, execute a workflow on the file as new media.

  • Transition rules
Caller Current status Status after transition Allowed or not
API Initial Published No
API Initial Unpublished No
API Published Unpublished Yes
API Unpublished Published Yes
Workflow execution Initial Published Yes
Workflow execution Initial Unpublished Yes
Workflow execution Published Unpublished No
Workflow execution Unpublished Published No

Return parameters

None

Example

Request example

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

Return example

XML

  1. <UpdateMediaPublishStateResponse>
  2. <RequestId>179F447A-B688-4268-9662-9ECC43B235BF</RequestId>
  3. </UpdateMediaPublishStateResponse>

JSON

  1. {
  2. "RequestId":"D591D0DE-8341-4C51-A519-8BF68498DDDC"
  3. }
Thank you! We've received your feedback.