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.
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
0 <= valueapplication/json
The manages relation and role to be created.
TypeScript Definitions
Use the request body type in TypeScript.
The manages relation and role to be created.
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/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": true }, "role": { "id": 0, "name": "string", "selfRights": { "roleManagement": true, "userManagement": true, "viewManagement": true, "deviceManagement": true, "reportManagement": true, "alarmManagement": true }, "userRights": { "roleManagement": true, "userManagement": true, "viewManagement": true, "deviceManagement": true, "reportManagement": true, "alarmManagement": true } }}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)