Role Permissions
Returns the permissions currently associated with the specified role.
Role ID.
Permissions of the role
Unauthorized
Not found
Internal Server Error
GET /api/roles/{role_id}/permissions HTTP/1.1
Accept: */*
{
"data": [
{
"group": {
"id": 3,
"name": "data_dictionary"
},
"id": 42,
"name": "view_data_structure"
}
]
}Adds a permission to a role. The permission may be identified either by permission_id or by permission_name.
Requires administrator access.
Role ID.
The permission to associate may be identified either by its identifier or by its name.
Association created
Unauthorized
Forbidden
Not found
Internal Server Error
POST /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"permission_id": 42
}{
"data": {
"permission_id": 42,
"role_id": 3
}
}Replaces the full set of permissions associated with a role with the supplied list. Permissions not included in the payload are dissociated from the role.
Requires administrator access.
Role ID.
Replaces the full set of permissions associated with a role with the supplied list.
Permissions included in the payload are associated with the role. Permissions not included are dissociated.
Updated permissions of the role
Unauthorized
Forbidden
Not found
Internal Server Error
PUT /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"permissions": [
{
"id": 42
},
{
"id": 43
}
]
}{
"data": [
{
"group": {
"id": 3,
"name": "data_dictionary"
},
"id": 42,
"name": "view_data_structure"
}
]
}Removes the association between a role and a permission. The permission may be identified either by permission_id or by permission_name.
Requires administrator access.
If permission_name is supplied and no permission with that name exists, the request is rejected with 404.
If the association itself does not exist, the request is rejected with 404.
Role ID.
The permission to remove may be identified either by its identifier or by its name.
Association removed
No content
Unauthorized
Forbidden
Not found
Internal Server Error
DELETE /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"permission_id": 42
}No content
Replaces the full set of permissions associated with a role with the supplied list. Permissions not included in the payload are dissociated from the role.
Requires administrator access.
Role ID.
Replaces the full set of permissions associated with a role with the supplied list.
Permissions included in the payload are associated with the role. Permissions not included are dissociated.
Updated permissions of the role
Unauthorized
Forbidden
Not found
Internal Server Error
PATCH /api/roles/{role_id}/permissions HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"permissions": [
{
"id": 42
},
{
"id": 43
}
]
}{
"data": [
{
"group": {
"id": 3,
"name": "data_dictionary"
},
"id": 42,
"name": "view_data_structure"
}
]
}Last updated