Forum Discussion
Dynamically calling of API
- 4 years ago
Hi Anonymous
See this PBIX file for a working example.
You can create a function and call the API from inside that, passing in the ID and TokenID for each row.
The code within the function looks something like this
Source = Web.BrowserContents("https://website.com/id="&id&"&tokenid="&tokenid)And for each row you have code that calls the function like this
= Table.AddColumn(#"Changed Type", "API Call", each APICall(Text.From([Id]), [TokenID]))You will of course need to enter the correct website address in the function to reach your API.
You also make no mention of needing authentication to the API so no code for this is included.
Regards
Phil
Hi Anonymous
Please supply your file/code so I can see what you are trying. You can change the URL to your API before you do this.
I'm still not clear if you need to use a username and password or some other type of authorization to access your API. Do you?
regards
Phil
- Anonymous4 years agoNot applicable
Thanks PhilipTreacy ,
It is working good now