Creates a media workflow.
Operation description
You can call this operation to define the topology, activities, and dependencies of a media workflow. The topology is represented by a directed acyclic graph (DAG) in the console. For more information, see Media workflow activities. You can view and run the workflows that are created by calling this operation in the ApsaraVideo Media Processing (MPS) console.
Limits on QPS
You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | Yes | The name of the media workflow.
| mediaworkflow-example |
Topology | string | Yes | The topology of the media workflow. The value must be a JSON object that contains the activity list and activity dependencies. For more information, see the Sample topology section of this topic. | |
TriggerMode | string | No | The trigger mode of the media workflow. Valid values:
| OssAutoTrigger |
Sample topology
{
"Activities": {
"Act-Transcode-M3U8": {
"Parameters": {
"Outputs": [
{
"OutputObject": "transcode%2F%7BObjectPrefix%7D%7BFileName%7D",
"TemplateId": "957d1719ee85ed6527b90cf62726****"
}
],
"OutputBucket": "example-vod-hls",
"OutputLocation": "oss-cn-hangzhou"
},
"Type": "Transcode"
},
"Act-Start": {
"Name": "Act-Start",
"Parameters": {
"PipelineId": "130266f58161436a80bf07cb12c8****",
"InputFile": {
"Bucket": "example-vod",
"Location": "oss-cn-hangzhou"
}
},
"Type": "Start"
},
"Act-Report": {
"Name": "Act-Report",
"Parameters": {
},
"Type": "Report"
}
},
"Dependencies": {
"Act-Transcode-M3U8": [
"Act-Report"
],
"Act-Start": [
"Act-Transcode-M3U8"
],
"Act-Report": [
]
}
}
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "F1D21261-ADB9-406A-1234-491382139D59",
"MediaWorkflow": {
"CreationTime": "016-04-01T05:29:37Z",
"MediaWorkflowId": "e00732b977da427d9177a4deb1aa****",
"State": "Active",
"TriggerMode": "OssAutoTrigger",
"Name": "mediaworkflow-example",
"Topology": ""
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|