Forum Discussion
Creating and triggering a Get Data url dynamically for an API request
- 10 months ago
MattTrollope You could put the list of user ids in a table and then iterate over that list with a function that passes in the user id and builds the URL dynamically.
Thank you for your reply, I will proceed in this way.
I'm thinking my main issue will be automatically invoking the Get Data process for the new API requests when they exist, but am hoping this might be covererd in the subsequent reply from v-hashadapu.
Matt Trollope
Hi MattTrollope , Thank you for reaching out to the Microsoft Community Forum.
The key is that you don’t need to invoke new API requests manually each time a new user appears. If your query starts by pulling the up-to-date list of users (including any new ones) and then dynamically loops through their IDs during each refresh, Power BI will automatically fetch data for everyone currently in that list. So as soon as a new user exists in TMetric and appears in that source, their time entries will be included in the next refresh, no extra trigger or manual setup needed.