Skip to main content

Poll status and download URL for an export job

GET 

/directory/:entityType/exports/:exportJobId

Returns the current status and, when complete, a download URL for a directory export job previously started with POST /directory/{entityType}/exports.

When to use: Poll this endpoint after starting an export job. Continue polling while status is IN_QUEUE, MAPPING, IN_PROGRESS, SEED_COMPLETED, or TEMPLATE_EXPORT_IN_PROGRESS; stop once it is COMPLETED or FAILED.

Returns: A JSON object with:

  • status — the job's current state, serialized as the enum constant name (e.g. "IN_PROGRESS"):
    • IN_QUEUE — accepted by the egress service and queued for processing.
    • MAPPING — reserved for a CSV post-processing/formatting step.
    • IN_PROGRESS — actively seeding or exporting data.
    • SEED_COMPLETED — initial data seeding finished; a template-driven export continues to the mapping phase.
    • TEMPLATE_EXPORT_IN_PROGRESS — a template-driven export is generating the mapped output file.
    • COMPLETED — finished successfully; fileUrl is populated.
    • FAILED — the job failed; start a new export to retry.
  • stats — processing counters: completed (rows with data), total (total rows), and failed (not currently populated by the egress service integration; always 0).
  • fileUrl — present once status is COMPLETED. A signed GCS download URL valid for 8 hours; if URL signing fails, this field falls back to the raw, unsigned gs:// URI, so consumers should not assume fileUrl is always an https signed link. May be absent even when status is COMPLETED if the exported file is not yet visible to the signing check (a brief race condition) — retry the poll.

Errors: 404 is returned when the job ID is not found or does not belong to this tenant.

Request​

Responses​

The directory job's current status and, when completed, its download URL.