Forum Discussion
Getting web data via api and authorization token
- Anonymous2 years ago
Hi tcouey ,
Powerbi supports setting the format of its request headers when connecting to a web data source.
If you need to provide an API authorization token when connecting to a web data source, you can add the header in the advance option.
The Bearer your_api_token_here section is the value of the Authorization header, where Bearer is a common authentication scheme followed by the actual API token.For more details, you can refer to below document:
Connect to a webpage from Power BI Desktop - Power BI | Microsoft Learn
Power Query Web connector - Power Query | Microsoft Learn
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the assist Adamk!
I'm able to connect properly and can see all my needed tables from the api endpoint.
Do you have any suggestions on ways to keep this data sync updated when publishing to a workspace for endusers to view?
Hi tcouey ,
That means you want to synchronize and update the data from the web api in workspace so that end users can see the latest data after synchronization.
I would suggest that you can use the rest api for refreshes, but note: for shared capacity, you can initiate up to 8 requests per day, including refreshes performed using scheduled refreshes.
like below:
POST https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/refreshes
For more details, you can read below document:
Enhanced refresh with the Power BI REST API - Power BI | Microsoft Learn
Datasets - Refresh Dataset - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly