Category / Section
Connect Carton Cloud in Bold BI via REST API
Published:
The Generic Web data source can be utilized to establish a connection between Carton Cloud and Bold BI through REST API.
Steps to connect Carton Cloud via the WEB API
- Obtain the client ID and client secret from Carton Cloud by referring to this link: https://help.cartoncloud.com/help/s/article/API-Clients.
- Create a Web API data source to retrieve the access token by performing the following actions:
- Set the URL to https://api.cartoncloud.com/uaa/oauth/token.
- Choose the POST method.
- Set the parameters as follows:
- grant_type: client_credentials.
- Set the headers as follows:
- Accept-Version: 1.
- Content-Type: application/x-www-form-urlencoded.
- Authentication type: Basic.
- Username: Your client ID.
- Password: Client secret.
- Create the data source and save the access token in the dashboard parameter.
- Configure the dashboard parameter as shown in the image below:
- Configure the dashboard parameter as shown in the image below:
- Save the data source.
The access token will expire after 1 hour. Configure the data source refresh to 1 hour or lesser to obtain a new access token automatically.
- Then, create another Web API data source for Carton Cloud endpoint.
- Here we will retrieve data from the Transport endpoint - https://api.cartoncloud.com/tenants/{tenantId}/products
- Obtain the tenant ID from Carton Cloud.
- Set the URL to https://api.cartoncloud.com/tenants/57b1672e-ee44-461c-aa05-5001ac1f2302/products.
- Choose the GET method.
- Set the headers as follows:
- Accept-Version: 1.
- Authorization: Bearer @{{:carton token.Parameter1}}
- Choose None for authentication.
- carton token – Name of the previously created data source.
- Parameter1 – Name of the dashboard parameter.
- Create the data source and save it.
- Utilize the data source to create dashboards.