Forum Discussion
Continuously get data from REST API to an updating table (bearer token expires every 24h)
Hey Anonymous
From my experience, I think there are different options each with its own challenges. It's also important to know and remember the limitations that exist on the data refresh.
Basically, it's not possible to simply add a row (append) to an existing table, this is only possible if you are using a streaming or push dataset. Here you can use the Power BI Rest API
https://docs.microsoft.com/en-us/rest/api/power-bi/
to write to such a dataset
https://docs.microsoft.com/en-us/power-bi/service-real-time-streaming.
If you find a way to catch the emitted data from the REST API, you can also trigger a Power Automate event: https://powerbi.microsoft.com/it-it/blog/push-rows-to-a-power-bi-streaming-dataset-without-writing-any-code-using-microsoft-flow/
My favorite architecture for these scenarios is to collect data that is emitted by a REST API using some Azure service like the Event hub: https://azure.microsoft.com/en-us/services/event-hubs/
From there you can use other mechanisms to further distribute the collected data, e.g. into an Azure SQL database that will allow some kind of real-time reporting.
You have to be aware that the above solution has additional costs.
Hopefully, this provides some additional insights and helps to tackle your challenge.
Regards,
Tom