Asynchronous exports

Asynchronous exports move large downloads out of the HTTP request lifecycle. The request returns an export identifier, an export worker writes the file to object storage, and the client downloads the completed file later.

Exports are separate from Confy jobs. confyJobId is the identifier of the Confy job used for progress and logs; the sxs export is identified by its exportId.

See Execution modes and resource profiles to choose between synchronous and asynchronous delivery, execution modes and resource profiles.

When to use exports

Use an export for very large or long-running downloads. Medium requests can continue to use synchronous responses. Synchronous requests above SYNC_MAX_OBSERVATIONS are rejected with 413; clients can opt in to an export with Prefer: respond-async.

API

Create an export

POST /{space}/exports
Content-Type: application/json

{
  "context": "dataflow",
  "agencyID": "ECB",
  "resourceID": "EXR",
  "version": "1.0.5",
  "key": "....",
  "format": "json"
}

Supported formats:

FormatOutput
jsonSDMX-JSON
csvSDMX-CSV
native-csvClickHouse-native CSV
parquetParquet
arrowArrow file
arrowstreamArrow stream
protobufProtobuf

The response is 202 Accepted:

{
  "id": "6ae21ddaa842d11fd072e1f1",
  "status": "pending",
  "confyJobId": "...",
  "statusUrl": "/{space}/exports/6ae21ddaa842d11fd072e1f1",
  "downloadUrl": null
}

A data request can create the same export with Prefer: respond-async:

curl -H 'Prefer: respond-async' \
  'https://{host}/{space}/sdmx/data/dataflow/ECB/EXR/1.0.5?format=json'

List exports

GET /{space}/exports?from=2026-10-01&to=2026-10-31&status=completed&format=json

The list is limited to the last 30 days by default and supports status, format, requester, exportId and confyJobId filters.

Get status

GET /{space}/exports/{exportId}

Statuses:

  • pending — queued;
  • processing — being written;
  • completed — file available;
  • failed — see error;
  • cancelled — cancelled by the requester;
  • expired — the file is no longer available.

Download

GET /{space}/exports/{exportId}/download

MinIO and Azure providers return a short-lived signed URL. Providers without a signed-URL implementation stream the file through sxs.

Cancel

DELETE /{space}/exports/{exportId}

Cancellation is possible while the export is pending or processing.

Admission and limits

The queue is durable in MongoDB. The following settings control admission and execution:

SYNC_MAX_OBSERVATIONS=5000000
EXPORT_WORKER_COUNT=2
EXPORT_QUEUE_SIZE=100
EXPORT_MAX_PER_SPACE=1
EXPORT_MAX_PER_MEMBER=2
EXPORT_MAX_PER_USER=1
EXPORT_MAX_OBSERVATIONS=500000000
EXPORT_MAX_FILE_MB=10240
EXPORT_RETENTION_DAYS=7
EXPORT_HISTORY_DAYS=365

Files are deleted after EXPORT_RETENTION_DAYS; the export record remains available for history until EXPORT_HISTORY_DAYS.

Concurrency limits are enforced with MongoDB-backed counters, so they are shared by all sxs replicas connected to the same database.

A full queue returns:

429 Too Many Requests
Retry-After: 5

Confy

Every accepted export creates a Confy job after admission. The job payload includes resourceId, resourceType, agencyID, version, memberId and spaceId; the corresponding Confy job is stored as confyJobId.

The job receives:

  • an Export started event;
  • progress events using the stable export progressMessageId;
  • a final summary such as Export completed: N observations, B bytes.

Rejected requests do not create a Confy job.

Confy provides an Exports tab under sxs with:

  • summary cards and live status refresh;
  • date, status, format and requester filters;
  • a paginated export table;
  • a detail dialog with lifecycle events and confyJobId;
  • download and cancel actions.

The tool is backed by the dedicated RPC service:

sxsExports.loadAll
sxsExports.loadOne
sxsExports.stats
sxsExports.history
sxsExports.cancel
sxsExports.download

The equivalent sxsStats.sxsExports, sxsStats.loadSXSExport, sxsStats.sxsExportHistory and sxsStats.sxsExportStats methods remain for backward compatibility. Export records are retained after the object file expires so history remains available.