Legacy roles

Use the following endpoints to manage legacy roles in an Embedded customer workspace.

Refer to the Developer API Legacy roles documentation to manage legacy roles in the admin team.

LEGACY ROLES

This page describes legacy roles. Workato is replacing legacy roles with the new permissions model, which uses environment roles and project roles. You can migrate legacy roles using the Role migration API or the in-app migration wizard. Refer to the New permissions model documentation for more information.

Rate limits

The roles resource has the following rate limit:

Quick reference

TypeResourceDescription
GET/api/managed_users/:id/rolesList custom roles in a customer workspace.
POST/api/managed_users/:id/roles/:role_id/copyMakes a copy of a custom role in a customer workspace.

List custom roles

Lists all custom roles in a customer workspace.

INHERITABLE ROLE LIMITATION

This endpoint returns only the custom roles created directly within the specified customer workspace. It doesn't include inheritable roles created in the Embed admin workspace.

Use the GET customer workspace member API to obtain a list of role_names associated with a customer workspace.

shell
GET /api/managed_users/:id/roles

Path parameters

NameTypeDescription
idinteger
required
Managed customer ID.

Query parameters

NameTypeDescription
per_pageinteger
optional
The number of custom roles to retrieve.
pageinteger
optional
The page number. If the total number of custom roles exceed the page limit, subsequent records can be retrieved by calling the next page.
role_namestring
optional
The name of a custom role. Filter results by role_name.

Sample requests

Request 1: List custom roles

shell
curl  -X GET https://www.workato.com/api/managed_users/123/roles \
      -H 'Authorization: Bearer <api_token>'
Response 1: List custom roles
json
[
    {
        "id": 1128,
        "name": "Workbot builder",
        "inheritable": false,
        "folder_ids": [],
        "created_at": "2022-08-31T23:37:04.777-07:00",
        "updated_at": "2022-08-31T23:37:04.777-07:00",
        "privileges": {
            "Recipes": [
                "read",
                "create"
            ],
            "Folders": [
                "read"
            ],
            "Workbot": [
                "read",
                "create",
                "update",
                "delete"
            ]
    },
    {
        "id": 546,
        "name": "Customer developer",
        "inheritable": false,
        "folder_ids": ["1232", "1224"],
        "created_at": "2020-08-14T07:23:19.599-07:00",
        "updated_at": "2020-08-14T07:23:19.599-07:00",
        "privileges": {
            "Recipes": [
                "read",
            ],
            "Folders": [
                "read"
            ],
            "Workbot": [
                "read",
                "create",
                "update"
            ]
        }
    }
]

Request 2: Filter results by role name

shell
curl  -X GET https://www.workato.com/api/managed_users/123/roles?role_name=dev \
      -H 'Authorization: Bearer <api_token>'
Response 2: Filter results by role name
json
[
    {
        "id": 1128,
        "name": "dev",
        "inheritable": false,
        "folder_ids": [],
        "created_at": "2022-08-31T23:37:04.777-07:00",
        "updated_at": "2022-08-31T23:37:04.777-07:00",
        "privileges": {
            "Projects": [
                "read",
                "create",
                "update",
                "delete"
            ],
            "Folders": [
                "read",
                "create",
                "update",
                "delete"
            ],
            "Connections": [
                "read",
                "create",
                "update",
                "delete"
            ],
            "Recipes": [
                "read",
                "create",
                "update",
                "delete",
                "run",
                "read_run_history"
            ],
            "Connection Folders": [
                "all"
            ]
        }
    }
]

Copy a custom role

Creates a copy of a custom role in a customer workspace with the ability to change the folders accessible by the role. The folder IDs can be obtained with the GET folders API endpoint.

shell
POST /api/managed_users/:id/roles/:role_id/copy

Path parameters

NameTypeDescription
idinteger
required
Managed customer ID.
role_idinteger
required
The ID of the role in the customer workspace.

Request body

NameTypeDescription
namestring
required
Name of the custom role.
folder_idsarray
Array of folder IDs.

Sample request

shell
curl  -X POST https://www.workato.com/api/managed_users/123/roles/490/copy \
      -H 'Authorization: Bearer <api_token>' \
      -H 'Content-Type: application/json' \
      -d  '{
            "name": "Customer developer",
            "folder_ids": ["1232", "1224"]
          }'

Response

json
{
    "id": 546,
    "name": "Customer developer",
    "inheritable": false,
    "folder_ids": ["1232", "1224"],
    "created_at": "2020-08-14T07:23:19.599-07:00",
    "updated_at": "2020-08-14T07:23:19.599-07:00"
}

Last updated: