Created date | Updated date | Affects version | Fix version |
---|---|---|---|
|
| Management Portal | N/A |
This page will cover basics on how to utilize Management Portal APIs when exporting reports from the system.
More detailed examples and full descriptions for all available endpoint and their respective parameters can be found from API Guide available within the "Support"-tab in Management Portal.
Below table describes currently available report export endpoints and their differences on a higher level and allows user to choose the best option for the requirements.
Endpoint | Method | Request Format | Allows multiple reports to be exported in a single request | Allows filtering for reports | Description | |
---|---|---|---|---|---|---|
Export reports | /report/export/{uuid} | GET | N/A | Export a single report with its UUID. | ||
Export reports (GET) | /report/export?@imei={imei} | GET | N/A | Export past month's reports with optional IMEI filtering. | ||
Export reports (POST) | /report/export | POST | application/json | Export reports with the filters/options provided in the request body. |
Export Report
The most simple form of exporting an individual report, requires the report UUID to be provided as part of the endpoint.
In the following examples replace {UUID} with a valid report UUID and {API_KEY} with the key string of your API key. If you don't have an API key yet, see more details from API Keys documentation.
curl -X "GET" \ "https://api.eu-west-1.blancco.cloud/v1/report/export/{UUID}" \ -H "accept: */*" \ -H "X-BLANCCO-API-KEY: {API_KEY}"
By default the report is exported in XML format. Also PDF and JSON are supported, the format can be changed by defining "?format=" parameter as part of the request URL after the UUID. Supported values for the format parameter are XML, JSON and PDF.
curl -X "GET" \ "https://api.eu-west-1.blancco.cloud/v1/report/export/{UUID}?format=PDF" \ -H "accept: */*" \ -H "X-BLANCCO-API-KEY: {API_KEY}"
Export Report (GET)
Export past month's reports with optional IMEI filtering. If the report is not created during the past month it will not be included in the results.
In the following examples replace {IMEI} with a valid device IMEI and {API_KEY} with the key string of your API key. If you don't have an API key yet, see more details from API Keys documentation.
curl -X "GET" \ "https://api.eu-west-1.blancco.cloud/v1/report/export?@imei={IMEI}" \ -H "accept: */*" \ -H "X-BLANCCO-API-KEY: {API_KEY}"
Export Report (POST)
Export reports with the options provided in the request body. Allows user to define more defined search criteria and only return matching reports.
Supported report fields
Field name | XML field path | Name |
---|---|---|
IMEI | blancco_hardware_report.system.imei | @imei |
System Serial | blancco_hardware_report.system.serial | @system_serial |
Erasure State | blancco_erasure_report.erasures.erasure.state | @erasure_state |
Custom field | user_data.fields.{CUSTOM_FIELD_NAME} | @custom-{CUSTOM_FIELD_NAME} |
{ "filter": { "date": { "gte": "2023-01-01T00:00:00Z" }, "fields": [ { "name": "@imei", "like": "123456789012345" }, { "name": "@custom-my custom field", "like": "my custom field value" } ] }, "category": "ERASURE", "format": "XML", "container": "ZIP" }