Pangolin icon

Pangolin

Interact with the Pangolin API

Actions142

Resource → Grant roles access to a resource, replacing any existing ones.

AI-generated

Summary

Replace the roles that have access to a specified resource with a new set of roles.

Inputs

  • Resource ID (required) — The ID of the resource to update role access for.
  • Body (required) — JSON object containing an array of 'roleIds' to grant access to the resource; this set replaces any existing roles.
  • Options — Optional settings such as 'Raw Response' to control output format.

Output shape

The operation returns either a single response object representing the result of the role assignment or an array of items if the response is an array, depending on the 'Raw Response' option.

If 'Raw Response' is false, arrays in the response are split into individual items; if true, the full response is returned. Errors for individual items will be returned if 'Continue On Fail' is enabled.

Examples

Example 1: Grant roles with IDs [1,2,3] access to resource 'abc123' replacing any existing roles.

Set 'Resource ID' to 'abc123' and 'Body' to '{"roleIds": [1,2,3]}'.

Discussion