Roles
Creates a new role.
Requires administrator access.
If is_default is set to true, any other role currently marked as default is automatically unset. At most one role can be the default.
Role names are unique: sending an existing name returns 422 with a "taken" error on name.
The response includes a Location header pointing at the newly created role.
Payload for creating a role.
If is_default is set to true, any other role currently marked as default is automatically unset, so at most one role remains the default.
Role created
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
POST /api/roles HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"role": {
"is_default": false,
"name": "data-steward"
}
}{
"data": {
"id": 3,
"is_default": false,
"name": "data-steward"
}
}Returns the specified role.
Role ID.
Role detail
Unauthorized
Not found
Internal Server Error
GET /api/roles/{id} HTTP/1.1
Accept: */*
{
"data": {
"id": 3,
"is_default": false,
"name": "data-steward"
}
}Updates the specified role.
Requires administrator access.
If is_default is set to true, any other role currently marked as default is automatically unset.
Role ID.
Payload for updating a role.
If is_default is set to true, any other role currently marked as default is automatically unset.
Role updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PUT /api/roles/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"role": {
"is_default": true
}
}{
"data": {
"id": 3,
"is_default": false,
"name": "data-steward"
}
}Permanently deletes the specified role.
Requires administrator access.
Role ID.
Role deleted
No content
Unauthorized
Forbidden
Not found
Internal Server Error
DELETE /api/roles/{id} HTTP/1.1
Accept: */*
No content
Updates the specified role.
Requires administrator access.
If is_default is set to true, any other role currently marked as default is automatically unset.
Role ID.
Payload for updating a role.
If is_default is set to true, any other role currently marked as default is automatically unset.
Role updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PATCH /api/roles/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"role": {
"is_default": true
}
}{
"data": {
"id": 3,
"is_default": false,
"name": "data-steward"
}
}Last updated