Prerequisite: You should have knowledge on Reports in kloudio and REST APIs.
What is a Custom API connection?
If you create Reports in Kloudio, you'll know that we use a Database or SaaS connection as the data source for your Reports. We specify database name, schema name, and table name to get data from your tables. If your data source is not in a database or supported SaaS application, this article will help you get data via a custom REST API.
Note: For this example we'll be using a Fake API as our data source https://jsonplaceholder.typicode.com/
Steps to create Custom API Report:
- Set up your Custom API connection
- Use your Custom API connection to create a Report.
How to create a custom API connection?
- Login to the Kloudio dashboard
2. Click on
3. Click on
Web Applications section, click on
5. Fill in the
Connection Name (can be anything) and
Base URL (Rest API's Base URL)
6. You will see a page like this. If you want to set up authentication, you can use the
Authentication section. It has options like
Basic Auth or
Bearer. You can also add headers. For this example we are going to keep it simple:
Report Endpoint. This is used to get data from your REST API. There is another option called
Template Endpoint that we will discuss in another article.
7. Complete the following fields:
Name (can be anything), URL (sub URL for the endpoint), Data Access Path (Which is a JSON Path, to access the data list from API Response), and Method (GET or POST).
8. In the end, you'll see the endpoint as shown below:
How to create a custom API Report?
- Go to the Home Screen again
2. Click on
3. Hover over new
New Report, and click
4. You will see the
Report Builder tool as shown below:
5. Click and Select the
Connection name we created in the previous step (Create custom Connection).
Search under section
Select a Table/View/Endpoint
7. You will see the
Endpoint Name you added on the previous step (Create custom Connection). Click the Endpoint.
8. Here is the interesting part- now Kloudio will get all the columns from the response. Even though you have multiple levels in the JSON object, It will still provide all of the columns.
9. Select the Columns needed for the report. You can run a quick test by clicking the
10. Finally, your API Data will populate the table.
11. Save the report by giving it a name.
12. Now you can use this report in Schedules to get the data in Google Sheets, Excel, or any other supported end-user tool.
From Kloudio Team