ListRobots

Updated at:

Description: Retrieves a list of robots.

Path: /rpa/openapi/raas/resource/ListRobots

Method: GET

Usage notes:

Important

This operation makes synchronous calls to cloud product APIs, which can increase latency. We recommend setting the NeedCloudResourceStatus parameter to false to reduce request latency.

Limitations:

Important

For API call limits, see Call limits.

Request parameters:

Parameter

Type

Required

Example

Description

RobotRunStatus

String

No

idle

  • The running status of the robot. Valid values: idle and busy.

  • If you do not specify this parameter, this filter is not applied.

PackId

String

No

bv2XPrDl

  • The ID of the robot group. This parameter cannot be used with the RobotIds parameter.

  • If you do not specify this parameter, this filter is not applied.

RobotIds

Array of String, serialization method: simple

No

["6579633...D178CAC2FCBD5BD0B4EC", "11DC817...4E463B1E538436035653"]

  • One or more robot IDs. This parameter cannot be used with the PackId parameter.

  • You can specify multiple IDs in a comma-separated list. You can query a maximum of 50 IDs per request. To query more, send requests in batches.

  • If you do not specify this parameter, this filter is not applied.

CurrentPage

Integer

No

1

The current page number. Default: 1.

PageSize

Integer

No

20

The number of entries per page. Default: 20. Maximum: 100.

RobotAuthorizedStatus

String

No

authorized

  • The authorization status of the robot. Valid values: authorized and unauthorized.

  • If you do not specify this parameter, this filter is not applied.

RobotConnectStatus

String

No

connected

  • The connection status of the robot. Valid values: connected and notConnected.

  • If you do not specify this parameter, this filter is not applied.

MachineInstanceId

String

No

ecd-******og6wmjf6xuz

  • The ID of the cloud resource instance. This parameter currently supports only the ID (DesktopId) of a single Elastic Desktop Service instance.

  • If you do not specify this parameter, this filter is not applied.

NeedCloudResourceStatus

String

No

true

  • Specifies whether to synchronously query the status of the cloud resource.

  • If you set this parameter to true or omit it, the system synchronously calls the Elastic Desktop Service API to query and return the desktop status.

  • If set to false, the system does not query the Elastic Desktop Service status, which reduces request latency.

Response parameters:

For information about common response parameters, refer to the response structure. The following table describes the fields in the data object.

Parameter

Type

Example

Description

RobotId

String

11DC817A...4E463B1E538436035653

The robot ID.

RobotName

String

exampleName

The robot name.

PackId

String

bv2XPrDl

The robot group ID.

MachineType

String

EDS

The type of the cloud resource. Currently, only Elastic Desktop Service (EDS) is supported.

MachineInstanceId

String

ecd-9s...yzo5y7i8

The ID of the cloud resource instance. Currently, this is the ID (DesktopId) of an Elastic Desktop Service instance.

RobotRunStatus

String

idle

The running status of the robot. Valid values: idle and busy. If the robot is not connected, this field is a hyphen (-).

RobotConnectStatus

String

connected

The connection status of the robot. Valid values: connected and notConnected.

RobotAuthorizedStatus

String

authorized

The authorization status of the robot. Valid values: authorized and unauthorized.

CloudResourceStatus

String

Running

The status of the cloud resource. Possible values:

  • Stopped: The instance is stopped.

  • Starting: The instance is starting.

  • Rebuilding: The instance is being rebuilt.

  • Running: The instance is running.

  • Stopping: The instance is stopping.

  • Expired: The instance has expired.

  • Deleted: The instance is deleted.

  • Pending: The instance is pending.

The system obtains the value of this field by calling cloud resource APIs, such as the Elastic Desktop Service API. If the API call fails, the value is --.

If NeedCloudResourceStatus is set to false, this field is always null.

WuyingConfigId

String

RA-7yZBppUZ

The ID of the cloud resource management configuration.

RobotRemark

String

Finance department robot

A custom remark for the robot. The value is null if no remark is set.

Request example:

https://console-rpa.aliyun.com/rpa/openapi/raas/resource/ListRobots?
&RobotRunStatus=idle
&PageSize=20
&CurrentPage=1
&<common request parameters>

Response example:

{
	"code": 0,
	"data": [{
        "RobotId": "6579633385******CAC2FCBD5BD0B4EC",
        "RobotName": "hz6m****u0unio",
        "PackId": "Qq****m3t",
        "MachineType": "EDS",
    	"MachineInstanceId": "ecd-9jh******15u0unio",
        "RobotRunStatus": "-",
        "RobotConnectStatus": "notConnected",
        "RobotAuthorizedStatus": "authorized",
        "CloudResourceStatus": "Running",
        "WuyingConfigId": "RA-7yZBppUZ",
    	"RobotRemark": null
	}],
	"msg": "Success",
	"msgCode": "result.success",
	"pager": {
		"currentPage": 1,
		"limit": 100,
		"offset": 0,
		"pageSize": 100,
		"total": 1,
		"totalPage": 1
	},
	"success": true
}