Requires MANAGE_ROLES. Creating a role with permissions also requires MANAGE_PERMISSIONS. Non-administrators cannot grant permissions they do not possess.
POST http://localhost:8989/api/roles/{roleID}/create
| Parameter name | Value | Description | Additional |
|---|---|---|---|
| roleID | string | Role identifier. |
Required |
The request body takes a complete Create Role Request resource, containing the following writable properties:
{
"permissions": [
"string"
]
}
| Name | Type | Description | Additional |
|---|---|---|---|
| permissions[] | array of string |
Possible values are:
|
Optional |
This request requires the use of one of following authorisation methods:
API key
.
The following HTTP status codes may be returned, optionally with a response resource.
| Status code | Description | Resource |
|---|---|---|
| 201 | Created Role created. |
Role Mutation Response |
| 400 | Bad Request The request is invalid, references a missing resource, or conflicts with existing state. |
Error Response |
| 401 | Unauthorized The Authorization header is missing or malformed. |
Error Response |
| 403 | Forbidden The token is invalid or expired, or the requester lacks a required permission. |
Error Response |
| 500 | Internal Server Error The server could not complete the operation. |
Error Response |