Live Chat Icon For mobile
Live Chat Icon

Connecting Your Reports to REST APIs

Connecting Your Reports to REST APIs

We are excited to announce that the Bold Reports Designer supports an Web API data connector as of the September 2020 Bold Reports release. You can connect to any REST API and feed data to your report. Bold Reports Designer has a generic Web API connector you can use to connect to REST APIs using GET/POST methods. The connector also allows you to add request headers and parameters. The connector lets you retrieve responses in JSON or XML formats and allows basic HTTP authentication or open connections through No Authentication mode.

This blog post will walk through the steps to connect your REST API to Bold Reports. As a first step, launch the Bold Reports Enterprise server demo site, referring to the steps to create a report, and create a new report.

Blank report in editing view
Blank report in editing view

Choose Web API connector

To create a new data source with a web data connection, select the data source button on the right. Doing so will expand the data source panel.

Data pane view
Data pane view

In the DATA configuration panel, click on the NEW DATA button. The DATA SOURCES panel lists the data connectors as shown in the following screenshot.

Choose connection type
Choose connection type

Choose the Web API connector. The Web API data connection panel will be displayed.

New data source connection pane
New data source connection pane

Connecting with REST API

In the connection properties, provide a unique name for the data source. Enter your REST API URL and add an authentication key and value under the Header(s) section (if you have any). Set the data format of the result returned by the query from the REST API service. For example, let’s execute a simple GET request, which will return a list of repositories in GitHub for a user account. To do this, refer to the GitHub API documentation and provide the valid REST API URL to get the list of repositories from a user account. Set the authentication type and API token for your GitHub account.

Connection properties
Connection properties

Click Connect to create a data source.

Design query

After connecting, you will be in the query design view with the available tables  displayed on the left pane of the tree view.

Query designer
Query designer

Drag the table into the design pane and select the required columns in the table. Execute the query and click Finish.

Query designer
Query designer

Note: In schema tree, the nested fields in the specified REST API will be shown as flat structure.

The designer page will load so you can proceed with designing your report with this data source.

Data list
Data list

For more details about each connection property in the web data source panel, you can explore the following links:

Pass dynamic value for URL

How to pass headers

How to pass parameters

How to pass raw data

Authentication types

Design your report

Using this data, we can design a report to analyze the details, like number of repositories, repository status, and more. This makes your GitHub project maintenance work easier.

For example, I have designed a report that displays the repository name, created time, and status, along with the total repository count at the bottom in a table format.

Display repository details using table
Display repository details using table

In preview, the report will display the results like in the following screenshot.

Report displaying the detail records of repositories
Report displaying the detail records of repositories

Use scheduling to generate and set up reports for distribution to user groups, right to their inbox.

Conclusion

We hope this blog post helps you to connect to REST APIs using Bold Reports. To further expand your report, you can explore the Bold Reports Designer documentation. I have also attached the generated .rdl file for further reference.

If you have any questions, please post them in the comments section. You can also contact us through our contact page or, if you already have an account, you can log in to submit your support question.

Bold Reports now comes with a 15-day free trial with no credit card information required. We welcome you to start a free trial and experience Bold Reports for yourself. Give it a try and let us know what you think!

Stay tuned to our official TwitterFacebookLinkedInPinterest, and Instagram pages for announcements about upcoming releases.

Leave a Reply