调用QueryMediaWorkflowExecutionList查询媒体工作流执行实例。
使用说明
- 本接口一次最多查询10个媒体工作流执行实例。
- 请确保工作流中使用的管道为开启状态,否则可能会导致工作流无法正常使用(比如:工作流节点显示已失效、工作流状态一直卡在已提交等)。
QPS限制
本接口的单用户QPS限制为100次/秒。超过限制,API调用会被限流,这可能会影响您的业务,请合理调用。更多信息,请参见QPS限制。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | QueryMediaWorkflowExecutionList | 操作接口名,系统规定参数,取值:QueryMediaWorkflowExecutionList。 |
| RunIds | String | 是 | 48e33690ac19445488c706924321**** | 媒体工作流执行实例ID列表,可以通过MPS控制台 > 工作流管理 > 执行实例获取。使用半角逗号(,)分隔,一次最多查询10个。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| NonExistRunIds | Array of String | null | 不存在的执行实例ID。如果没有则此参数不返回。 |
| MediaWorkflowExecutionList | Array of MediaWorkflowExecution | 媒体工作流列表。 |
|
| MediaWorkflowExecution | |||
| CreationTime | String | 016-04-01T06:53:43Z | 创建时间。 |
| MediaWorkflowId | String | 93ab850b4f6f44eab54b6e91****81d4 | 媒体工作流ID。 |
| State | String | Completed | 状态。取值:
说明 Completed仅表示工作流执行完成,每个活动的(转码、截图等)是否成功要看每个活动具体的状态值。
|
| ActivityList | Array of Activity | 媒体工作流活动列表。 |
|
| Activity | |||
| EndTime | String | 2016-04-01T06:53:44Z | 活动结束执行时间。 |
| Type | String | Start | 媒体工作流活动类型。可取值:Start活动、Snapshot活动、Transcode活动、Analysis活动、Report活动。更多活动信息请参见媒体工作流活动介绍。 |
| StartTime | String | 2016-04-01T06:53:44Z | 活动开始执行时间。 |
| State | String | Running | 状态。取值:
说明 例如:分析活动之后有高清、标清两个转码活动,会根据实际分析的结果来决策,如果原视频内容清晰度不够,高清的转码活动就可能被跳过。 |
| JobId | String | 2376030d9d0849399cd20e20f4f3**** | 活动执行时生成的作业ID(例如分析作业ID、转码作业ID、截图作业ID)。 |
| Code | String | InvalidParameter.ResourceContentBad | 错误码。
|
| Message | String | The resource operated InputFile is bad | 错误信息。
|
| Name | String | Start | 媒体工作流活动名称。 说明 在同一个工作流中活动的名字是唯一的。 |
| MNSMessageResult | Object | MNS通知用户作业完成结果。 |
|
| MessageId | String | 4f3bc83233de4e2f81c7dade443e**** | 执行成功时消息的ID。如果执行失败则不返回此参数。 |
| ErrorMessage | String | MessageConfigEmpty | 执行失败时错误信息。如果执行成功则不返回此参数。 |
| ErrorCode | String | The Topic/Queue config is empty, not send message | 执行失败时错误码。如果执行成功则不返回此参数。 |
| Name | String | example-mediaworkflow-**** | 媒体工作流名称。 |
| Input | Object | 媒体工作流的用户自定义数据。 |
|
| UserData | String | example data **** | 用户自定义数据。 |
| InputFile | Object | 媒体工作流的输入文件。 |
|
| Object | String | example-mediaWorkflow-****/example-object-****/example.mp4 | 输入文件的OSS Object。 |
| Location | String | mps-cn-shanghai | 输入文件的OSS Location。 |
| Bucket | String | example-bucket-**** | 输入文件的OSS Bucket。 |
| MediaId | String | 512046582a924698a41e0f8b0d2b**** | 媒体ID。媒体工作流生成的所有信息都属于这个媒体ID。 |
| RunId | String | 48e33690ac19445488c706924321**** | 执行实例ID。 |
| RequestId | String | D1D5C080-8E2F-5030-8AB4-13092F17631B | 请求ID。 |
示例
请求示例
http(s)://mts.cn-hangzhou.aliyuncs.com/?Action=QueryMediaWorkflowExecutionList
&RunIds=48e33690ac19445488c706924321****
&<公共请求参数>
正常返回示例
XML格式
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格式
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"
}
错误码
访问错误中心查看更多错误码。