A user can only execute this action if he is a member of an autorizing role which has (direct or indirect) roleManagement rights for the parent role of the newly created child role.
Authorization
accessBearerAuth In the value field below, fill in the access token. It has a 10 minutes validity period. A valid token can be obtained via the /accesstoken endpoint (call), AFTER authorization with refreshBearerAuth and the refresh token.
In: header
Query Parameters
0 <= valueRequest Body
application/json
The manages relation and role to be created.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.eniris.be/v1/role?parentRoleId=0" \ -H "Content-Type: application/json" \ -d '{ "manages": { "roleManagement": true, "userManagement": true, "viewManagement": true, "deviceManagement": true, "reportManagement": true, "alarmManagement": true }, "role": { "name": "string", "selfRights": { "roleManagement": true, "userManagement": true, "viewManagement": true, "deviceManagement": true, "reportManagement": true, "alarmManagement": true } } }'{
"manages": {
"id": 0,
"parentRoleId": 0,
"childRoleId": 0,
"roleManagement": true,
"userManagement": true,
"viewManagement": true,
"deviceManagement": true,
"reportManagement": true,
"alarmManagement"
{
"statusCode": 400,
"error": "Bad Request",
"message": "Missing or misformatted query parameter or body"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Failed to verify token"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "User does not have sufficient rights"
}Collect roles (replaced by POST /v1/role/query) GET
Get all (or some of) the roles of which a user is a member (either directly or indirectly). The POST /v1/role/query is a preferable alternative, which can better handle complex filters.
Collect roles (alternative of GET /v1/role) POST
Get all (or some of) the roles of which a user is a member (either directly or indirectly)
