阅读和查看 Automation Anywhere 文档

Automation Anywhere Automation 360

关闭内容

内容

打开内容

创建新角色

  • 已更新:2021/01/29

    创建新角色

    使用创建角色 API 以创建新角色,并在 Control Room 中具有权限。

    先决条件

    确保您具有管理员角色或具有查看和管理角色权限的自定义角色,以创建新角色。

    每个权限都需要以下必需参数:
    • id:唯一标识权限的数字值。
    • action:权限启用的操作。
    • resourceType:操作所属的资源组。

    通常,会向用户授予角色权限以及用户管理权限。 角色和权限

    过程

    1. 使用身份验证 API 生成 JSON Web 令牌。请参阅身份验证 API
    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 响应代码
    发送反馈