Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Continuously get data from REST API to an updating table (bearer token expires every 24h)

Hi,

 

I'm trying to get data from a REST API that is sending data of a ventilation unit. I can get the instantaneous values (for example room temperature) by the following method: Get data -> Web -> Advanced. Here i put in the URL and the bearer key in an Authentication header.

 

My goal is to have a table with the historical values, so I will need the table to update automatically every 10 minutes by adding a new line with the timestamp and the room temperature at that given time.

 

I have two challenges
1) How can I put the data from the API into a table that automatically updates?
2) The bearer token expires every 24 hours, so I need to make a script that can update it by going through a few steps to recieve the new token. Can this be done in Power BI (and how?) or do I need a seperate script (Python) that can retrieve the new token?

 

I don't have any experience working with API's or Power BI but I have looked into many guides and videos on this topic (which didn't work). I hope someone can point me in the right direction. Thanks!

1 Reply