Enable API
First you must enable the API and set up an API key. This is done by logging into your portal account and navigating to "Privacy" in your "Settings" menu.
The API key in the screenshot is a fictional example key. You can use the copy icon to the right of the api key to copy it to the clipboard.
Authentication
You can authenticate in two ways when consuming the API:
- Send the api key as a header named "apikey" - see screenshot further down
- Use standard basic authentication and send api key as the password (username is ignored)
Please refer to the
API Query from PowerShell or
API Query from Power BI blog for further screenshots
and description of this procedure.
Quota
These quota rules are enforced to avoid flooding the API. If quotas are passed, access will automatically be blocked for your tenant until next business day.
- Daily quota: 10,000 API calls
- Rate limit: 100 API calls per minute
Data
Data are returned in json format and standard http status codes apply (e.g. 200 = OK, 404 = Not Found, 500 = Server error). The ambition is to keep the
structures as similar as possible to how they appear in the portal. If you need to do initial investigation or data mining, you can easily extract the data using
postman. All you have to do is add the basic authentication password or add the apikey under "headers"
and call an url, as shown below.
Click one of the three buttons for documentation and url to call of the three APIs.