Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Create a new role API

  • Updated: 1/29/2021
    • Automation 360 v.x
    • Manage
    • RPA Workspace
    • API docs

Create a new role API

Use Create role API to create a new role with permissions in the Control Room.

Prerequisites

Ensure you have an admin role or a custom role with View and Manage Roles permission to create a new role.

Each permission requires the following mandatory parameters:
  • id: The numeric value that uniquely identifies the permission.
  • action: The action the permission enables.
  • resourceType: The resource group to which the action belongs.

Typically a user is given the role permission in conjunction with user management permission. Roles and permissions

Procedure

  1. Use the Authentication API to generate a JSON Web Token. See Authentication API.
  2. Use the POST method and endpoint URL: <your_control_room_url>/v1/usermanagement/roles

    The following request creates a new role that allows a user to create and manage roles and users in the Control Room.

    Request body:
    {
      "name": "Role to manage users and roles",
      "description": "These are limited administrator permission.",
      "permissions": [
        {
          "id": 1,
          "action": "usermanagement",
          "resourceType": "usermanagement"
        },
        {
          "id": 3,
          "action": "createuser",
          "resourceType": "usermanagement"
        },
        {
          "id": 4,
          "action": "updateuser",
          "resourceType": "usermanagement"
        },
        {
          "id": 2,
          "action": "deleteuser",
          "resourceType": "usermanagement"
        },
        {
          "id": 62,
          "action": "rolesview",
          "resourceType": "rolesmanagement"
        },
        {
          "id": 12,
          "action": "rolesmanagement",
          "resourceType": "rolesmanagement"
        }
      ]
    }
  3. Send the request.
    Response body:
    {
      "id": 767,
      "createdBy": 3215,
      "createdOn": "2020-03-19T22:44:21Z",
      "updatedBy": 3215,
      "updatedOn": "2020-03-19T22:44:21Z",
      "tenantId": 1,
      "version": 0,
      "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
      "description": "These are limited administrator permission.",
      "name": "Role to manage users and roles",
      "accessRestriction": null,
      "permissions": [
        {
          "id": 1,
          "createdBy": 0,
          "createdOn": "2019-05-21T03:09:31Z",
          "updatedBy": 0,
          "updatedOn": "2019-05-21T03:09:31Z",
          "tenantId": 1,
          "version": 0,
          "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
          "action": "usermanagement",
          "resourceId": null,
          "resourceType": "usermanagement"
        },
        {
          "id": 2,
          "createdBy": 0,
          "createdOn": "2019-05-21T03:09:31Z",
          "updatedBy": 0,
          "updatedOn": "2019-05-21T03:09:31Z",
          "tenantId": 1,
          "version": 0,
          "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
          "action": "deleteuser",
          "resourceId": null,
          "resourceType": "usermanagement"
        },
        {
          "id": 4,
          "createdBy": 0,
          "createdOn": "2019-05-21T03:09:31Z",
          "updatedBy": 0,
          "updatedOn": "2019-05-21T03:09:31Z",
          "tenantId": 1,
          "version": 0,
          "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
          "action": "updateuser",
          "resourceId": null,
          "resourceType": "usermanagement"
        },
        {
          "id": 12,
          "createdBy": 0,
          "createdOn": "2019-05-21T03:09:31Z",
          "updatedBy": 0,
          "updatedOn": "2019-05-21T03:09:31Z",
          "tenantId": 1,
          "version": 0,
          "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
          "action": "rolesmanagement",
          "resourceId": null,
          "resourceType": "rolesmanagement"
        },
        {
          "id": 62,
          "createdBy": 0,
          "createdOn": "2019-05-21T03:09:31Z",
          "updatedBy": 0,
          "updatedOn": "2019-05-21T03:09:31Z",
          "tenantId": 1,
          "version": 0,
          "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
          "action": "rolesview",
          "resourceId": null,
          "resourceType": "rolesmanagement"
        },
        {
          "id": 3,
          "createdBy": 0,
          "createdOn": "2019-05-21T03:09:31Z",
          "updatedBy": 0,
          "updatedOn": "2019-05-21T03:09:31Z",
          "tenantId": 1,
          "version": 0,
          "tenantUuid": "e100fbce-008c-04ec-4063-7af0af91fb2f",
          "action": "createuser",
          "resourceId": null,
          "resourceType": "usermanagement"
        }
      ],
      "countPrincipals": 0,
      "principals": []
    }
    The REST API responds to each request with an HTTP response code. For details about the response codes, see API response codes.
Send Feedback