Skip to main content
Long-running operations in Splendor are asynchronous. They follow one pattern: a request creates a job and returns it immediately with a status; you then poll the job until it finishes. Nothing blocks while the work runs.

The pattern

  1. Create — the operation returns a job object with an identifier and an initial status (for example pending or running).
  2. Poll — fetch the job by its identifier until its status is terminal (succeeded/completed, failed, or cancelled).
  3. Act — read the job’s result (a download URL, updated readiness, a count).

Jobs by operation

OperationCreatePoll
ExportPOST /v1/exportGET /v1/export/{export_id}
ReindexPOST /v1/admin/reindex/jobsGET /v1/admin/reindex/jobs/{job_id}
Data deletionDELETE /v1/admin/datasets/{dataset_id}GET /v1/admin/data-deletion-jobs/{job_id}
Schema rebuildPOST /v1/admin/datasets/{dataset_id}/schema/rebuildGET /v1/admin/datasets/{dataset_id}/schema/rebuilds/{job_id}
Ingestionupload or streamGET /v1/ingest/runs/{ingest_run_id}

Polling

Poll on an interval with backoff; there is no need to poll more than every few seconds. Reindex and deletion jobs report per-item progress counts you can surface to users.
import time

def wait_for_export(client, export_id, interval=3):
    while True:
        job = client.get(f"/v1/export/{export_id}").json()
        if job["status"] in {"completed", "failed"}:
            return job
        time.sleep(interval)
Reindex jobs can be cancelled while in flight with POST /v1/admin/reindex/jobs/{job_id}/cancel. Data-deletion jobs run through the managed deletion worker and cannot be cancelled once started.