Queries media workflow execution instances.
Description
- You can call this operation to query a maximum of 10 media workflow execution instances at a time.
- Before you call this operation, make sure that the workflow pipeline is enabled. Otherwise, the workflow may not run as expected. For example, the following exceptions may occur: the workflow node is invalid and jobs created in the workflow cannot be executed.
QPS limit
You can call this operation up to 100 times per second. 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
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | QueryMediaWorkflowExecutionList |
The operation that you want to perform. Set the value to QueryMediaWorkflowExecutionList. |
| RunIds | String | Yes | 48e33690ac19445488c706924321**** |
The IDs of the media workflow execution instances. To obtain the instance ID, log on to the ApsaraVideo Media Processing (MPS) console and choose Workflows > Execution Instances in the left-side navigation pane. Separate multiple IDs with commas (,). You can query a maximum of 10 media workflow execution instances at a time. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| NonExistRunIds | Array of String | null |
The IDs of the execution instances that do not exist. null is returned if all specified execution instances exist. |
| MediaWorkflowExecutionList | Array of MediaWorkflowExecution |
The details of the media workflows. |
|
| MediaWorkflowExecution | |||
| CreationTime | String | 016-04-01T06:53:43Z |
The time when the media workflow was created. |
| MediaWorkflowId | String | 93ab850b4f6f44eab54b6e91****81d4 |
The ID of the media workflow. |
| State | String | Completed |
The status of the media workflow. Valid values:
Note Completed only indicates that the media workflow is complete. View the status of each
method in the workflow, such as the transcode and snapshot methods, to check whether
the method is called.
|
| ActivityList | Array of Activity |
The methods that are called in the media workflow. |
|
| Activity | |||
| EndTime | String | 2016-04-01T06:53:44Z |
The time when the method ends. |
| Type | String | Start |
The methods that are supported in the media workflow. Valid values: Start, Snapshot, Transcode, Analysis, and Report. For more information, see Methods supported for media workflows. |
| StartTime | String | 2016-04-01T06:53:44Z |
The time when the method is called. |
| State | String | Running |
The status of the method. Valid values:
Note For example, after the analysis is complete, the transcode method is called and high-definition
and standard-definition transcoding jobs are created. The system determines whether
to run the jobs based on the analysis result. If the resolution of the input video
is low, the high-definition transcoding job may be skipped.
|
| JobId | String | 2376030d9d0849399cd20e20f4f3**** |
The IDs of the jobs that are generated when the methods are called. For example, job IDs for the analysis, transcode, and snapshot methods. |
| Code | String | InvalidParameter.ResourceContentBad |
The error code returned when the method fails to be called.
|
| Message | String | The resource operated InputFile is bad |
The error message returned when the method fails to be called.
|
| Name | String | Start |
The name of the method. Note The name of each method in a media workflow is unique.
|
| MNSMessageResult | Object |
The message sent by Message Service (MNS) to notify the user of the job result. |
|
| MessageId | String | 4f3bc83233de4e2f81c7dade443e**** |
The ID of the message that indicates the MNS message is sent. This parameter is not returned if the MNS message fails to be sent. |
| ErrorMessage | String | MessageConfigEmpty |
The error message returned when the MNS message fails to be sent. This parameter is not returned if the MNS message is sent. |
| ErrorCode | String | The Topic/Queue config is empty, not send message |
The error code returned when the MNS message fails to be sent. This parameter is not returned if the MNS message is sent. |
| Name | String | example-mediaworkflow-**** |
The name of the media workflow. |
| Input | Object |
The input data of the media workflow. |
|
| UserData | String | example data **** |
The custom data. |
| InputFile | Object |
The input file of the media workflow. |
|
| Object | String | example-mediaWorkflow-****/example-object-****/example.mp4 |
The name of the Object Storage Service (OSS) object that is used as the input file. |
| Location | String | mps-cn-shanghai |
The ID of the region in which the input file resides. |
| Bucket | String | example-bucket-**** |
The name of the OSS bucket in which the input file is stored. |
| MediaId | String | 512046582a924698a41e0f8b0d2b**** |
The ID of the media file. A media file contains all the information about a media workflow. |
| RunId | String | 48e33690ac19445488c706924321**** |
The ID of the execution instance. |
| RequestId | String | D1D5C080-8E2F-5030-8AB4-13092F17631B |
The ID of the request. |
Examples
Sample requests
http(s)://mts.cn-hangzhou.aliyuncs.com/?Action=QueryMediaWorkflowExecutionList
&RunIds=48e33690ac19445488c706924321****
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<QueryMediaWorkflowExecutionListResponse>
<NonExistRunIds>null</NonExistRunIds>
<MediaWorkflowExecutionList>
<CreationTime>016-04-01T06:53:43Z</CreationTime>
<MediaWorkflowId>93ab850b4f6f44eab54b6e91****81d4</MediaWorkflowId>
<State>Completed</State>
<ActivityList>
<EndTime>2016-04-01T06:53:44Z</EndTime>
<Type>Start</Type>
<StartTime>2016-04-01T06:53:44Z</StartTime>
<State>Running</State>
<JobId>2376030d9d0849399cd20e20f4f3****</JobId>
<Code>InvalidParameter.ResourceContentBad</Code>
<Message>The resource operated InputFile is bad</Message>
<Name>Start</Name>
<MNSMessageResult>
<MessageId>4f3bc83233de4e2f81c7dade443e****</MessageId>
<ErrorMessage>MessageConfigEmpty</ErrorMessage>
<ErrorCode>The Topic/Queue config is empty, not send message</ErrorCode>
</MNSMessageResult>
</ActivityList>
<Name>example-mediaworkflow-****</Name>
<Input>
<UserData>example data ****</UserData>
<InputFile>
<Object>example-mediaWorkflow-****/example-object-****/example.mp4</Object>
<Location>mps-cn-shanghai</Location>
<Bucket>example-bucket-****</Bucket>
</InputFile>
</Input>
<MediaId>512046582a924698a41e0f8b0d2b****</MediaId>
<RunId>48e33690ac19445488c706924321****</RunId>
</MediaWorkflowExecutionList>
<RequestId>D1D5C080-8E2F-5030-8AB4-13092F17631B</RequestId>
</QueryMediaWorkflowExecutionListResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"NonExistRunIds" : [ "null" ],
"MediaWorkflowExecutionList" : [ {
"CreationTime" : "016-04-01T06:53:43Z",
"MediaWorkflowId" : "93ab850b4f6f44eab54b6e91****81d4",
"State" : "Completed",
"ActivityList" : [ {
"EndTime" : "2016-04-01T06:53:44Z",
"Type" : "Start",
"StartTime" : "2016-04-01T06:53:44Z",
"State" : "Running",
"JobId" : "2376030d9d0849399cd20e20f4f3****",
"Code" : "InvalidParameter.ResourceContentBad",
"Message" : "The resource operated InputFile is bad",
"Name" : "Start",
"MNSMessageResult" : {
"MessageId" : "4f3bc83233de4e2f81c7dade443e****",
"ErrorMessage" : "MessageConfigEmpty",
"ErrorCode" : "The Topic/Queue config is empty, not send message"
}
} ],
"Name" : "example-mediaworkflow-****",
"Input" : {
"UserData" : "example data ****",
"InputFile" : {
"Object" : "example-mediaWorkflow-****/example-object-****/example.mp4",
"Location" : "mps-cn-shanghai",
"Bucket" : "example-bucket-****"
}
},
"MediaId" : "512046582a924698a41e0f8b0d2b****",
"RunId" : "48e33690ac19445488c706924321****"
} ],
"RequestId" : "D1D5C080-8E2F-5030-8AB4-13092F17631B"
}
Error codes
For a list of error codes, visit the API Error Center.