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_id- The ID of a monitor that has an agent.
job_id- The ID of the job, from the response that started it.
Response
200
id- The ID of the job.
kindcompile(a plan),tick(a run),chatorshadow_delete.status- The state of the job:
queued,running,doneorfailed. waiting_for- What a waiting job waits for, or
null. steps[]- The job's steps: when each happened, its stage, a line about it, what it cost, and a
reasonorcodewhere it has one. result- What the job produced, by kind, or
nulluntil 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. error- Why the job failed, or
null. error_code- The kind of error, for a job that failed, or
null. usd- What the job cost, in US dollars.
created_at- When the job was queued.
started_at- When it started, or
null. finished_at- When it finished, or
null. heartbeat_at- When a running job last reported, or
null.
Errors
| Status | Code | When |
|---|---|---|
401 | unauthorized | The API key is missing or not valid. |
403 | forbidden | The API key cannot read monitors (a GET) or change them (the other methods). |
404 | not_found | The monitor, its agent or the job is not in your key's project. |
429 | rate_limited | Your 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.