Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Search for roles API

  • Updated: 10/09/2021
    • Automation 360 v.x
    • Explore
    • RPA Workspace

Search for roles API

Use the Search for Roles API to retrieve a list of all roles in the Control Room.

Prerequisites

Ensure you have an admin role or a custom role with View Roles permission to search for roles.

Procedure

  1. Add the authentication token to the request header.
  2. Apply filters to perform basic conditional queries and pagination control for processing web pages. There are three basic features related to filtering: filtering conditions, sorting columns, and pagination parameters. See Filters in an API request body.
  3. Use the POST method and endpoint URL: <your control room>/v1/usermanagement/roles/list
    The following request finds roles with a name that contains test and were created between June 1 and October 6, 2020.
    Request body:
    {
      "fields": [],
      "filter": {
        "operator": "and",
        "operands": [
          {
            "operator": "substring",
            "field": "name",
            "value": "test"
          },
          {
            "operator": "gt",
            "field": "createdOn",
            "value": "2020-06-01T00:00:00.989Z"
          },
          {
            "operator": "lt",
            "field": "createdOn",
            "value": "2020-10-06T23:00:00.123Z"
          }
        ]
      }
    }
  4. Send the request.

    In this example, the response body brings five roles with the name test, and when and who created a role, as well as, whether a role was a system created role or not.

    Response body;
    {
        "page": {
            "offset": 0,
            "total": 106,
            "totalFilter": 5
        },
        "list": [
            {
                "id": 102,
                "name": "whatfixtest",
                "description": "",
                "countPrincipals": 0,
                "version": 3,
                "createdBy": 278,
                "createdOn": "2020-06-02T18:22:55.633Z",
                "updatedBy": 34,
                "updatedOn": "2020-09-02T23:26:11.930Z",
                "systemRole": false
            },
            {
                "id": 115,
                "name": "export-role-test",
                "description": "",
                "countPrincipals": 5,
                "version": 8,
                "createdBy": 261,
                "createdOn": "2020-06-04T10:59:45.343Z",
                "updatedBy": 96,
                "updatedOn": "2020-09-14T16:56:33.310Z",
                "systemRole": false
            },
            {
                "id": 391,
                "name": "testROle",
                "description": "",
                "countPrincipals": 0,
                "version": 0,
                "createdBy": 169,
                "createdOn": "2020-07-01T01:08:45.243Z",
                "updatedBy": 169,
                "updatedOn": "2020-07-01T01:08:45.243Z",
                "systemRole": false
            },
            {
                "id": 401,
                "name": "bi-test-role",
                "description": "",
                "countPrincipals": 1,
                "version": 5,
                "createdBy": 1,
                "createdOn": "2020-07-02T02:56:57.893Z",
                "updatedBy": 96,
                "updatedOn": "2020-09-14T16:56:33.280Z",
                "systemRole": false
            },
            {
                "id": 470,
                "name": "repo_test",
                "description": "",
                "countPrincipals": 1,
                "version": 1,
                "createdBy": 1,
                "createdOn": "2020-09-09T07:49:46.993Z",
                "updatedBy": 96,
                "updatedOn": "2020-09-14T16:56:32.913Z",
                "systemRole": false
            }
        ]
    }
    The REST API responds to each request with an HTTP response code. For details about the response codes, see API response codes.
Send Feedback