Get Job Status
Check the status and progress of an ingestion job.
Endpoint
GET /jobs/job/:jobId
Parameters
| Parameter | Type | Location | Description |
|---|---|---|---|
jobId | string | path | The job ID returned from ingestion |
Example Request
curl http://localhost:3000/jobs/job/01HQZX3Y4Z5A6B7C8D9E0F1G2H
Response
{
"id": "01HQZX3Y4Z5A6B7C8D9E0F1G2H",
"state": "completed",
"progress": 100,
"data": {
"repoUrl": "https://github.com/username/repo.git",
"ref": "main"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Job identifier |
state | string | Current job state |
progress | number | Progress percentage (0-100) |
data | object | Original job data |
Job States
| State | Description |
|---|---|
queued | Job is waiting in the queue |
active | Job is currently being processed |
completed | Job finished successfully |
failed | Job failed (check failed jobs endpoint) |
Polling for Completion
# Poll every 5 seconds until completed
while true; do
status=$(curl -s http://localhost:3000/jobs/job/01HQZX... | jq -r '.state')
echo "Status: $status"
if [ "$status" = "completed" ] || [ "$status" = "failed" ]; then
break
fi
sleep 5
done
Status Codes
| Code | Description |
|---|---|
200 | Job found |
404 | Job not found |