# Users

Use this API to manage users in your workspace programmatically.

ENDPOINT ACCESS

Your API client must be assigned specific privileges for the Get list of users, Get user details, and Get user privileges endpoints. These privileges are determined by your API client role.

Additionally, if your workspace uses environments these privileges are only available to API clients with DEV access.

To enable endpoint access:

You can enable access to these endpoints by editing an existing API client role, or by creating a new API client role:

1

Navigate to Workspace admin > API clients > Client roles.

Select the role you plan to edit.

Alternatively, click + Add client role to create a new API client role.

2

Select Admin and navigate to Workspace collaborators > Collaborators.

3

Select the checkbox(es) next to the endpoint(s) you plan to enable for this role.

  • Get collaborators GET /api/members
  • Get collaborator GET /api/members/:id
  • Get collaborator privileges GET /api/members/:id/privileges

Select the endpoints you plan to enableSelect the endpoints you plan to enable

# Quick reference

Type Resource Description
GET /api/users/me Get details of the authenticated user.
GET /api/members Get a list of members in your workspace.
GET /api/members/:id Get details about a user you specify.
GET /api/members/:id/privileges Get the role and privileges for a workspace user you specify.

# Get authenticated user details

Get details of the authenticated user.

GET /api/users/me

# Sample request

curl  -X GET https://www.workato.com/api/users/me \
      -H 'Authorization: Bearer <api_token>'

# Response

{
    "id": 17293,
    "name": "ACME-API",
    "created_at": "2019-06-19T19:53:16.886-07:00",
    "plan_id":"oem_plan",
    "current_billing_period_start": "2020-09-22T19:15:11.372-07:00",
    "current_billing_period_end": "2020-10-22T19:15:11.372-07:00",
    "expert": false,
    "avatar_url": "https://workato-assets.s3.amazonaws.com/profiles/avatars/000/089/005/large/logo.png?1562399288",
    "recipes_count": 49,
    "interested_applications": [],
    "company_name": null,
    "location": null,
    "last_seen": "2020-08-23T23:22:24.329-07:00",
    "contact_phone": null,
    "contact_email": null,
    "about_me": null,
    "email": "[email protected]",
    "phone": "xxxxxxxxxx",
    "active_recipes_count": 1,
    "root_folder_id": 10294
}

# Get list of workspace users

Get a list of all users in a workspace. This resource returns the following information for each user in your workspace:

  • User ID
  • Grant type: Where team indicates the user is a workspace collaborator and federation_manager indicates the user is a workspace moderator.
  • Role
  • External ID
  • Name
  • Email
  • Timezone
  • Last activity log: This log displays the user's most recent action within a workspace. For AHQ-enabled workspaces, it only displays the latest activity in the DEV environment. The log records events such as logging in, logging out, joining a workspace, generating a token, disconnecting a connection, and more. Refer to our activity audit log reference documentation for a complete list of activities that are captured in the log and can be returned in this request.
  • Created at

Your API client role must be assigned the Get collaborators GET /api/members privilege to use this endpoint.

GET /api/members 

# Sample request

curl  -X GET https://www.workato.com/api/members \
      -H 'Authorization: Bearer <api_token>'

# Response

{
    "data": [
        {
            "id": 12345,
            "grant_type": "federation_manager",
            "roles": [
                {
                    "environment_type": "dev",
                    "role_name": "Admin"
                },
                {
                    "environment_type": "test",
                    "role_name": "Admin"
                },
                {
                    "environment_type": "prod",
                    "role_name": "Admin"
                }
            ],
            "last_activity_log": {
                "id": 2807129,
                "event_type": "user_login",
                "created_at": "2024-03-07T16:38:18.414-08:00"
            },
            "external_id": null,
            "name": "Stefano",
            "email": "[email protected]",
            "time_zone": "Pacific Time (US & Canada)",
            "created_at": ""2021-12-14T13:01:15.935-08:00""
        },
        {
            "id": 23456,
            "grant_type": "team",
            "roles": [
                {
                    "environment_type": "dev",
                    "role_name": "IT_Developer"
                },
                {
                    "environment_type": "test",
                    "role_name": "No access"
                },
                {
                    "environment_type": "prod",
                    "role_name": "No access"
                }
            ],
            "last_activity_log": {
                "id": 2807129,
                "event_type": "user_login",
                "created_at": "2024-03-07T16:38:18.414-08:00"
            },
            "external_id": null,
            "name": "Nikhil",
            "email": "[email protected]",
            "time_zone": "Pacific Time (US & Canada)",
            "created_at": ""2021-1-12T13:01:15.935-08:00""
        }
    ]
}

# Get user details

Get details about a workspace member you specify. This resource returns the following information in the response:

  • User ID
  • Grant type: Where team indicates the user is a workspace collaborator and federation_manager indicates the user is a workspace moderator.
  • Role
  • External ID
  • Name
  • Email
  • Timezone
  • Last activity log: This displays the user's most recent action within a workspace and captures the same data as the activity audit log. For workspaces with AHQ, this only displays the last activity within the DEV environment. It can include events such as logging in, logging out, joining a workspace, generating a token, disconnecting a connection, and more. Refer to our activity audit log reference documentation for a complete list of activities that are captured in the log and can be returned in this request.
  • Created at

Your API client role must be assigned the Get collaborator GET /api/members/:id privilege to use this endpoint.

GET /api/members/:id 

# URL parameters

Name Type Description
id string
required
The ID of the user whose information you plan to retrieve.

# Sample request

curl  -X GET https://www.workato.com/api/members/:id \
      -H 'Authorization: Bearer <api_token>'

# Response

{
    "data": {
        "id": 34567,
        "grant_type": "team",
        "roles": [
            {
                "environment_type": "dev",
                "role_name": "HR_Developer"
            },
            {
                "environment_type": "test",
                "role_name": "HR_Viewer"
            },
            {
                "environment_type": "prod",
                "role_name": "Operator"
            },
        ],
        "last_activity_log": {
            "id": 2807147,
            "event_type": "user_login",
            "created_at": "2024-03-07T16:44:39.318-08:00"
        },
        "external_id": null,
        "name": "Emily",
        "email": "[email protected]",
        "time_zone": "Pacific Time (US & Canada)",
        "created_at": "2019-09-09T00:45:17.019-07:00"
    }
}

# Get user privileges

Get the role and privileges for a user you specify. This resource includes details for system and custom roles. This resource returns an array of roles for each environment in the workspace (for example, DEV, TEST, and PROD), which includes the following information:

  • Environment type
  • User role
  • All permissions assigned to the role

Your API client role must be assigned the Get collaborator privileges GET /api/members/:id privilege to use this endpoint.

GET /api/members/:id/privileges 

# URL parameters

Name Type Description
id string
required
The ID of the user whose role and privileges you plan to retrieve.

# Sample request

curl  -X GET https://www.workato.com/api/members/:id/privileges \
      -H 'Authorization: Bearer <api_token>'

# Response

{
    "data": [
        {
            "environment_type": "dev",
            "name": "Operator",
            "privileges": {
                "Recipes": [
                    "read",
                    "run",
                    "read_run_history"
                ],
                "Folders": [
                    "read"
                ],
                "Projects": [
                    "read"
                ],
                "Use in recipes": [
                    "all"
                ],
                "Test automation": [
                    "read"
                ]
            }
        },
        {
            "environment_type": "test",
            "name": "Operator",
            "privileges": {
                "Recipes": [
                    "read",
                    "run",
                    "read_run_history"
                ],
                "Folders": [
                    "read"
                ],
                "Projects": [
                    "read"
                ],
                "Use in recipes": [
                    "all"
                ],
                "Test automation": [
                    "read"
                ]
            }
        },
        {
            "environment_type": "prod",
            "name": "Operator",
            "privileges": {
                "Recipes": [
                    "read",
                    "run",
                    "read_run_history"
                ],
                "Folders": [
                    "read"
                ],
                "Projects": [
                    "read"
                ],
                "Use in recipes": [
                    "all"
                ],
                "Test automation": [
                    "read"
                ]
            }
        }
    ]
}


Last updated: 3/12/2024, 4:22:37 PM