Jobs API

Endpoints for listing and monitoring processing jobs.

Authentication

All API requests require two headers:

X-SaaS-Email: you@example.com
X-API-Key: re_your_api_key

Get your API key from Settings.

List jobs

GET /api/saas/jobs

Returns all processing jobs for the authenticated user, ordered by creation date (newest first).

Response:

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "progress": 100,
    "binary_name": "Tile Pyramid 1.0.13",
    "package_name": "com.example.tilepyramid",
    "created_at": "2026-05-01T10:00:00Z",
    "completed_at": "2026-05-01T10:08:00Z"
  }
]

Get job status

GET /api/saas/jobs/{job_id}

Status values:

| Status | Description | |--------|-------------| | queued | Waiting for pipeline worker | | running | Currently processing | | completed | Successfully finished | | failed | Processing error — see error field |

Polling

While status is queued or running, poll every 5 seconds:

async function waitForJob(jobId) {
  while (true) {
    const res = await fetch(`/api/saas/jobs/${jobId}`, {
      headers: { 'X-SaaS-Email': email, 'X-API-Key': apiKey }
    })
    const job = await res.json()
    if (job.status === 'completed') return job
    if (job.status === 'failed') throw new Error(job.error)
    await new Promise(r => setTimeout(r, 5000))
  }
}

The dashboard does this automatically — no manual polling needed.