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}
| Status | Meaning |
|---|---|
pending | Queued, waiting for a worker |
running | Currently executing |
completed | Results available for download |
failed | Execution error (check error) |
cancelled | Cancelled 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
| Parameter | Default | Environment Variable |
|---|---|---|
| Max concurrent workers | 4 | JOB_QUEUE_MAX_WORKERS |
| Result TTL | 24 hours | JOB_RESULT_TTL_HOURS |
| Max result size | 1 GB | JOB_MAX_RESULT_BYTES |
Results are stored in object storage and automatically cleaned up after the TTL expires.