Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Created dateUpdated dateAffects versionFix version

 

 

Management PortalN/A

Table of Contents

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.

Auf dieser Seite werden die Grundlagen für die Verwendung der Managementportal-APIs zum Exportieren von Berichten erläutert.

Ausführlichere Beispiele und vollständige Beschreibungen für alle verfügbaren Endpunkte und ihre jeweiligen Parameter finden Sie im API-Leitfaden, der auf der Registerkarte "Support" im Managementportal verfügbar ist.

Die nachstehende Tabelle beschreibt die derzeit verfügbaren Berichtsexport-Endpunkte und ihre Unterschiede auf einer höheren Ebene und ermöglicht es dem Benutzer, die beste Option für seine Anforderungen zu wählen.


EndpointMethodeRequest FormatExport von Berichten für mehrere Geräte in einer einzigen AnfrageFilterung der BerichteBeschreibungEndpointMethodRequest FormatAllows exporting reports for multiple devices in a single requestAllows filtering for reportsDescription
Export report/report/export/{uuid}GETN/A(error)(error)

Export a single report with its Exportiert einzelne Berichte mit der UUID.

Export reports (GET)/report/export?@imei={imei}GETN/A(tick)(tick)

Export past month's reports with optional IMEI filteringExportiert die Berichte des vergangenen Monats mit optionaler IMEI-Filterung.

Export reports (POST)/report/exportPOSTapplication/json(tick)(tick)Export reports with more advanced filters/options provided in the request bodyExportiert Berichte mit erweiterten Filtern/Optionen, die im Request-Body angegeben sind.

Export Report

The most simple form of exporting an individual report, requires the report UUID to be provided as part of the endpoint.

Bei der einfachsten Form des Exports eines einzelnen Berichts muss die UUID des Berichts als Teil des Endpunkts angegeben werden.

Ersetzen Sie in den folgenden Beispielen {UUID} durch eine gültige Berichts-UUID und {API_KEY} durch die Zeichenfolge Ihres API-Schlüssels. Wenn Sie noch keinen API-Schlüssel haben, finden Sie weitere Informationen in der API Keys DokumentationIn 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.

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 Standardmäßig wird der Bericht im XML-Format exportiert. Auch PDF und JSON werden unterstützt. Das Format kann geändert werden, indem der Parameter "?format=" parameter as part of the request URL after the UUID. Supported values for the format parameter are XML, JSON and als Teil der Anfrage-URL nach der UUID definiert wird. Unterstützte Werte für den Parameter "format" sind XML, JSON und PDF.

Code Block
titleExample curl request in PDF format
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 Reports (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.

Exportieren Sie die Berichte des vergangenen Monats mit optionaler IMEI-Filterung. Wenn der Bericht nicht im vergangenen Monat erstellt wurde, wird er nicht in die Ergebnisse aufgenommen.

Ersetzen Sie in den folgenden Beispielen {IMEI} durch eine gültige Geräte-IMEI und {API_KEY} durch die Zeichenfolge Ihres API-Schlüssels. Wenn Sie noch keinen API-Schlüssel haben, finden Sie weitere Einzelheiten in der API Keys DokumentationIn 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.

Code Block
titleExample curl request
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 Reports (POST)

Export reports with the options provided in the request body. Allows user to define more defined search criteria and only return matching reportsExportieren von Berichten mit den im Anfragetext angegebenen Optionen. Ermöglicht es dem Benutzer, genauere Suchkriterien zu definieren und nur übereinstimmende Berichte zurückzugeben.

Supported report fields

Field nameFeldnameXML field pathFeldpfadName
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 formatZusätzlich können mehrere andere Parameter definiert werden, um die zurückgegebenen Ergebnisse und das Ausgabeformat weiter einzuschränken.

Additional parameters

ParameterDescriptionBeschreibung
date

Date range for the exported reports. This object consists of properties with the following valid names: lte (less than or equalDatumsbereich für die exportierten Berichte. Dieses Objekt besteht aus Eigenschaften mit den folgenden gültigen Namen: lte (kleiner als oder gleich), lt (less thankleiner als), eq (equalgleich), gt (greater than), and gte (greater than or equal).

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

größer als) und gte (größer als oder gleich).

Wenn dies nicht definiert ist, werden standardmäßig die Berichte des letzten Monats exportiert.

Um zum Beispiel alle Berichte vom Januar 2021 zu exportieren, würden Sie folgendes verwendenFor 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 range of 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 Um die Datumsfilterung zu deaktivieren, verwenden Sie ein leeres Objekt. Der Standardbereich des vergangenen Monats wird durch Verringern der "Zahl" des Monats abgeleitet. Wenn z. B. das aktuelle Datum zum Zeitpunkt der Ausführung des Exports 2021-03-01T07:00:00Z , then that becomes the end of the date range and start would be ist, dann ist dies das Ende des Datumsbereichs und der Beginn wäre 2021-02-01T07:00:00Z.

format

Format of the exported report. If omitted, default format for ERASURE reports is des exportierten Berichts. Falls nicht angegeben, ist das Standardformat für ERASURE-Berichte "XML".

Valid valuesGültige Werte: "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 format is "XML" and container is "NONE", a single XML document is returned that contains all individual XML reports. When 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"
}

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).

Beispiel-Anfrage

Diese Beispielanfrage würde Berichte im XML-Format für IMEI 123456789012345 exportieren, die nach dem 1. Januar 2023 erstellt wurden. Die exportierten Berichte werden in einem Zip-Ordner zurückgegeben (jeder Bericht in einer separaten Datei).

Im folgenden Beispiel ersetzen Sie IMEI durch eine gültige IMEI und {API_KEY} durch die Zeichenfolge Ihres API-Schlüssels. Wenn Sie noch keinen API-Schlüssel haben, finden Sie weitere Informationen in der API Keys DokumentationIn the following example replace IMEI with a valid 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.

Code Block
curl -X 'POST' \
  'https://api.eu-west-1.blancco.cloud/v1/report/export' \
  -H 'accept: */*' \
  -H 'X-BLANCCO-API-KEY: {API_KEY}' \
  -H 'Content-Type: application/json' \
  -d '{
  "filter": {
    "date": {
      "gte": "2023-01-01T00:00:00Z"
    },
    "fields": [
      {
        "name": "@imei",
        "like": "123456789012345"
      },
      {
        "name": "@custom-my custom field",
        "like": "my custom field value"
      }
    ]
  },
  "format": "XML",
  "container": "ZIP"
}'

...