Configuring Web API Data Source with Dynamic Date Parameters in Bold BI
Configuring a Web API Data Source with Dynamic Date Parameters in Bold BI
Introduction
Integrating dynamic date parameters into a Web API data source can be crucial for generating up-to-date reports and dashboards. This article provides a step-by-step guide on how to configure a Web API data source in Bold BI to use the current date as a parameter in the API request URL.
Steps to Configure Dynamic Date Parameters
1. Create a Web API Data Source
Start by creating a new Web API data source. Initially, set the URL with a hardcoded date value to ensure the correct format and connectivity.
2. Define a Dashboard Parameter
- Open the dashboard parameter dialog within the data source designer.
- Select the literal type and choose a date range parameter.
- Add a filter for today’s date. This can be done by selecting the “Today” filter option, which is typically available in the parameter settings.
3. Set the Default Value
Choose the default value for the dashboard parameter to ensure that it defaults to the current date.
4. Name and Format the Parameter
Enter a suitable name for the dashboard parameter and select the appropriate format that matches the API’s expected date format.
5. Save the Dashboard Parameter
After configuring the parameter settings, save the dashboard parameter.
6. Edit the Connection
- Open the Edit connection dialog for the data source.
- Replace the hardcoded date value in the URL with the dashboard parameter you have created.
7. Schedule Data Refresh (Optional)
If using extract mode, schedule a daily data source refresh to ensure the data remains current. For guidance on setting up data source refresh schedules, refer to the Bold BI documentation on managing data sources.
Conclusion
By following these steps, you can successfully configure a Web API data source in Bold BI to use dynamic date parameters, allowing for real-time data retrieval based on the current date. This setup is particularly useful for APIs that require a date parameter in the request URL.