To add or remove users or groups from admin roles.
This API requires JWT generated by an application created only from Bot Admin Console.
To use this API, app needs the Admin API Scope of Role Management under Role Management.
POST https://{{host}}/api/public/adminroles/assignments/
Query Parameters
Parameter | Required/Optional | Description |
---|---|---|
host | Required | Environment URL, for example, https://bots.kore.ai |
Body Parameters
Parameter | Required/Optional | Description |
---|---|---|
roleId | Required | The admin role ID to assign or remove from users or groups |
addUsers | Optional | The list of usernames for whom to assign the admin role |
removeUsers | Optional | The list of usernames for whom to remove the admin role |
addGroups | Optional | The list of group names for whom to assign the admin role |
removeGroups | Optional | The list of usernames for whom to remove the admin role |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response Content Type
application/json
Sample Request
curl -X POST \ https://{{host}}/api/public/adminroles/assignments/ \ -H 'Content-Type: application/json' \ -H 'auth: YOUR_JWT_ACCESS_TOKEN' \ -d '[{ "roleId":"5bre4bb433f78c73f4e5a0d1", "addUsers":["sample1@sampleemail.com"], "removeUsers":[], "addGroups": [], "removeGroups":[] }]
Sample Response
[ { "status": "success " } ]