Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence

Knowledge Base
Results will update as you type.
  • Getting Started
  • Erasure Products
  • Erasure Software Tools
  • Asset Reimaging
  • Diagnostics Products
  • Management Portal
    • Management Portal - API
      • API Keys
      • Differences in Report Export API between Management Portal and Blancco Cloud
      • Example scripts for report exporting
      • Exporting reports using Management Portal API
      • Pagination and using cursor as part of Report Export API
    • Blancco Common License
    • Blancco Management Portal Upgrade Wizard
    • Blancco Management Portal Upgrade Wizard for Channel Partners
    • Configure single sign-on with Management Portal
    • Create a custom view to mimic the Management Console's "Summary reporting" feature
    • Feature comparison between Blancco Management Portal and Blancco Management Portal On-Premise
    • How to confirm your Blancco Management Portal erasure client endpoint details?
    • How to create custom views in Management Portal
    • How to recover your Blancco Management Portal account?
    • Transferring Reports from Blancco Cloud to Blancco Management Portal
    • Updating Erasure Client Communications Settings
    • "Upgrade successful" banner shown after logging in to Blancco Cloud
    • Blancco Licensing Bundles
    • How to add a company logo to the BMP and include it in the report template
    • Managing Licenses in License Pools
    • Export reports with custom name using custom fields
    • BMP User Invite Not Accepted Within 14 Days: Next Steps and Resolution Guide
    • How to gather SAML Tracer logs
    • Setting up User and Group Roles in the Blancco Management Portal.
    • Blancco Management Portal Account Disabled Due to Multiple Failed Login Attempts
    • Understanding the difference of user type and user role
    • Editing Custom Field Values for Reports in Blancco Management Portal
    • Instructions to verify the Blancco product hash value downloaded from the Blancco Management Portal
    • How to Change the Default View and Tenant Access View on the Blancco Management Portal
    • How to export and import custom views
    • Using “Match” and “Exist” operators
    • Using “Word starts with” and “Value starts with” operators
    • How to Create a Report Template on the BMP Portal
  • Management Portal (On-Premise)
  • Management Console
  • Hardware Products
  • Mobile Online Solutions (Inhance) Support
  • General Support Articles
  • License Activation
  • Professional Services
  • Key Deploy
  • Circulate

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Exporting reports using Management Portal API
    Updated Apr 08, 2024

      Exporting reports using Management Portal API

      Apr 08, 2024

        Created date

        Updated date

        Affects version

        Fix version

        Jun 19, 2023 

        Feb 14, 2024  

        Management Portal

        N/A

        • 1 Export Report
          • 1.1 Example curl request
          • 1.2 Example curl request in PDF format
        • 2 Export Reports (GET)
          • 2.1 Example curl request
        • 3 Export Reports (POST)
          • 3.1 Supported report fields
          • 3.2 Additional parameters
            • 3.2.1 Example JSON paylod
            • 3.2.2 Example CSV JSON payload
          • 3.3 Example Request

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

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

         

        Endpoint

        Method

        Request Format

        Allows exporting reports for multiple devices in a single request

        Allows filtering for reports

        Description

        Export report

        /report/export/{uuid}

        GET

        N/A

        :cross_mark:

        :cross_mark:

        Export a single report with its UUID.

        Export reports (GET)

        /report/export?@imei={imei}

        GET

        N/A

        :check_mark:

        :check_mark:

        Export past month's reports with optional IMEI filtering.

        Export reports (POST)

        /report/export

        POST

        application/json

        :check_mark:

        :check_mark:

        Export reports with more advanced 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.

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

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

        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.

        Example 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 users 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}

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

        Additional parameters

        Parameter

        Description

        Parameter

        Description

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

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

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

        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" }'

         

         

         

         

          {"serverDuration": 31, "requestCorrelationId": "08f682034d3840f586e2b60aeb73e5b1"}