Create a Role
Note:
Version Requirement:This functionality is for Dremio v18.0+ Enterprise Edition only.
This API is used to create a role.
Endpoint Syntax
POST /api/v3/role
Required Privileges
All users executing this Rest API must have the MANAGE GRANTS privilege assigned to receive a response output.
Response Input
{"name": "test_role1", (required)
"roles": [{"id": "1bce89d1-1b39-4717-bf1f-bfb0d9653146"}], (optional)
"description": "description", (optional)
}
Response Output
This is the standard response output for the API.
{
"id": "aa6d94e6-8cb7-4331-a881-e24945d74ad1",
"name": "test_role",
"type": "INTERNAL",
"roles": [{"id": "1bce89d1-1b39-4717-bf1f-bfb0d9653146"}],
"memberCount": 2
}
Response Codes
200
- Success.400
- Invalid request or duplicate role name.403
- The user executing the API request lacks theMANAGE GRANTS
permission.404
- The role is not found.
Example
Example: Curl
curl -X POST --location "http://localhost:9047/api/v3/role" \
-H "Authorization: _dremiopu2916f7aph06aahv4ksu4life" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{\"name\": \"test_role2\", \"roles\": [{\"id\": \"1bce89d1-1b39-4717-bf1f-bfb0d9653146\"}], \"members\": [{\"id\": \"aa6d94e6-8cb7-4331-a881-e24945d74ad1\", \"type\": \"ROLE\"}, {\"id\": \"c3d5bbd1-d998-4bda-8bd1-5d16707efdd2\", \"type\": \"USER\"}]}"
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.