The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hey guys,
I need help with getting result back from a web api. The data which I need to pass to the api is stored in a column and I need a new column to be populated with the result from the web See the example below (BSID is what is available and Group is what I need to get from the Api using the URL https://api.macvendors.com/"BSID")
BSID - Group
FCA13E - Samsung Electronics Co.,Ltd
8841fc - AirTies Wireless Networks
Example of a call would be
https://api.macvendors.com/FCA13E
Thanks
Moiz
Hi Moiz,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi Dale,
Haven't found the proper solution as yet but also did not get time to look into it further.
Moiz
Could you provide us the raw data (1000s of rows) that you're looking to do this for? Then we could hopefully help you get to a working solution.
In the Query Editor, add a Custom Column (Add Column > Custom Column) with the following:
Csv.Document(Web.Contents("https://api.macvendors.com/" & [BSID]))
After that, you'll want to expand the column, then merge the column with "Space" as the separator, and finally rename the column to Group.
My pbix file: https://github.com/ssugar/PowerBICommunity/raw/master/community-sol-279591.pbix
This seems to work, the only issue I am having now is that the example was 2 rows whereas in reality there are 1000s of rows.
Shouldn't be a problem running this against 1000s of rows. I've run something similar across tens of thousands of rows. The main potential issue you'll face is rate limiting from the API. If you run into something like that, try this:
https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/
Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.
User | Count |
---|---|
158 | |
106 | |
96 | |
83 | |
75 |
User | Count |
---|---|
154 | |
137 | |
131 | |
81 | |
62 |