Batch API

Submit many operations as one asynchronous job — built for back-fills and bulk processing.

The Batch API runs a large set of operations as a single asynchronous job instead of many synchronous calls. Submit once, get back a jobId, then poll until the job is done and read the results. It is built for back-fills and bulk processing — nightly re-computation, large migrations, or any workload you would otherwise run as a slow loop of individual requests.

#How it works

  1. Submit your batch of operations to POST /api/v1/batch.
  2. Vedika accepts the job and hands back a jobId right away — you do not wait for the work to finish.
  3. Poll GET /api/v1/batch/{jobId} until the job reports complete.
  4. Read the results back from that same endpoint's response.
Note
This page describes the flow only. The exact request and response shape is defined in the machine-readable spec at /openapi.json and is browsable at /api-reference — treat those as the source of truth for field names.

#Submit a batch job

POST /api/v1/batch with your operations and your API key. The response carries the jobId you will poll next:

curl -s https://api.vedika.io/api/v1/batch \
  -H "x-api-key: $VEDIKA_KEY" \
  -H "Content-Type: application/json" \
  -d @batch-request.json

# -> { "jobId": "..." }

#Poll for the result

GET /api/v1/batch/{jobId} returns the job's current state, and its results once the job is complete:

curl -s https://api.vedika.io/api/v1/batch/$JOB_ID \
  -H "x-api-key: $VEDIKA_KEY"
Tip
Poll on a backoff — a few seconds, growing — rather than tight-looping. Batch jobs are asynchronous and most workloads take longer than a single round trip to finish.

#Aggregate stats

GET /api/v1/batch/stats returns aggregate stats across your batch jobs — useful for a bulk-processing dashboard or a completion check in a CI job:

curl -s https://api.vedika.io/api/v1/batch/stats \
  -H "x-api-key: $VEDIKA_KEY"