Lea y revise la documentación de Automation Anywhere

Automation 360

Cerrar contenidos

Contenidos

Abrir contenidos

Request device details

  • Actualizado: 2020/07/10
    • Automation 360 v.x
    • Explorar
    • Espacio de trabajo de RPA

Request device details

Use this API to retrieve a list of devices that are available for bot deployment.

Antes de empezar

Roles y licencias
You have to authenticate as a user with an Unattended bot runner license.
  • Dirección URL:
    http://<your_control_room_url>/v2/devices/list
  • Método: PUBLICAR
Supported filterable parameters:
id
The numeric identifier for a device.
  • Campo: id
  • Tipo: integer
{
  "filter": {
    "operator": "eq",
    "value": "7",
    "field": "id"
  }
}
hostName
The name of the registered device.
  • Campo: hostName
  • Tipo: cadena
{
  "filter": {
    "operator": "substring",
    "value": "AA",
    "field": "hostName"
  }
}
userId
A unique numeric identifier for the user associated with the registered device.
  • Campo: userId
  • Tipo: largo
{
  "filter": {
    "operator": "eq",
    "value": "13",
    "field": "userId"
  }
}
status
The connection status of device.
  • Campo: status
  • Tipo: cadena
{
  "filter": {
     "operator": "eq",
     "value": "CONNECTED",
     "field": "status"
      }
}

This task requests a list of all devices with a specific string in the hostname parameter and specific status of the device. Use the list in the response to identify which devices are connected and available to run bots.

Procedimiento

  1. Use the POST method to generate an authentication JSON Web Token. Add the generated authentication token to the request header.
  2. Seleccione el método POST.
  3. Enter the URL for the API:
    https://<your_control_room_url>/v2/devices/list
  4. In the request body, add the filtering, sorting, and pagination rules to retrieve the device list that you want to deploy.
    Nota: The fields array filter parameter in the request body is currently not supported. When you send the field name in the request body to restrict the number of fields in the response, it does not work as expected and instead returns all the fields.
    For example, this request body uses "and" as operator and the device "status" and "hostname" as field to filter the required results. The results will be sorted in "descending" order based on "status".
    {
      "sort": [
        {
          "field": "status",
          "direction": "desc"
        }
      ],
      "filter": {
        "operator": "and",
        "operands": [
          {
            "operator": "eq",
            "value": "CONNECTED",
            "field": "status"
          },
          {
            "operator": "substring",
            "value": "win",
            "field": "hostName"
          }
        ]
      },
      "fields": [
        
      ],
      "page": {
        "offset": 0,
        "total": 71,
        "totalFilter": 18,
        "length": 100
      }
    }
  5. Envíe la solicitud.
    • En un cliente REST, haga clic en ENVIAR.
    • En la interfaz de Swagger, haga clic en Ejecutar.

    Cuerpo de la respuesta:

    The response returns the details of two devices that are in the "connected" status and for which the hostName starts with "win" based on the requested filter criteria.
    {
      "page": {
        "offset": 0,
        "total": 71,
        "totalFilter": 7
      },
      "list": [{
        "id": "163",
        "type": "ATTENDED_BOT_RUNNER",
        "hostName": "winwlm-2",
        "userId": "",
        "userName": "",
        "status": "CONNECTED",
        "poolName": "",
        "fullyQualifiedHostName": "-",
        "updatedBy": "b2",
        "updatedOn": "2020-07-07T08:24:56.091061Z",
        "botAgentVersion": "12.1"
      }, {
        "id": "162",
        "type": "ATTENDED_BOT_RUNNER",
        "hostName": "winwlm-1",
        "userId": "",
        "userName": "",
        "status": "CONNECTED",
        "poolName": "",
        "fullyQualifiedHostName": "-",
        "updatedBy": "b1",
        "updatedOn": "2020-07-07T08:24:55.982047Z",
        "botAgentVersion": "12.1"
      }
    }

Qué hacer a continuación

You can use the device IDs received in the response to deploy the bots on Bot Runners.
Enviar comentarios