Lists tasks based on specific conditions, such as by time range and by tag.
Operation description
Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
imm:ListTasks | list | *Project acs:imm:{#regionId}:{#accountId}:project/{#ProjectName} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ProjectName | string | Yes | test-project | |
TaskTypes | array | No | The task types. | |
string | No | The task type. For more information, see Task types. | ["OfficeConversion","VideoLabelClassification"] | |
NextToken | string | No | The pagination token. The pagination token is used in the next request to retrieve a new page of results if the total number of results exceeds the value of the MaxResults parameter. The next call to the operation returns results lexicographically after the NextToken parameter value. Note
Leave this parameter empty in your first call to the operation.
| MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpwZw== |
MaxResults | long | No | The maximum number of results to return. Valid value range: (0, 100]. Default value: 100. | 1 |
TagSelector | string | No | The custom tags of tasks. | test=val1 |
Sort | string | No | The field used to sort the results by. Valid values:
| TaskId |
Order | string | No | The sort order. Valid values:
| ASC |
Status | string | No | The task status. Valid values:
| Succeeded |
StartTimeRange | TimeRange | No | The range of task start time. You can specify this parameter to filter tasks that start within the specified range. | |
EndTimeRange | TimeRange | No | The range of task end time. You can specify this parameter to filter tasks that end within the specified range. | |
RequestDefinition | boolean | No | Specifies whether to return request parameters in the initial request to create the task. Default value: False. | True |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "9847E7D0-A9A3-0053-84C6-BA16FFFA726E",
"ProjectName": "immtest",
"NextToken": "MTIzNDU2Nzg6aW1tdGVzdDpleGFtcGxlYnVja2V0OmRhdGFzZXQwMDE6b3NzOi8vZXhhbXBsZWJ1Y2tldC9zYW1wbGVvYmplY3QxLmpwZw==",
"MaxResults": "1",
"Tasks": [
{
"Status": "Running",
"Code": "ResourceNotFound",
"Message": "The specified resource project is not found.",
"StartTime": "2021-12-24T03:01:41.662060377Z",
"EndTime": "2021-12-24T03:01:49.480109219Z",
"UserData": "{\"ID\": \"user1\",\"Name\": \"test-user1\",\"Avatar\": \"http://example.com?id=user1\"}",
"TaskType": "VideoLabelClassification",
"TaskId": "c2b277b9-0d30-4882-ad6d-ad661382****",
"Tags": {
"test": "test",
"test2": 1
},
"TaskRequestDefinition": "",
"Progress": 0
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-05-11 | The request parameters of the API has changed | View Change Details |