If you selected the JSON API data source in the Web API section, the next screen of the report wizard allows you to connect your report to data provided by a web service via an HTTP request. This type of data source is particularly useful when working with RESTful APIs or other web-based services. The following sections describe the connection settings in detail.
Connection settings can either be fixed or dynamic:
To make a setting dynamic, click the Parameter... or Insert parameter... link near the setting name:
This will open the Parameters dialog:
Here, you can re-use an existing parameter or create a new one by clicking the Add button. The following properties can be configured:
When you can click the OK button and the reference to the selected parameter will be inserted in the connection setting, for example, the URL will be set to {url}.
Dynamic settings offer flexibility, especially in environments where connection details might change or where different users require different settings. For example, you might want to use different URLs depending on the current environment.
Select the HTTP method to be used for the API request. The available options are:
Click on the HTTP Headers... button to add custom headers to the API request. This might include headers for authentication (e.g., Bearer tokens), content type (e.g., application/json), or other necessary metadata required by the API. You can make the header value dynamic by using the Parameter link as described above.
Before finalizing the configuration, it's important to test the API request to ensure it is functioning as expected. Click the Test Request button and check the message in the popup dialog. If the request was configured correctly, the message will look like this:
If the request was not configured properly, the error message will be displayed, and you can click the Details >> button for more information:
Once you have configured the connection, click Next > to proceed to the Configure JSON Queries step of the report wizard.