Forum Discussion
Pull data from a REST API Authentication
- 9 years ago
Hi surfersamu,
I have tested in Power BI desktop using the connection information you provided, there is no error throws out. After you fill the connection information like the image you provided and click OK button, please use Anonymous authentication, as you already provide the authorization key.
You can download the attached pbix file to have a look. By the way, here are some samples of calling API to get data in Power BI:
Calling REST APIs and Parsing JSON made simple with Power BI
Get Data from Twitter API with Power Query
Best Regards,
Qiuyun Yu
ZappySys has introduced powerful API Drivers to query virtually any JSON / XML API services in Power BI (e.g. Zendesk, Twitter, Google API, Amazon AWS)
Check this blog for more info: https://zappysys.com/blog/howto-import-json-rest-api-power-bi/
Basically, Calling REST API in Power BI can be a challenging process because you have to deal with many complex issues. If its simple JSON / XML then fine but in the real world, many other issues arise such as pagination, flatten the hierarchy, error handling, security (OAuth, Basic, Certificate).
Hope this helps!!
Step-1 : Create your ODBC DSN to call REST API or read JSON / XML dataStep-2 : Build / Test your REST API QueryStep-3: Import REST API data in Power BI using ODBC connection (Under Get Data >> More >> Other)
You can write queries like below (JSON Driver Example)
SELECT * FROM $ WITH( src='https://service4.ultipro.com/services/EmployeePerson' ,Header='Authorization: Basic c29tZXVzZXI6c29tZXBhc3dvcmQ= || US-Customer-Api-Key: ABCDE' ,RequestMethod='GET' )