Make your first API call
This guide walks through a complete API workflow: authenticate, list clusters, submit a job, and poll submission status, all using curl.
Prerequisites
- An API key (see Authenticate to the REST API)
- At least one cluster in ready status
- A job script created in the Vantage UI or API
Set the key as an environment variable for convenience:
export VANTAGE_API_KEY=YOUR_API_KEY
export BASE=https://api.vantage.omnivector.solutions/v1
Step 1: List clusters
curl -s -H "Authorization: Bearer $VANTAGE_API_KEY" \
"$BASE/reference/clusters" | jq '.[] | {name, status, provider}'
Note the cluster name you want to target.
Step 2: List job scripts
curl -s -H "Authorization: Bearer $VANTAGE_API_KEY" \
"$BASE/reference/jobs/scripts" | jq '.[] | {id, name}'
Note the script id you want to submit.
Step 3: Submit a job
curl -s -X POST \
-H "Authorization: Bearer $VANTAGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"script_id": "SCRIPT_ID",
"cluster": "CLUSTER_NAME",
"partition": "compute",
"name": "api-test-job"
}' \
"$BASE/reference/jobs/submissions" | jq .
The response includes a submission id. Copy it.
Step 4: Poll submission status
curl -s -H "Authorization: Bearer $VANTAGE_API_KEY" \
"$BASE/reference/jobs/submissions/SUBMISSION_ID" | jq '{status, started_at, completed_at}'
The status field progresses through Pending, Running, and Completed (or Failed).
tip
For production workflows, use the Vantage SDK instead of raw curl calls. The SDK handles pagination, retries, and typed responses.
Related
- Authenticate to the REST API
- REST API reference -- full endpoint list
- OpenAPI specification