Articles in this section
Category / Section

How to delete a category in dashboard listing page via REST API ?

Published:

This article provides a step-by-step guide on how to delete a category using its Category ID. It also outlines possible responses and errors you may encounter during the deletion process.

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>

To delete a category in dashboard listing page, you will need to send a DELETE request to the appropriate endpoint based on your server type as shown below:

Self-Hosted Server

For self-hosted instances, use the following endpoint:

https://{yourdomain}/bi/api/site/<site_identifier>/v4.0/categories/categoryId

CategoryId (required): A unique identifier for the category you wish to delete. It should be in the format of a GUID (Globally Unique Identifier). To get this category id, follow the steps outlined in the following KB

Bold BI Cloud Server

For Bold BI Cloud instances, the endpoint is:

https://{yourdomain}/bi/api/v4.0/categories/categoryId

Request Type

  • DELETE: This request type is used to delete an existing category in the dashboard listing page.

Example Request

Here is an example of how to structure your DELETE request:

image.png

Responses

The API will return different responses based on the outcome of the request:

Success

  • 204 No Content: The category was successfully deleted. There is no content in the response body.

image.png

Errors

  • 400 Item ID is empty: The Category ID was not provided in the request. Ensure you include the Category ID in the path parameters.
  • 401 Access denied: You do not have the necessary permissions to delete the category. Check your access rights and ensure your bearer token is valid and has the required permissions.
  • 404 Item details not found: The Category ID provided does not correspond to any existing category. Verify the Category ID for correctness.
  • 405 Request type was not DELETE: A request method other than DELETE was used. Ensure you are using the DELETE method for the request.
  • 412 Failed to delete because the category contains dashboards: The category cannot be deleted as it contains dashboards. Remove or reassign the dashboards before attempting to delete the category again.
  • 417 Failed to delete item: An unexpected error occurred during the deletion process. Try again later or contact support if the issue persists.

Before refreshing the page in application

image.png

After refreshing the page in application, mentioned Category will be deleted as shown below:

image.png

Additional References

To know more about Bold BI APIs

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
RU
Written by Raghul Umashangar
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied