ListTasks

Updated at:

Description: Queries a list of tasks.

Path: /rpa/openapi/raas/task/ListTasks

Method: GET

Usage notes:

  • None.

Request parameters:

Parameter

Type

Required

Example

Description

TaskStatus

String

No

terminated

The task status. Valid values:

  • terminated: The task ended with an error.

  • complete: The task completed.

  • waiting: The task is waiting to run.

  • running: The task is running.

RobotId

String

No

11DC8 ****** A4E463B1E538436035653

The robot ID. This parameter cannot be used with PackId.

PackId

String

No

bv2XPrDl

The robot group ID. This parameter cannot be used with RobotId.

CurrentPage

Integer

No

1

The page number to return. Default: 1.

PageSize

Integer

No

20

The number of entries to return on each page. Default: 20. Maximum: 100.

TimeType

String

No

createTime

  • The time field to use for filtering. Valid values:

    • createTime: task creation time

    • beginTime: task start time

    • endTime: task end time

  • This parameter must be used with FromTime and ToTime.

FromTime

String

No

2025-01-15T08:00:00Z

  • The start of the time range for the query.

  • FromTime and ToTime must be used together. The time range cannot exceed 24 hours.

  • The time must be in ISO 8601 format and UTC. Format: yyyy-MM-ddTHH:mm:ssZ.

ToTime

String

No

2025-01-15T08:02:00Z

  • The end of the time range for the query.

  • FromTime and ToTime must be used together. The time range cannot exceed 24 hours.

  • The time must be in ISO 8601 format and UTC. Format: yyyy-MM-ddTHH:mm:ssZ.

Response parameters

For a list of common response parameters, see Response Structure. The following table describes the fields in the data object.

Parameter

Type

Example

Description

TaskId

String

2610971f -****-****-****- 62276a17de57

The task ID.

TaskStatus

String

complete

The status of the task. Valid values:

  • terminated

  • complete

  • waiting

  • running

AllocationMode

String

manu

The allocation mode. Valid values: auto (automatic allocation) and manu (manual assignment).

TaskCreateTime

String

2022-05-16 20:00:00

The time when the task was created.

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.

TaskPriority

Integer

50

The task priority.

AppId

String

08f653b0- -****-****-****- 0ff03cc87b97

The application ID.

CallbackUrl

String

http://example.callback.com

The callback URL specified when the task was created.

RobotId

String

11DC817 ****** 4E463B1E538436035653

The robot ID.

PackId

String

bv2XPrDl

The robot group ID.

HasOpenHciTodo

String

False

Specifies whether the task contains unprocessed human intervention items. For information about HCI, see Hci.

NeedHumanIntervention

String

False

Specifies whether the task requires human intervention. For information about HCI, see Hci.

LatestHciTodoId

String

069c21c7-******

The ID of the latest human intervention item in the task. This parameter is null if the task has no HCI items. For information about HCI, see Hci.

Request example

https://console-rpa.aliyun.com/rpa/openapi/raas/task/ListTasks?
&RobotId=A393EF68C917******87353484322F7
&currentPage=1
&PageSize=2
&

Response example

{
	"requestId": "58fe68d1-****-****-****-519ab8911c49",
	"success": true,
	"code": 0,
	"msg": "The call was successful.",
	"msgCode": "result.success",
	"data": [{
		"TaskId": "6868d68e-****-****-****-b449d9536362",
		"TaskStatus": "complete",
		"AllocationMode": "auto",
		"TaskBeginTime": "2022-07-20 23:14:49",
		"TaskEndTime": "2022-07-20 23:15:41",
		"TaskPriority": 30,
		"AppId": "9488635a-****-****-****-664c84c188fc",
		"CallbackUrl": "http://30.11.X.X/rpa/api/csrf/ajax",
		"RobotId": "A393EF68C917B******87353484322F7",
		"PackId": "4f5ffab5-****-****-****-b28efa61d2ea",
		"HasOpenHciTodo": true,
		"NeedHumanIntervention": true,
		"LatestHciTodoId": "069c21c7-****-****-****-****"
	}, {
		"TaskId": "7faf3e08-****-****-****-57feb75aef25",
		"TaskStatus": "terminated",
		"AllocationMode": "auto",
		"TaskBeginTime": "2022-07-20 23:16:27",
		"TaskEndTime": "2022-07-20 23:16:32",
		"TaskPriority": 30,
		"AppId": "9488635a-****-****-****-664c84c188fc",
		"CallbackUrl": "http://30.11.X.X/rpa/api/csrf/ajax",
		"RobotId": "A393EF68C917BFA******353484322F7",
		"PackId": "4f5ffab5-****-****-****-b28efa61d2ea",
		"HasOpenHciTodo": false,
		"NeedHumanIntervention": false,
		"LatestHciTodoId": null
	}],
	"pager": {
		"currentPage": 1,
		"totalPage": 11,
		"pageSize": 2,
		"total": 21,
		"limit": 2,
		"offset": 0
	},
	"instanceId": null
}