Document Mass Uploads

Export the files of a mass upload

POST/document-mass-uploads/{document_mass_upload_id}/items/exports

Starts a CSV export of one upload's files as GET /document-mass-uploads/{document_mass_upload_id}/items lists them and answers 202 with the job. Send filter status failed for a failed-file report. Columns: id, filename, folder_id, status, document_id, error, revert_outcome, revert_reason, created_at, updated_at. 404 for an unknown upload or another organisation's. Gate: view-all-documents or super admin only, else 403 missing_permission. Poll GET /jobs/{id}; result.download_url gives the file for 7 days. Changes nothing; nothing to undo.

Path parameters

  • document_mass_upload_idstring (uuid)Required#

    The mass upload's id.

Headers

  • Idempotency-Keystring#

    Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.

Request body

application/json, optional

  • filterobject#

    The filters of the list, written as in GET /document-mass-uploads/{document_mass_upload_id}/items, such as { "status": "failed" }. Operators nest the same way, such as { "status": { "in": "pending,failed" } }.

  • sortstring#

    Comma-separated fields to sort by, as on the list. Prefix a field with - for descending.

  • formatstring#

    The file format. Only csv is offered, and it is the default.

    One of: csv
{
  "filter": {
    "status": "failed"
  }
}

Responses

202

The export job was started.

Job
{
  "data": {
    "id": "9a9d1c5e-4f2b-4c8e-9a7d-2f1e6b3c4d5a",
    "type": "string",
    "status": "queued",
    "progress": {
      "done": 1,
      "total": 1
    },
    "result": {},
    "error": {},
    "created_at": "2026-06-12T10:00:00+00:00",
    "updated_at": "2026-06-12T10:00:00+00:00",
    "completed_at": "2026-06-12T10:00:00+00:00"
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X POST https://your-org-domain/kong/core/api/v2/document-mass-uploads/{document_mass_upload_id}/items/exports\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "filter": {
    "status": "failed"
  }
}'