Created dateUpdated dateAffects versionFix version



Management PortalN/A


This page includes a collection of example scripts which can be used to get introduced with the Blancco Management Portal API endpoints.

NOTE! The provided scripts are fully experimental and built a single use case scenario in mind and are not meant to be used in a production environment!

There is no guarantee or warranty that these scripts will work as intended in a customer specific environment.

Running this script is only recommended in a controlled, non-production environment. Use the provided scripts at your own risk.



  • Python
  • Requests library

This script will export multiple pages of reports one report at a time ("size" parameter set to 1) printing the results and giving a summary after exporting the last page/report.

The endpoint URL, API key, export filter and other parameters are provided as part of the script and can be modified.

Example python script to export multiple pages of reports a single report at a time
import requests

def execute_curl_request(cursor=None):
    url = ''
    headers = {
        'Content-Type': 'application/json',
    data = {
        "filter": {
            "date": {
                "gte": "2023-07-01T00:00:00Z"
        "format": "XML",
        "container": "NONE",
        "size": 1

    if cursor:
        url += f"?cursor={cursor}"

    response =, headers=headers, json=data)
    return response

def check_and_print_response(response):
    if response.status_code == 200:

        cursor_header = response.headers.get('x-blancco-cursor')
        return cursor_header, True
        print("Request failed with status code:", response.status_code)
        return None, False

if __name__ == "__main__":
    cursor = None
    success_count = 0
    failure_count = 0

    while True:
        response = execute_curl_request(cursor)

        if success_count == 0:

        new_cursor, success = check_and_print_response(response)

        if success:
            success_count += 1
            failure_count += 1

        if new_cursor:
            cursor = new_cursor

    print("All matching reports exported. Summary of exported reports:")
    print(f"Successful exports: {success_count}")
    print(f"Failed exports: {failure_count}")