ListTaskDetails

更新时间:
复制 MD 格式

Description: Gets the details of one or more tasks.

Path: /rpa/openapi/raas/task/ListTaskDetails

Method: GET

Usage:

  • No special instructions.

Usage limits:

Important

For details about API call throttling, see call throttling.

Request parameters:

Parameter

Type

Required

Example

Description

TaskIds

Array of strings. Serialization style: simple

Yes

["3226a05a-****-****-****-b8fb7e4561c6", "092fb04a-****-****-****-6c0301a3b066"]

A list of task IDs. You can specify a maximum of 10 task IDs in a single request. To query the details of more than 10 tasks, send multiple requests.

Response parameters:

For details about common response parameters, see the general response structure. The following table describes the fields in the data object.

Parameter

Type

Example

Description

TaskId

String

ca9be99c-****-****-****-ee6a1f67cb68

The task ID.

TaskStatus

String

complete

The task status.

TaskStatusLatestUpdateTime

String

2022-05-16 21:07:03

The time when the task status was last updated.

TaskBeginTime

String

2022-05-16 20:00:00

The time when the task started.

TaskEndTime

String

2022-05-16 21:07:03

The time when the task ended.

AllocateMode

String

manu

The task allocation mode.

TaskPriority

Integer

50

The task priority.

AppId

String

de6f8980-****-****-****-3b0090c2d12f

The application ID.

AppParams

Array of JSON

[{"name":"Parameter1","value":""},{"name":"Parameter2","value":""}]

The application's input parameters specified at task creation.

TaskResult

String

Sample result

For usage and limits, see task_result.

RobotId

String

11DC8******1A4E463B1E538436035653

The robot ID.

PackId

String

bv2XPrDl

The robot group ID.

CallbackUrl

String

http://example.callback.com

The callback URL specified at task creation.

TaskErrorInfo

A JSON object serialized as a string

{

"Source": "client",

"Description": "Timed out waiting for the UI element.",

"Operator": {

"Id": "exampleUserId",

"Name": "exampleUserName"

},

"StatusCode": {

"Code": "0000",

"Value": "terminatedUnexpected"

}

}

Provides details about a failed task. This field is null for successful tasks. For a description of each field, see the table below.

The following table describes the fields in the TaskErrorInfo object.

Parameter

Type

Example

Description

Source

String

api

The source of the operation that caused the abnormal termination. Valid values are console, api, and client.

Description

String

The task was terminated manually.

A brief description of the abnormal termination.

Operator

A JSON object serialized as a string

{

"Id": "exampleUserId",

"Name": "exampleUserName"

}

Information about the operator. Contains the string fields Id (user ID) and Name (user name).

StatusCode

A JSON object serialized as a string

{

"Code": "4000",

"Value": "raas.task.terminatedManually"

}

The task status code object. The Code and Value fields are strings. The following lists the possible values for the Code field:

0000: Default value, indicates an abnormal termination.

3001: The task was stopped from the console.

3002: The task's robot group was deleted from the console.

3004: The robot assigned to the task was deleted from the console.

4001: The task was stopped by an API call.

4002: The task's robot group was deleted by an API call.

4004: The robot assigned to the task was deleted by an API call.

4005: The task terminated abnormally because an API call cleared the queue.

Request example:

https://console-rpa.aliyun.com/rpa/openapi/raas/task/ListTaskDetails?
&TaskIds=%5B014b9ab1-51c2-446f-b8c1-b685429a8764%5D
&<common request parameters>

Response example:

{
	"requestId": "0c9be650-****-****-****-7f29841d8207",
	"success": true,
	"code": 0,
	"msg": "The request was successful.",
	"msgCode": "result.success",
	"data": [{
		"TaskId": "db23a4a0-****-****-****-667453882246",
		"TaskStatus": "complete",
		"TaskStatusLatestUpdateTime": "2022-07-21 16:36:46",
		"TaskBeginTime": "2022-07-21 16:36:37",
		"TaskEndTime": "2022-07-21 16:36:46",
		"AllocateMode": "auto",
		"TaskPriority": 50,
		"AppId": "0925860d-****-****-****-446d0cdb2ff5",
		"AppParams": null,
		"TaskResult": null,
		"RobotId": "6579633******178CAC2FCBD5BD0B4EC",
		"PackId": "nO5494bS",
		"CallbackUrl": "http://example.callback.com",
    "TaskErrorInfo":"{
                      	\"Source\": \"client\",
                      	\"Description\": \"Timed out waiting for the UI element.\",
                      	\"Operator\": {
                      		\"Id\": \"exampleUserId\",
                      		\"Name\": \"exampleUserName\"
                      	},
                      	\"StatusCode\": {
                      		\"Code\": \"0000\",
                      		\"Value\": \"terminatedUnexpected\"
                      	}
                      }",
	}],
	"pager": null,
	"instanceId": null
}