Forum Discussion

MattTrollope's avatar
MattTrollope
Frequent Visitor
10 months ago
Solved

Creating and triggering a Get Data url dynamically for an API request

Hi

I'm bringing data from the TMetric time recording software into BI using a custom API connector I've created. One of the API requests returns data for users' time entry data when their ID is sent as a query parameter. If the parameter is omitted it returns data for the currently connected user, but there isn't a way of returning the time entries for all users within one request, so I have an API request for each user.

 

I want to be able to return this data for new users when they start, but until they are created in TMetric and have a user ID assigned I'm not able to make the Get Data request for them. The new user's ID is available from other requests to retrieve, so is available to utilise. Is it somehow possible to dynamically create the url for the Get Data request, so that I don't have to create another API request manually every time a new user starts?

 

Many thanks for any suggestions/ideas.

  • 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. 

5 Replies