Python for Exporting Data from Rossum API

This Python code shows how to download XML data captured in a given Rossum queue for the previous calendar day.

This Python code shows how to download XML data captured in a given queue for the previous calendar day – as part of the regular export routine. Update the parameters at the beginning based on your scenario.

The export API is more powerful - you can filter by different criteria or download the data e.g. as a JSON instead - see the full docs.

#!/usr/bin/env python3
# Prints all the data mined by Rossum and validated and exported by a controlee from the previous day in the given
# queue. The format is XML and the number of documents is limited to 100.
# Usage:
import datetime
from rossum.lib.api_client import RossumClient

queue_id = 28984
username = "your1_username"
password = "your_password"
endpoint = ""

with RossumClient(context=None, user=username, password=password, url=endpoint) as client:
    date_today =
    date_end = date_today
    date_start = date_today - datetime.timedelta(days=1)
    response = client.get(

if not response.ok:
    raise ValueError(f"Failed to export: {response.status_code}")


This example will export at most 100 documents. To export more documents, you need to modify the code download multiple pages one by one, until it reaches the page count (or it can simply stop when an empty set of results is finally downloaded).