Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Workspaces-Roles

Number of APIs: 2


1. Get all roles

GET {{baseUrl}}/workspaces-roles

Gets information about all roles in a workspace, based on the team's [plan]



2. Update user or user group roles

PATCH {{baseUrl}}/workspaces/{{workspaceId}}/roles

Updates the roles of users or [user groups] in a workspace. To get a list of roles, use the [GET /workspace-roles] endpoint.

Include the following values in the roles array of objects:

  • op — (Required) A string value that contains the operation to perform. Accepts the add or remove value.

  • path — (Required) A string value that contains the resource to perform the action on. Accepts the /user or /usergroup value.

  • value — (Required) A list of objects that contain user or user group IDs and an assigned role ID.

    • id — (Required) A string value that contains the user or user group ID.
    • role — (Required) A number value that contains the workspace role's ID:

      • 1 — Viewer. Can view, fork, and export workspace resources
      • 2 — Editor. Can create and edit workspace resources.
      • 3 — Admin. Can manage workspace details and members.

Note:

  • This endpoint does not support the external [Partner or Guest roles]
  • This endpoint is restricted to 50 operations per call.
  • The request body must contain one unique action per user or user group. For example, you cannot add and remove multiple roles for a user in the same request body.



ENDPOINTS