Authorizationgroups endpoint enables you to get authorizationgroups information and manage authorizationgroups in Silverbucket's database. Endpoint's URL is:
https://<your_environment_url>/customer-api/1.0/authorizationgroups/
When calling /authorizationgroups/ endpoint without parameters you will get all the authorizationgroups from database. Example response:
{
"count": 1,
"csvUrl": "/customer-api/1.0/authorizationgroups/?csv=true",
"itemsPerPage": 500,
"excelUrl": "/customer-api/1.0/authorizationgroups/?excel=true",
"next": null,
"current": 1,
"lastPage": 1,
"data": [
{
"id": 1,
"name": "Authorization group 1",
"add_automatically_to_own": false,
"add_automatically_to_ext": false,
"private": false,
"users": [
1,
2,
3
]
}
],
"previous": null
}
You can add users to authorizationgroup with POST method to URL: /authorizationgroups/add_people/ . POST body contains id of authorizationgroup and list of id's of users to add in JSON format. Successful call will give response code 200 and return the modified data of just modified authorizationgroup in JSON. Example of post:
{
"authorizationgroup": "<authorizationgroup_id>",
"people": "<list of user ids>"
}
You can remove users from authorizationgroup with POST method to URL: /authorizationgroups/remove_people/ . POST body contains id of authorizationgroup and list of id's of users to remove in JSON format. Successful call will give response code 200 and return the modified data of just modified authorizationgroup in JSON. Example of post:
{
"authorizationgroup": "<authorizationgroup_id>",
"people": "<list of user ids>"
}