The Air Maestro Global Reporting module includes an API that enables external data systems, like Power BI, to retrieve report data through web requests.
Important: As of Air Maestro v3.6.22353.10648, support for API keys in URLs was deprecated due to security concerns. API keys should now be included in the request headers instead. Keys in the URL are not encrypted and may be exposed in logs or intercepted. While older URL-based API links still function, it is strongly recommended to transition to the secure header-based method.
Below are the key steps for enabling, accessing, and integrating Global Report data from Air Maestro using the API:
1. Enabling the API
To enable API access for a report:
- Go to the Global Reporting > A Global Report's wizard > Step 5. Report Schedule
- Click Add API Key to generate a new key and enable API access.
- Update the expiry date of the new API key. By default, it’s set to the current UTC time.
-
- Click the pencil icon to edit.
- Choose an appropriate future date.
- Click the tick to save.
2. Making Web Requests to the API
This section outlines how to structure your web requests and what options you can include.
2.1 URL Basics
After generating an API key, click Copy URL on the report schedule page.
This URL identifies the report endpoint. Paste it into your preferred tool (e.g. Postman, Power BI).
2.2 Data Format
The API supports the following output formats:
- CSV
- Excel (.xls)
- Excel07On (.xlsx)
- Word (.doc)
- Word07On (.docx)
- JSON
The default format is CSV. To request a different format, append
?format=FORMAT
to the URL.
Example:
https://subdomain.airmaestro.com.au/api/reports/123?format=JSON
2.3 Attachment Mode
By default, API requests return reports as downloadable attachments. To receive the data inline (which is useful for tools like Power BI), append this to the URL:
&AsAttachment=False
Example:
https://subdomain.airmaestro.com.au/api/reports/123?format=JSON&AsAttachment=False
2.4 Filter Values
If your report includes filters, you can pass those values via query string parameters.
Filter parameter names and formatting details appear below the API key table on the Report Schedule page.
Example:
https://subdomain.airmaestro.com.au/api/reports/123?format=JSON&AsAttachment=False&Param255=2023-02-24
3. Connecting to the API with Authorization Header
To authorise the request:
- Include the API key in the request header named Authorization.
- Do not use the query string method for new reports.
Example in Postman:
- Go to the Headers tab.
- Add:
-
- Key: Authorization
- Value: <your-api-key>
Note: The Host header must also be included in your request. Omitting it may cause your request to be blocked by Air Maestro's firewall.
To get your API key, click Copy API Key in Step 5. Report Schedule tab.
Rate Limiting
Each report is limited by default to 2 requests per 5 minutes.
To increase this limit, contact: help@airmaestro.net
4. Connecting the API to Power BI
To use the API in Power BI:
- Open Power BI Desktop.
- From the ribbon, select Get Data > Web.
- In the dialog box, go to the Advanced tab.
- Paste the full API URL, including any query string parameters.
- In the HTTP request header parameters fields, add:
- Key: Authorization
- Value: <your-api-key>
- Click OK.
- In the next dialog, select Anonymous and then click Connect.
If configured correctly, Power BI will retrieve the data and show it in a preview/editor window.
Comments
0 comments
Please sign in to leave a comment.