List Batches

List all batch runs.

Headers

AuthorizationstringRequired

Header authentication of the form Bearer <token>

Query parameters

beforestring or nullOptional
Job ID cursor for pagination. Returns jobs that come before this job ID in the specified sort order
afterstring or nullOptional
Job ID cursor for pagination. Returns jobs that come after this job ID in the specified sort order
limitinteger or nullOptionalDefaults to 100
Maximum number of jobs to return
orderenumOptionalDefaults to desc
Sort order for jobs by creation time. 'asc' for oldest first, 'desc' for newest first
Allowed values:
order_by"created_at"OptionalDefaults to created_at
Field to sort by

Response

Successful Response
created_by_idstring or null
The id of the user that made this object.
last_updated_by_idstring or null
The id of the user that made this object.
created_atstring or nullformat: "date-time"
The unix timestamp of when the job was created.
updated_atstring or nullformat: "date-time"
The timestamp when the object was last updated.
statusenum or null
The status of the job.
completed_atstring or nullformat: "date-time"
The unix timestamp of when the job was completed.
stop_reasonenum or null
The reason why the job was stopped.
metadatamap from strings to any or null
The metadata of the job.
job_typeenum or null
Allowed values:
backgroundboolean or null
Whether the job was created in background mode.
agent_idstring or null

The agent associated with this job/run.

callback_urlstring or null
If set, POST to this URL when the job completes.
callback_sent_atstring or nullformat: "date-time"
Timestamp when the callback was last attempted.
callback_status_codeinteger or null
HTTP status code returned by the callback endpoint.
callback_errorstring or null
Optional error message from attempting to POST the callback endpoint.
ttft_nsinteger or null
Time to first token for a run in nanoseconds
total_duration_nsinteger or null
Total run duration in nanoseconds
idstring or nullformat: "^(job|run)-[a-fA-F0-9]{8}"

The human-friendly ID of the Job

Errors