Forum Discussion
Unleashed inventory system and Power Query
- 4 years ago
You'll have to write your own headers in your Power Query function to send the api-auth-id, api-auth-signature, and other headers requested by the Unleashed API. Authenticate as "anonymous" in Power BI and handle all the authentication requirements in your M code. You're in luck that Unleash is simple as they don't require Oauth tokens.
There's no "standard methology" because every API is different. It's very rare that you'll find M documentation from an API provider, usually you'll have cURL, JavaScript, Python, PHP... the usual suspects. Best place to start is from the vendor sandbox as you did, or use Postman if there's no sandbox.
Chris Webb has good content on his blog about making API calls from Power BI. It's not for the faint of heart, but it can be done. Not the easiest thing to do if you've never used Power Query before as you're likely to go from on roadblock to the next, that said it would be a great learning experience if you have the time and inclination.
Thanks, that's a brilliant response. Getting some of the basics explained is hugely helpful.
I've given it a go to write my own queries, and I was hoping you'd take a look and maybe help me troubleshoot. This first one is based on a REST API query that I have managed to make work.
However, I get the error that it's still just getting HTML - which I think means it's not actually interfacing with the API and taking data, it's just copying the webpage.
Here is my second attempt, based on a collection of forum threads. This one seems to have a little more success.
Then it asks me to 'specify how to connect', so I switch back to Web-API authentication and paste my key. After that, I seem to get errors with the json instead:
I'm not entirely sure how to proceed from here.
Advice once again really appreciated. Also, please could you link to Chris' blog? I searched 'Chris Webb REST API Power M query' and I found his blog, but I'm not sure the articles under the Power BI API section I was looking at had details on how to build basic M query connections.