Articles in this section
Category / Section

Creating Live Data source via API calls in On-Premises using Postman

Published:

This article explains how to create live data sources using API calls in Bold BI On-Premises using Postman.

Creating Live Data Source via API Calls

Follow these steps to create a live data source using API calls:

  1. Use the /token API for generating the access token.

    Request Body Schema:

    username     - string (Email address of the user)
    password     - string (Password of the user)
    grant_type   - string
                   The type of credentials used to authorize the request for an access token.
                   Value allowed is password.

Request Sample

image.png

image.png

Response Sample

image.png

  1. Use the following endpoint in Postman with the POST method - http://{your-host:your-port}/bi/api/site/site1/v4.0/datasources

  2. Add the token generated above in Headers with the key as Authorization and values as Bearer {Your_token}.

    image.png

  3. Add the API request details in the Raw Body section of this API request in JSON format. Below are the available options:

    image.png

{
  "Name": "Data Source Name",
  "Type": "Web",
  "Connection": {
    "MethodType": "Get" OR "POST",
    "DataFormat": "Json", or "XML" OR "CSV",
    "Url": "URL TO BE CONNECTED TO GET DATA",
    "AuthenticationType": "None",
    "Username": "UserName",
    "Password": "Password",
    "IsLiveWebMode": "true",
    "Description": "ANY DESCRIPTION",
    "Headers": "KEY-VALUE PAIRS",
    "RefreshInterval": "Never",
    "Provider": "WEB",
    "ProviderType": "Web",
    "Rows": "5000",
    "Mode": "Live",
    "DataProvider": "WEB",
    "TableSchema": "Required columns in JSON string or JSON format"
  }
}
  1. Hit Send to trigger the API. You will receive the below response if the API call is successfully completed.

    image.png

    Once the success message is received, the data source will be created and listed in the data source page in Bold BI.

    image.png

Sample API call

sample API using northwind
Add the format below in Raw Body section in of this API request in Json format (Web API datasource):

image.png

You will get the response like below if the data source is created successfully.

image.png

image.png

Related Articles

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