Automation Anywhere

Automation Anywhere Automation 360

關閉內容

內容

開啟內容

創建新的角色 API

  • 已更新:1/29/2021
    • Automation 360 v.x
    • 管理
    • RPA 工作區
    • API 文件

創建新的角色 API

使用 創建角色 API 創建具有中權限的新角色 Control Room

先決條件

確保具有管理員角色或自定義角色( 具有“查看和管理角色 ”權限),以創建新角色。

每個權限都需要以下必需參數:
  • ID:唯一標識權限的數字值。
  • 操作:權限啓用的操作。
  • 資源類型:操作所屬的資源組。

一般情況下,會將角色權限與用戶管理權限一起授予用戶。 角色和權限

程序

  1. 使用 驗證 API 來產生 JSON Web Token 。
  2. 使用 POST 方法和端點 URL : <your _control_room _url>/v1/usermanagement/Roles

    以下請求創建一個新角色,允許用戶在中創建和管理角色和用戶。 Control Room

    請求主體
    {
      "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. 發送請求。
    響應主體
    {
      "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": []
    }
    REST API 會以 HTTP 回應碼回應每個要求。有關響應代碼的詳細信息,請參見 API 回應碼
傳送意見反饋