Forum Discussion
Power BI reports data connect with REST API and reload data on Refresh dashboard.
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"}){
channel service_name metric_absolute_actual}
}
Can you pls help me whats the best possible way to use this API in POWER BI
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.