A custom connector allows you to create a Bold BI connector on your own. Now, you can create a Bold BI connector for your REST API without having to wait for us to implement it. Creating a custom connector is simple - you just need to prepare a JSON file and upload it into BoldBI.
Note: This feature is available in On-Premises Deployment, but not in Syncfusion Managed Cloud Server.
The following documentation will provide instructions on how to create the JSON file for the Custom Connector.
{
"Name": {connector_name},
"Description": {connector_description},
“ConnectorInfo”:{
“Tags”: [{search_tag_name1},{search_tag_name2}],
"Template": {
"Method": {
"value": "GET/POST",
"isHidden": true/false
},
“Authentication”:{Basic/none},
“Username”:{
“isHidden”: {true/false},
“value”: {username_vale}
},
“Password”:{
“isHidden”: {true/false},
“value”: {password_value}
},
"DataFormat":{
"value": "{JSON/CSV/XML}",
"isHidden": {true/false}
},
"URL": {
“value”: {default URL},
“isHidden”: {true/false}
},
“Raw”: {
“value”: {JSON_content},
“isHidden”: {true/false}
},
"Parameters": [{
"key": {parameter1_name},
"value": {parameter1_value},
"isHidden": {true/false}
},
{
"key": {parameter2_name},
"value": {parameter2_value},
"isHidden": {true/false}
}
],
"Headers": [{
"key": {header1_name},
"value":{header1_value},
"isHidden": {true/false}
},
{
"key": {header2_name},
"value":{header2_value},
"isHidden": {true/false}
}
],
"Pagination":{
"Type": {Nexturl/Nexttoken/NextPage/Offset},
{param1}:{value1},
{param2}:{value2}
}
}
}
Note : false is the default value if you don’t provide isHidden property.
The name of the Custom connector should be provided in this property. The name should not contain any special characters.
A description for the custom connector should be provided in this property.
All other properties should be within this connector info, except for the name and description.
The template property should contain an API method, authentication type, data format, URL, parameters, and headers.
An API method can be either GET or POST.
Sample
“Method”:{
“value”:”POST”,
“isHidden”:true
}
Note : This is an optional parameter, and the default method attribute will be Get.
Currently, two modes of authentication are supported: Basic and None.
"AuthenticationType": "None"
You can provide values for Username and Password for basic authentication using the JSON format provided in the Template category.
Sample
“AuthenticationType”:{
“value”: “basic”,
"isHidden": true
},
"Username":{
"value": "<: assign value for username>",
"isHidden": true
},
"Password":{
"value": “<: assign value for password>”,
"isHidden": true
}
Note: This is an optional parameter, and the default authentication will be none if no value is given.
The data format can be JSON, CSV, or XML.
Sample
"DataFormat":{
“value”:"JSON",
“isHidden”:true
}
Note : This is an optional parameter, and the default format will be JSON if no value is given.
The URL should be provided in this property. The URL can be hidden by setting the isHidden property to true.
Sample
"URL":{
“value":“https://services.odata.org/V4/Northwind/Northwind.svc/Order_Details”,
“isHidden”: true
}
The Raw option allows passing a raw query JSON string via a custom connector configuration file.
This property is only applicable when the method attribute is set to POST.
The Raw option can be hidden by setting the isHidden property to true.
Setting the isHidden property to true will hide the request body UI along with the title label.
Note :
- It is an optional parameter with a default value of None if no value is provided.
- Ensure that the JSON content is properly stringified.
Sample
"Raw" :{
“value” :
"{\"until\":\"2020-11-01T15:30:00Z\",\"window\":\"P7D\",\"data\":[{\"resources\":\"testresource\",\"metric\":\"temperature\"}]}",
“isHidden” : false
}
Parameters can have multiple items in a JSON array.
This property is applicable only when the method type is POST.
Key, value, and isHidden should be provided for the Parameters property.
Key | The name of the parameter should be provided in this property. |
value | The default value of the parameter should be given in this property. |
isHidden |
Set true in this property to make this parameter hidden.
Set false to visible this parameter in the data source creation. |
Sample
"Parameters":[{
"key": "token",
"value": "sk234234534”,
"isHidden": false
},
{
"key": "Connections",
"value": "de4edw98cds#23",
"isHidden": true
}
]
Note : This is an optional parameter, and the default will be none if no value is given.
Headers can have multiple items in a JSON array.
Key, value, and isHidden should be provided for the Headers property.