Articles in this section
Category / Section

Identifying Data Sources Using a Specific Database View through REST API

Published:

When utilizing Bold BI to manage various data sources, it is crucial to recognize the details of the data sources for the underlying tables or views. Bold BI offers a REST API endpoint that makes it easy to retrieve this information. The steps to accomplish this task using the REST API are provided below.

Steps to Find Data Sources from tables/views

  1. Construct the API Request URL:
    To find all data sources which are connected to a particular database view, you will need to use the GET method for the below API and construct a request URL in the following format:

    https://{yourdomain}/bi/api/site/{site_identifier}/v5.0/datasources?table_name={view_name}
    

    Replace {yourdomain} with your actual domain name, {site_identifier} with your site’s identifier, and {view_name} with the name of the database view utilized in the data source. (You can specify either the table name or the view name in the API call.)

    Example:
    Consider you want to find the data source details for the view sales_summary

     http://localhost:57352/bi/api/site/site1/v5.0/datasources/?table_name=sales_summary
    

image.png

  1. Send the REST API Request:
    After constructing your URL, you can send a GET request using a tool like Postman.

    image.png

  2. Review the Response:
    The response will be in JSON format, containing a list of data sources that are using the specified database view. Each data source will include details such as its id, item type, and other relevant metadata.

    image.png

  3. Handle Pagination (if necessary):
    If there are many data sources, the response could be paginated. Check the response data for pagination information and retrieve additional pages if needed.

Additionally, we have option to pass the table name or stored procedure to the API as a parameter instead of the view name.

Additional References

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