All Products
Search
Document Center

Intelligent Media Services:GetWorkflowTask

Last Updated:Dec 16, 2024

Queries the information about a workflow task by task ID, including the workflow ID and the status and result of the task. You can query only the workflow task data of the last year.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:GetWorkflowTaskget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringNo

The ID of the workflow task.

******4215e042b3966ca5441e******

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

******0C-7870-15FE-B96F-8880BB******
WorkflowTaskobject

The information about the workflow task.

TaskIdstring

The ID of the workflow task.

******4215e042b3966ca5441e******
Statusstring

The task state.

Valid values:

  • Init: The task is being initialized.
  • Failed: The task failed.
  • Canceled: The task is canceled.
  • Processing: The task is in progress.
  • Succeed: The task is successful.
Succeed
TaskInputstring

The input of the workflow task.

{ "Type": "Media", "Media": "******30706071edbfe290b488******" }
CreateTimestring

The time when the task was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-01-04T02:05:17Z
FinishTimestring

The time when the task was complete. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-01-04T02:06:19Z
Workflowobject

The workflow Information.

WorkflowIdstring

The workflow ID.

******63dca94c609de02ac0d1******
Namestring

The workflow name.

Statusstring

The workflow state.

Valid values:

  • Active
  • Inactive
Active
Typestring

The workflow type.

Valid values:

  • Customize: custom workflow.
  • System: system workflow.
  • Common: user-created workflow.
Common
CreateTimestring

The time when the workflow was created.

2022-11-27T10:02:12Z
ModifiedTimestring

The time when the workflow was last modified.

2022-11-29T02:06:19Z
ActivityResultsstring

The results for all nodes of the workflow task.

UserDatastring

The user-defined field that was specified when the workflow task was submitted.

{"NotifyAddress":"http://xx.xx.xxx"}

Examples

Sample success responses

JSONformat

{
  "RequestId": "******0C-7870-15FE-B96F-8880BB******",
  "WorkflowTask": {
    "TaskId": "******4215e042b3966ca5441e******",
    "Status": "Succeed",
    "TaskInput": "{\n      \"Type\": \"Media\",\n      \"Media\": \"******30706071edbfe290b488******\"\n}",
    "CreateTime": "2023-01-04T02:05:17Z",
    "FinishTime": "2023-01-04T02:06:19Z",
    "Workflow": {
      "WorkflowId": "******63dca94c609de02ac0d1******",
      "Name": "",
      "Status": "Active",
      "Type": "Common",
      "CreateTime": "2022-11-27T10:02:12Z",
      "ModifiedTime": "2022-11-29T02:06:19Z\n"
    },
    "ActivityResults": "",
    "UserData": "{\"NotifyAddress\":\"http://xx.xx.xxx\"}"
  }
}

Error codes

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