Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents

This page will cover the basics on of 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 in the API Guide available within the "Support"-tab in the Management Portal.

Below The below table describes currently available report export endpoints and their differences on a higher level and allows user users to choose the best option for the requirements.

...

Code Block
titleExample curl request
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.

...

Export reports with the options provided in the request body. Allows user users to define more defined search criteria and only return matching reports.

...

Field nameXML field pathName
IMEIblancco_hardware_report.system.imei@imei
System Serialblancco_hardware_report.system.serial@system_serial 
Erasure Stateblancco_erasure_report.erasures.erasure.state@erasure_state 
Custom fielduser_data.fields.{CUSTOM_FIELD_NAME}@custom-{CUSTOM_FIELD_NAME}

Additionally, multiple other parameters can be defined to further limit the returned results and the output format.

Additional parameters

ParameterDescription
date

Date The date range for the exported reports. This object consists of properties with the following valid names: lte (less than or equal), lt (less than), eq (equal), gt (greater than), and gte (greater than or equal).

If this isn't defined, the default is to export reports from the past month.

For example, in order to export all reports from January 2021, you'd use the following: {"gte": "2021-01-01T00:00:00Z", "lt": "2021-02-01T00:00:00Z"}.

In order to disable date filtering, use an empty object. Default The default range of the past month is derived by decreasing the "number" of the month. E.g. if the current date at the time the export is executed is 2021-03-01T07:00:00Z, then that becomes the end of the date range and the start would be 2021-02-01T07:00:00Z.

format

Format of the exported report. If omitted, the default format for ERASURE reports is "XML".

Valid values: "CSV", "JSON", and "XML".

container

Container in which all individual reports are wrapped in.

Valid values: "NONE" and "ZIP" (default).

With "NONE", the reports are wrapped into a single document of the same format as the reports themselves. For example, if the format is "XML" and the container is "NONE", a single XML document is returned that contains all individual XML reports. When the container is "ZIP", all reports have their own file within the returned ZIP file.

Code Block
titleExample JSON paylod
{
  "filter": {
    "date": {
      "gte": "2023-01-01T00:00:00Z"
    },
    "fields": [
      {
        "name": "@imei",
        "like": "{IMEI}"
      },
      {
        "name": "@custom-my custom field",
        "like": "{CUSTOM_FIELD_VALUE}"
      }
    ]
  },
  "format": "XML",
  "container": "ZIP"
}
Code Block
titleExample CSV JSON payload
{
	"filter": {
	   "date":{
	   },
	   "fields": [
		{
			"name": "@erasure_state",
			"like": "Successful"
		}
		]
	  },
	"csv":{
		"columns": ["blancco_erasure_report.erasures.erasure.timestamp","blancco_erasure_report.erasures.erasure.state","blancco_hardware_report.system.manufacturer","blancco_hardware_report.system.model"]
	  },
	"format": "CSV",
	"container": "NONE"
}

Example Request

This example request would export XML format reports for IMEI 123456789012345 created after 1st of January 2023. The exported reports will be returned in a zip folder (each report in its own separate file).

...