All Products
Search
Document Center

ApsaraVideo Media Processing:UpdateMediaPublishState

Last Updated:Mar 28, 2024

Updates the publishing status of a media file.

Operation description

The published state indicates that the access control list (ACL) of media playback resources and snapshot files is set to inherit the ACL of the bucket to which they belong. The unpublished state indicates that the ACL of media playback resources and snapshot files is set to private.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
MediaIdstringYes

The ID of the media file whose publishing status you want to update. You can obtain the ID of a media file from the response of the AddMedia operation. Alternatively, perform the following operations in the ApsaraVideo Media Processing (MPS) console: In the left-side navigation pane, choose Media Management > Media List. Find the required video and click Manage. The ID of the video is displayed on the Basics tab.

3e6149d5a8c944c09b1a8d2dc3e4****
PublishbooleanNo

The publishing status. Default value: Initialed. Valid values:

  • true: published.
  • false: unpublished.
true

Default publishing state of a media file and status change rules

Default publishing state:

The default publishing state of a media file is Initialed. The following two types of media files are in the Initialed state:

  • New media file: When a media file is generated for the first time (a media workflow is triggered for the first time), and the media execution of the workflow is in progress, the media file is in the Initialed state. After the execution of the media workflow is complete, the status of the media file changes to published or unpublished based on the configurations of the media workflow.
  • Deleted media file: After a media file is deleted, the publishing status is meaningless, and the media file is in the Initialed state. If you restore the deleted media file to the media library, a workflow is executed on the file as a new media file.

Status change rules

NoteThe publishing status changes among the Initialed, published, and unpublished states. The status change rules for the API are different from those for workflow execution.

CallerStatusChanged statusAllowed
APIInitialedPublishedNo
APIInitialedUnpublishedNo
APIPublishedUnpublishedYes
APIUnpublishedPublishedYes
Workflow executionInitialedPublishedYes
Workflow executionInitialedUnpublishedYes
Workflow executionPublishedUnpublishedNo
Workflow executionUnpublishedPublishedNo

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

91B6CAB9-034C-4E4E-A40B-E7F5C81E688C

Examples

Sample success responses

JSONformat

{
  "RequestId": "91B6CAB9-034C-4E4E-A40B-E7F5C81E688C"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history