Skip to content

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_idstring
The ID of a monitor that has an agent.

Query parameters

cursorintegerdefault 0at least 0
The next_cursor of your last read. Leave it out, or send 0, to read from the start.
sincestring (date-time)
Start at this time instead of a cursor. Do not send both.
kindsstringat most 200 characters
Only these kinds, comma-separated: entity_added, value_changed, fact_status_changed, alert, run or plan_changed.
limitintegerdefault 2001 to 500
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[]object[]
The changes, oldest first.
changes[].seqinteger
The change's place in the stream.
changes[].kindstring
entity_added, value_changed, fact_status_changed, alert, run or plan_changed.
changes[].subjectobject
The object the change is about, as entity_id and name. Both are null for a run or a plan change.
changes[].beforeany
A status change's old status, or a value change's old value. Empty for the other kinds.
changes[].afterany
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[].atstring
When the change was recorded, in UTC.
next_cursorinteger
Send it back as cursor to read on.
watermarkinteger
The end of the stream for now. When next_cursor equals watermark, you are up to date.

Errors

StatusCodeWhen
400cursor_conflictThe request has both cursor and since.
400kinds_invalidkinds names a kind that is not in the list.
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 is not in your key's project, or it has no agent.
422invalid_requestA parameter or the body is not valid. error.param names it.
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?