How to Add and Delete Groups using the REST API
Groups are collections of users to which permissions can be assigned. This article provides comprehensive guidance on how to add and delete groups using the REST API.
Authorization
To execute this action, please ensure that a access token is included in your request header. For details on obtaining the access token, please refer to the relevant documentation here.
Authorization: bearer <token>
Adding a New Group Using Bold BI REST API
To add a new group using the Bold BI REST API, follow the steps outlined below:
-
Use the below endpoint in postman with POST method
http(s)://{your host}:{your port number}/bi/api/site/{your_site_identifier}/v5.0/groups
-
Then add the token generated from the ‘token’ endpoint above in the Headers with key as ‘Authorization’ and value as ‘bearer {Your_token}’
-
In the Body tab, select the
raw
option and chooseJSON
format. Then enter the following JSON schema:[ { "Name": "Service Group ", "Description": "A group created for Service team users" } ]
-
After configuring the request, click the
Send
button in Postman. On a successful request, you will receive a success response indicating that the group has been created.
Responses
- 200: Group was created successfully.
- 400: The content of the request body is missing or incomplete.
- 401: Access denied.
- 405: Request type was not POST.
- 406: The content of the request body is invalid.
- 409: Group name already exists.
- 417: Failed to add group.
Deleting a Specific Group Using Bold BI REST API
To delete a specific group using the Bold BI REST API, follow the steps outlined below:
-
Use the below endpoint in postman with DELETE method
http(s)://{your host}:{your port number}/bi/api/site/{your_site_identifier}/v5.0/groups
Make sure to replace
{widgetId}
with the actual ID of the widget you wish to delete. -
Click the “Send” button in your API client. If the request is successful, the Group will be deleted.
For more information on managing groups, please refer to this documentation.
Responses
- 204 No Content: The group has been successfully deleted.
- 401 Access Denied: Authorization failed.
- 405 Request Type Not DELETE: The request method is not allowed.
- 406 Invalid Group ID: The provided group ID is invalid.
- 417 Failed to Delete the Group: The deletion process encountered an error.