Download and install Power BI Desktop (free).
In Settings – Application Management create a new API Application called ‘Power BI’, including a description (otherwise an error will occur).
API application tokens will automatically be created in the Settings - Token Management area (if they are not select ‘refresh tokens’ against the application and they should appear).
Note: Tokens are valid for 1 year.
Ensure the user you are using to access the API has the ‘API – Access All Areas’ Developer API option selected in Settings – Users – Roles.
Select the URL for the API you want to connect with, eg. https://webapi.thelayer.com/api/Opportunity/ByTenant?createdStart=01/01/2021&createdEnd=17/06/2021
Note: You may need to add parameters to the URL such as showOnlyOpen, createdStart and createdEnd dates as in this example.
[Layer API details are available from https://webapi.thelayer.com/swagger/ui/index].
Open Power BI desktop, create a new file and select ‘Get data – Web’ to connect to the Layer API.
Choose ‘Advanced and then enter your API URL in the URL parts field.
Due to the way Power BI parses this data you need to add an extra parameter onto the query string of this URL before it's ready to go; RawJsonResponse=true
So our final API URI would be:
Copy both Token1 and Token 2 (from step 3) into the form request header parameters and select ‘Ok’.
Once the connection has been established the data will be loaded and automatically converted into a table.
Select ‘Close & apply’ from the menu to finish loading the data.
You can now start formatting the data into Power BI reports.