Agent results
List changes
Read what changed after a cursor, oldest first. Send next_cursor back as cursor to read on: you never miss a change or read one twice.
GET/v1/monitors/{monitor_id}/agent/changes
Send your API key as Authorization: Bearer. See Authentication. How each option works: Monitors.
Path parameter
monitor_id- The ID of a monitor that has an agent.
Query parameters
cursor- The
next_cursorof your last read. Leave it out, or send0, to read from the start. since- Start at this time instead of a cursor. Do not send both.
kinds- Only these kinds, comma-separated:
entity_added,value_changed,fact_status_changed,alert,runorplan_changed. limit- How many changes to return.
Response
200The changes after your cursor, from ticks that have finished. A tick's changes appear when the tick ends, so you never miss a change or read one twice.
changes[]- The changes, oldest first.
changes[].seq- The change's place in the stream.
changes[].kindentity_added,value_changed,fact_status_changed,alert,runorplan_changed.changes[].subject- The object the change is about, as
entity_idandname. Both arenullfor a run or a plan change. changes[].before- A status change's old status, or a value change's old value. Empty for the other kinds.
changes[].after- The new status or value, with the quote and the page (
url) it was read from. For the other kinds, the details of the change. changes[].at- When the change was recorded, in UTC.
next_cursor- Send it back as
cursorto read on. watermark- The end of the stream for now. When
next_cursorequalswatermark, you are up to date.
Errors
| Status | Code | When |
|---|---|---|
400 | cursor_conflict | The request has both cursor and since. |
400 | kinds_invalid | kinds names a kind that is not in the list. |
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 is not in your key's project, or it has no agent. |
422 | invalid_request | A parameter or the body is not valid. error.param names it. |
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.