Skip to content

Monitor agent

Get a job

One of the agent's jobs: its kind, status and cost, its steps and its result.

GET/v1/monitors/{monitor_id}/agent/jobs/{job_id}

Send your API key as Authorization: Bearer. See Authentication. How each option works: Monitors.

Path parameters

monitor_idstring
The ID of a monitor that has an agent.
job_idstring
The ID of the job, from the response that started it.

Response

200

idstring
The ID of the job.
kindstring
compile (a plan), tick (a run), chat or shadow_delete.
statusstring
The state of the job: queued, running, done or failed.
waiting_forstring or null
What a waiting job waits for, or null.
steps[]object[]
The job's steps: when each happened, its stage, a line about it, what it cost, and a reason or code where it has one.
resultobject or null
What the job produced, by kind, or null until it is done. A tick: its number, why it stopped, its new and changed objects, its alerts, its run time and its cost. A chat: the reply and its panels. A compile: the plan version.
errorstring or null
Why the job failed, or null.
error_codestring or null
The kind of error, for a job that failed, or null.
usdnumber
What the job cost, in US dollars.
created_atstring or null
When the job was queued.
started_atstring or null
When it started, or null.
finished_atstring or null
When it finished, or null.
heartbeat_atstring or null
When a running job last reported, or null.

Errors

StatusCodeWhen
401unauthorizedThe API key is missing or not valid.
403forbiddenThe API key cannot read monitors (a GET) or change them (the other methods).
404not_foundThe monitor, its agent or the job is not in your key's project.
429rate_limitedYour key or account sent too many requests. Wait for the seconds in Retry-After, then try again.

What each error means and what to do: Errors.

Was this page helpful?