Skip to main content

Jobs

Choose your language:

Long-running operations return a job. Use client.jobs to inspect or wait for those operations.

client.jobs.get(jobId)

Read a public async job by id or task id.

SDKclient.jobs.get(job_id)
ReturnsJobRef

Parameters:

LocationParameterTypeRequiredDescription
Pathjob_idstringRequiredJob id or task id returned by an async operation.

Return fields:

FieldTypeDescription
idstringJob id.
typestringJob type, for example test_plan_generation, evaluation or agent_run.
statusstringCurrent job status.
resourceobjectRelated ids such as system_id, evaluation_id, agent_id or run_id.
task_idstringBackground task id when available.
resultanyJob result when available.
errorstringError message when available.

client.jobs.wait(jobId, options)

SDK helper that polls client.jobs.get(...) until the job reaches a terminal state.

SDKclient.jobs.wait(job_id, timeout_ms=..., interval_ms=..., on_poll=None)
Returnsjob.result when present, otherwise JobRef

Parameters:

LocationParameterTypeRequiredDefaultDescription
SDKjob_idstringRequiredJob id or task id.
SDKtimeout_msintegerOptional900000Maximum wait time in milliseconds.
SDKinterval_msintegerOptional5000Poll interval in milliseconds.
SDKon_pollcallableOptionalCallback called with each job payload.

Raises PollTimeoutError on timeout and JobFailedError if the terminal job status is failed, canceled or timed out.