Queries media workflow execution instances based on their IDs.

Usage notes

You can call this operation to query up to 10 media workflow execution instances at a time.

QPS limit

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 limits.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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, you can log on to the ApsaraVideo Media Processing (MPS) console and choose Workflows > Execution Instances. Separate multiple IDs with commas (,). You can query up to 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. If all specified execution instances exist, this parameter is not returned.

MediaWorkflowExecutionList Array of MediaWorkflowExecution

The list of media workflow execution instances.

MediaWorkflowExecution
CreationTime String 016-04-01T06:53:43Z

The time when the execution instance was created.

MediaWorkflowId String 93ab850b4f6f44eab54b6e91****81d4

The ID of the media workflow.

State String Completed

The status of the execution instance. Valid values:

  • running: The execution instance is in progress.
  • Completed: The execution instance is complete.
Note A value of Completed indicates that the execution instance is complete. For the information about whether each activity, such as Transcode or Snapshot, is successful, check the status of the activity.
  • Fail: The execution instance failed.
ActivityList Array of Activity

The list of activities that are executed in the media workflow.

Activity
EndTime String 2016-04-01T06:53:44Z

The end time of the activity.

Type String Start

The type of the media workflow activity. Valid values: Start, Snapshot, Transcode, Analysis, and Report. For more information, see Media workflow activities.

StartTime String 2016-04-01T06:53:44Z

The start time of the activity.

State String Running

The status of the activity. Valid values:

  • Running: The activity is being executed.
  • Success: The activity was successfully executed.
  • Fail: The activity failed to be executed.
  • Skipped: The activity was skipped.
Note For example, the high-definition and standard-definition transcoding activities are to be run after the analysis activity is complete. The system determines the activity to run based on the analysis result. If the definition of the input video content is insufficient, the high-definition transcoding activity may be skipped.
JobId String 2376030d9d0849399cd20e20f4f3****

The job ID, such as the analysis job ID, transcoding job ID, or snapshot job ID, generated when the activity is executed.

Code String InvalidParameter.ResourceContentBad

The error code returned.

  • The specific error code appears if the activity status is Fail.
  • This parameter is not returned if the activity status is Success.
Message String The resource operated InputFile is bad

The error message returned.

  • The detailed error message appears if the activity status is Fail.
  • This parameter is not returned if the activity status is Success.
Name String Start

The name of the media workflow activity.

Note The name of an activity 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 success message. If the job fails, this parameter is not returned.

ErrorMessage String MessageConfigEmpty

The error message returned when the job fails. If the job is successful, this parameter is not returned.

ErrorCode String The Topic/Queue config is empty, not send message

The error code returned when the job fails. If the job is successful, this parameter is not returned.

Name String example-mediaworkflow-****

The name of the media workflow.

Input Object

The custom data of the media workflow.

UserData String example data ****

The custom data.

InputFile Object

The information about the storage location of the input file of the media workflow in Object Storage Service (OSS).

Object String example-mediaWorkflow-****/example-object-****/example.mp4

The name of the OSS object that is used as the input file.

Location String mps-cn-shanghai

The ID of the OSS region where 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. This media file ID is associated with all information generated by the 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.