Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Jobs System

Long-running queries execute asynchronously through the job system. Submit a job, check its status, and download results when ready.

Requires Academic verification.

Workflow

Submit job → Job queued → Job running → Job completed → Download result
                                      → Job failed (check error, rerun)

Submit a Query Job

curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  https://api.syndb.xyz/v1/jobs \
  -d '{
    "syndb_table": 1,
    "dataset_ids": ["11111111-1111-1111-1111-111111111111"],
    "columns": ["neuron_id", "cable_length"],
    "query_scope": "local",
    "row_limit": 1000
  }'

Returns a job_id for tracking.

For most ad hoc querying, use SyQL execution or syndb query exec; they compile and submit this structured job request for you.

Submit a Graph Job

curl -X POST -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  https://api.syndb.xyz/v1/jobs/graph \
  -d '{
    "dataset_id": "11111111-1111-1111-1111-111111111111",
    "max_edges": 5000000,
    "motif_sample_size": 1000,
    "top_hubs": 20
  }'

Check Status

curl -H "Authorization: Bearer $TOKEN" \
  https://api.syndb.xyz/v1/jobs/{job_id}
StatusMeaning
pendingQueued, waiting for a worker
runningCurrently executing
completedResults available for download
failedExecution error (check error)
cancelledCancelled by user

List Your Jobs

curl -H "Authorization: Bearer $TOKEN" \
  https://api.syndb.xyz/v1/jobs

Download Results

curl -H "Authorization: Bearer $TOKEN" \
  https://api.syndb.xyz/v1/jobs/{job_id}/result \
  -o result.arrow

Cancel a Job

curl -X DELETE -H "Authorization: Bearer $TOKEN" \
  https://api.syndb.xyz/v1/jobs/{job_id}

Rerun a Job

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://api.syndb.xyz/v1/jobs/{job_id}/rerun

Creates a new job with the same parameters.

Configuration

ParameterDefaultEnvironment Variable
Max concurrent workers4JOB_QUEUE_MAX_WORKERS
Result TTL24 hoursJOB_RESULT_TTL_HOURS
Max result size1 GBJOB_MAX_RESULT_BYTES

Results are stored in object storage and automatically cleaned up after the TTL expires.