Articles in this section
Category / Section

How to Publish a Custom Widget Using Bold BI REST API

Published:

This article explains how to add or publish the custom widget using API calls in Bold BI On-Premises using Postman.

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>

Publish a Custom Widget Using Bold BI REST API

Follow these steps to create a custom widget using API calls:

  1. Use the below endpoint in postman with POST method
    http(s)://{your host}:{your port number}/bi/api/site/{your_site_identifier}/v4.0/custom-widget
    
  2. Then add the token generated from the ‘token’ endpoint above in the Headers with key as ‘Authorization’ and value as ‘bearer {Your_token}
    image.png
  3. The custom widgets folder should be structured as follows:
    • Create a new Folder and rename it as CustomWidget
    • Copy and paste the custom widgets inside the folder as shown in below image
      image.png
    • Zip the CustomWidget folder.
  4. Convert the CustomWidget.zip file to a base64 string using any online tools.
  5. Include the following parameters in the body of the request in JSON format.
    {
    "FileContent": "Place the Converted custom widget’s base64 string value here"
    }
    
    image.png
  6. Click Send. On successful request the custom widget will be created and can be found under Settings > Widgets .
    image.png

    image.png

Response

  • 200 OK - Provided custom widgets published successfully.
  • 400 Bad Request - Invalid Body syntax - Connector name or Connection JSON is invalid or Empty.
  • 401 Unauthorized - Authorization toke is invalid, or token has expired.
  • 409 Conflict - Connector name already exists.

Reference

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