Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Collections-Roles

Number of APIs: 2


1. Get a collection's roles

GET {{baseUrl}}/collections/{{collectionId}}/roles

Gets information about all [roles] in a collection. The response returns the IDs of all users, teams, and groups with access to view or edit the collection.



2. Update a collection's roles

PATCH {{baseUrl}}/collections/{{collectionId}}/roles

Updates the roles of users, groups, or teams in a collection. On success, this returns a 204 No Content response.

Include the following values in the roles array of objects:

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

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

  • value — (Required) A list of objects that contain the following values:

    • id — (Required) An integer value that contains the user, group, or team ID.
    • role — (Required) A string value that contains the role's type:

      • EDITOR — Can edit collections directly.
      • VIEWER — Can view, fork, and export collections.

Note:

  • Only users assigned the EDITOR [role] in the collection can use this endpoint.
  • This endpoint does not support the external [Partner or Guest roles]



ENDPOINTS