Forum Discussion
Power BI reports data connect with REST API and reload data on Refresh dashboard.
Hi, that is not exactly possible. You have two scenarios that can help.
1- You schedule refresh the rest api get data methods for your dashboard. (Up to 8 times a day in pro/free licence)
2- You can create a Streaming data set. In this case you can develop an app to POST the data to Power Bi service. For example trigger your data changes to move them to power bi at the exact moment. This way power bi will give you an URL to post the data with a body json as an example.
Regards, hope this helps
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Firstly I always say that there are no stupid questions!
As mentioned above, what you would need to do, is to create the call to the REST API using Power BI Desktop.
You would then need to configure the scheduled refresh if all your data is only coming from a web based REST API. This will allow your data to be refreshed on the schedule.
Once the above is done, you can then create a dashboard by pinning visuals from your Power BI Report to a dashboard.
The dashboard tiles will automatically update when the underlying data is refreshed.
- Anonymous6 years agoNot applicable
Thanks GilbertQ I will use schedule refresh but I have Graphql API which takes the request params like
My POST API looks something like https://**************.com/api/v1/get_data
{packMarketPent(periods: {start_date: "2019-01-01", end_date: "2019-10-01"}){
channelservice_namemetric_absolute_actual}
}
Can you pls help me whats the best possible way to use this API in POWER BI
- ibarrau6 years agoSuper User
I have connected several times to APIs but without body. I think it is possible but it might be tricky. Use the Web connector to get data and add the URL. (In advance mode you have an option for the headers)
Then check this post to create the body: https://community.powerbi.com/t5/Power-Query/Passing-Variables-in-API-Post-Request-JSON-Body/td-p/529756
And check this post to add headers: https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/
Hope this helps.
- Anonymous6 years agoNot applicable
Thanks for your reply but i have a requirement to show the data from API based on slicer selection in the report.
so can we use the Selected value from the Slicer in the Advanced Editor/Power Query Editor?
- GilbertQ6 years agoSuper User
Hi Anonymous
Here is a previous question if you click on the link it will explain and show you how to get this workinghttps://community.powerbi.com/t5/Power-Query/Pull-data-from-a-REST-API-Authentication/td-p/246006