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.
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
API Query from Power BI
blog for further screenshots
and description of this procedure.
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 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
. 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 buttons for documentation and url to call of the APIs.
Emptying requests from an external system (such as ServiceNOW)
If you need to empty the requests queue to an external system and approve or deny requests from there, you can download this step-by-step guide
that explains this specfic use-case of the API.