Add/Remove Role Members

Version Requirement:

This functionality is for Dremio v18.0+ Enterprise Edition only.

This API adds or removes members from the role.

Endpoint Syntax

PATCH /api/v3/role/{id}/member

Required Privileges

All users executing this Rest API must have the MANAGE GRANTS privilege assigned to receive a response output.

Response Input

This is the standard response input for the API.

[
  {“op”: “add”, “id”: “id1”, “type”: “role”},
  {“op”: “add”, “id”: “id2”, “type”: “user”},
  {“op”: “remove”, “id”: “id3”, “type”: “user”},
  {“op”: “remove”, “id”: “id4”, “type”: “role”}
 ]

Response Codes

  • 204 - Successful if all operations are successful.
  • 400 - The request is bad. Either the role ID does not exist or an operation failed.
  • 403 - The user executing the API request lacks the MANAGE GRANTS permission.
  • 404 - The role is not found.

Example

curl -X PATCH --location "http://localhost:9047/api/v3/role/5ebcf4fa-ef8d-4bb4-8660-b18b18f661d6/member” \
    -H "Authorization: _dremiohrr395nv31g8k610616tucp91g" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
   -d {
  [“op”: “add”, “value”: “id1”, “type”: “role”],
  [“op”: “add”, “value”: “id2”, “type”: “user”],
  [“op”: “remove”, “value”: “id3”, “type”: “user”],
  [“op”: “remove”, “value”: “id4”, “type”: “role”]
   }