Key Concepts
Job
An extraction task that syncs blockchain data for a dataset, executed by a worker node
- Scheduled - Job is queued, waiting for worker assignment
- Running - Job is actively syncing blockchain data
- StopRequested - Stop signal sent, worker finishing current work
- Stopping - Worker is shutting down the job
- Completed - Job finished successfully (terminal state)
- Stopped - Job was stopped by operator (terminal state)
- Failed - Job encountered an error (terminal state)
Core Operations
List Jobs
View active and historical jobs with pagination
Inspect Job
Get detailed job status and configuration
Monitor Progress
Track sync state and block numbers
Stop Job
Gracefully terminate running jobs
List Jobs
View jobs with pagination support (default limit: 50):active(default) - Shows non-terminal jobs (Scheduled, Running, StopRequested, Stopping)all- Shows all jobs including terminal states- Comma-separated values -
scheduled,running,completed,stopped,error
Inspect a Job
Get detailed information about a specific job:Monitor Job Progress
View sync progress for all tables written by a job:current_block- Highest block in contiguous synced rangestart_block- Lowest block in synced rangefiles_count- Number of Parquet files writtentotal_size_bytes- Total data size in bytes
The
current_block represents the highest block in the contiguous synced range. Gaps in the canonical chain are excluded to ensure accurate, queryable data.Stop a Job
Request graceful termination of a running job:- Worker finishes current operations before stopping
- Job transitions:
Running→StopRequested→Stopping→Stopped - Idempotent: stopping an already stopped job returns success
- Verify completion with
ampctl job inspect
Remove a Job
Delete a job in a terminal state:- Only jobs in terminal states (Completed, Stopped, Failed) can be removed
- Running jobs must be stopped first
- Returns 409 Conflict if job is not in terminal state
- Idempotent: deleting non-existent job returns success (204)
Prune Terminal Jobs
Bulk-remove jobs by status filter:- Periodic cleanup of completed jobs
- Administrative maintenance
- Freeing up database storage
Scripting Examples
Find Running Jobs for Dataset
Monitor Progress Continuously
Alert on Failed Jobs
Clean Up Old Completed Jobs
API Reference
Job management endpoints:| Endpoint | Method | Description |
|---|---|---|
/jobs | GET | List jobs with pagination |
/jobs | DELETE | Prune jobs by status filter |
/jobs/{id} | GET | Get job details |
/jobs/{id} | DELETE | Remove a job |
/jobs/{id}/stop | PUT | Stop a running job |
/jobs/{id}/progress | GET | Get job progress |
/jobs GET:
limit- Maximum jobs to return (default: 50, max: 1000)last_job_id- Cursor for paginationstatus- Status filter (active,all, or comma-separated values)
/jobs DELETE:
status- Required filter (terminal,completed,stopped,error)
For complete API schemas, see the Admin API OpenAPI specification.
Next Steps
Dataset Management
Deploy datasets to create jobs
Worker Management
Monitor workers executing jobs
Monitoring
Set up job progress monitoring