Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Create role

  • Updated: 2022/04/11
    • Automation 360 v.x
    • Manage
    • RPA Workspace
    • API docs

Create role

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

Request

POST https://{{ControlRoomURL}}//v1/usermanagement/roles
Header: X-Authorization <<authentication token>>
All API calls must contain an authentication token in the request header. Use the Authentication API to generate a JSON Web Token. See Authentication API.
Request body:
{
   "name":"Trigger Manager",
   "description":"View and Manage the triggers",
   "permissions":[
      {
         "id":148,
         "action":"view",
         "resourceType":"dashboard",
         "resourceId":null
      },
      {
         "id":58,
         "action":"myschedule",
         "resourceType":"taskscheduling",
         "resourceId":null
      },
      {
         "id":59,
         "action":"managecredentials",
         "resourceType":"credentials",
         "resourceId":null
      },
      {
         "id":30,
         "action":"view",
         "resourceType":"devices",
         "resourceId":null
      },
      {
         "id":150,
         "action":"manage",
         "resourceType":"eventtriggers",
         "resourceId":null
      },
      {
         "id":149,
         "action":"view",
         "resourceType":"eventtriggers",
         "resourceId":null
      },
      {
         "id":131,
         "action":"managemytriggers",
         "resourceType":"eventtriggers",
         "resourceId":null
      }
   ],
   "principals":[
      {
         "id":3
      }
   ]
}

Request Parameters

Parameter Type Required Description
name String Yes Name of the role.
description String No Description of the role.
permissions Array No An array of permissions that will be granted for the role. Each permission requires the mandatory parameters. For more details on the parameters, see below.
principals Array No An array/collection of principals (users) who will be granted access with the role. For more information on the parameters, see below.
permission array parameters
Parameter Type Required Description
id Integer No The numeric value that uniquely identifies the permission.
action String No The action the permission enables.
resourceId String No The resource id to which the action belongs.
resourceType Array No 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

prinicpals array parameters
Parameter Type Required Description
id Integer No Id of the user.
username String No User name of the user.
subjectId String No Subject Id of the user.
domain String No Active directory domain, if the user is an AD User.
autoLoginEnabled Boolean No Flag to indicate if auto login is enabled or not.
deleted Boolean No Flag to indicate if user is deleted or not.
emailVerified Boolean No Flag to indicate if email is verified or not.
pwdExpired Boolean No Flag to indicate if password is expired or not.

Response

201 Created
{
   "id":25,
   "createdBy":1,
   "createdOn":"2022-04-11T11:53:03Z",
   "updatedBy":1,
   "updatedOn":"2022-04-11T11:53:03Z",
   "tenantId":1,
   "version":0,
   "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
   "description":"View and Manage the triggers",
   "name":"Trigger Manager",
   "permissions":[
      {
         "id":59,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:21Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:21Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"managecredentials",
         "resourceId":null,
         "resourceType":"credentials"
      },
      {
         "id":131,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:31Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:31Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"managemytriggers",
         "resourceId":null,
         "resourceType":"eventtriggers"
      },
      {
         "id":149,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:42Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:42Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"view",
         "resourceId":null,
         "resourceType":"eventtriggers"
      },
      {
         "id":58,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:21Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:21Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"myschedule",
         "resourceId":null,
         "resourceType":"taskscheduling"
      },
      {
         "id":148,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:38Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:38Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"view",
         "resourceId":null,
         "resourceType":"dashboard"
      },
      {
         "id":150,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:42Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:42Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"manage",
         "resourceId":null,
         "resourceType":"eventtriggers"
      },
      {
         "id":30,
         "createdBy":0,
         "createdOn":"2022-02-28T23:49:21Z",
         "updatedBy":0,
         "updatedOn":"2022-02-28T23:49:21Z",
         "tenantId":1,
         "version":0,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "action":"view",
         "resourceId":null,
         "resourceType":"devices"
      }
   ],
   "countPrincipals":0,
   "systemRole":false,
   "principals":[
      {
         "id":3,
         "createdBy":1,
         "createdOn":"2022-03-17T19:33:06Z",
         "updatedBy":1,
         "updatedOn":"2022-04-08T21:54:29Z",
         "tenantId":1,
         "version":274,
         "tenantUuid":"282978c4-6386-c13a-92ac-5009e3cfd6b3",
         "username":"john_doe",
         "description":"",
         "deleted":false,
         "disabled":false,
         "email":"aa@aa.com",
         "firstName":"John",
         "lastName":"Doe",
         "autoLoginEnabled":true,
         "emailVerified":true,
         "clientRegistered":false,
         "passwordSet":true,
         "questionsSet":true,
         "activeDirectory":false,
         "passwordChangedOn":"2022-03-17T19:33:59Z",
         "deviceCredentialAttested":false,
         "multipleLoginAllowed":true
      }
   ]
}

Response Parameters

Parameter Type Description
id Integer Unique identifier representing the new role created.
name String Name of the role created.
description String Description of the role created.
version Integer Version of the role instance.
createdBy Integer Id of the user who created the role.
createdOn String The creation timestamp of the role.
updatedBy Integer Id of the user who made a latest update to the role.
updatedOn String The latest update timestamp of the role.
permissions Array An array of unique permissions that have been assigned to the role.
principals Array An array of unique users that have been assigned to the role.
Note: View the Control Room APIs in the Community Edition, but API functionality is limited. You need a licensed Automation 360 Edition to access the full functionality of the APIs.
The REST API responds to each request with an HTTP response code. For response codes, see API response codes.
Send Feedback