Skip to main content
POST
/
api
/
admin
/
exports
Queue an async full-dataset CSV export
curl --request POST \
  --url https://pria.praxislxp.com/api/admin/exports \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource": "accounts",
  "filters": {
    "activeOnly": true,
    "accountsearch": "acme"
  },
  "columnIds": [
    "name",
    "status",
    "managerEmail",
    "credits"
  ]
}
'
{
  "success": true,
  "jobId": "6671abc1234def5678901234",
  "message": "Your export is being prepared. We will email you a download link when it is ready."
}

Authorizations

Authorization
string
header
required

JWT token passed in authorization header

Body

application/json
resource
string
required

Export registry key identifying the dataset to export (e.g. 'accounts').

Example:

"accounts"

filters
object

Opaque per-resource filter payload (same shape as the list endpoint body). The worker re-applies role-scoped authorization on top of these filters — they can only narrow, never widen, the caller's scope.

Example:
{
"activeOnly": true,
"accountsearch": "acme"
}
columnIds
string[]

Ordered list of column ids to include in the CSV (from the resource's registry column definitions). Unknown ids are silently ignored. Capped at 200.

Example:
["name", "status", "managerEmail", "credits"]

Response

Export job queued successfully. A download link will be emailed when ready.

success
boolean
Example:

true

jobId
string

Mongo ObjectId of the queued dataExportJob document.

Example:

"6671abc1234def5678901234"

message
string

Human-readable confirmation that the export is being prepared.

Example:

"Your export is being prepared. We will email you a download link when it is ready."