Skip to content

Monitors

Update a monitor

Pause, resume, change the frequency, the webhook or the end (ttl from now, which renews a monitor). A failed PATCH is safe to repeat. Another key of the project pauses, resumes and renews a monitor with an agent, and nothing else.

PATCH/v1/monitors/{monitor_id}

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

Path parameter

monitor_idstring (UUID)
The ID of the monitor, from the response that created it.

Request body

Send one or more fields. You cannot change query: end the monitor and create a new one. Any API key of the project can pause, resume or renew a monitor that has an agent.

statusstringone of paused, active
paused pauses the monitor. active resumes it.
frequencystring
A new frequency: 1h, 6h, 12h, 1d or 7d.
webhook_urlstringat most 2048 characters
A new webhook URL. The response gives a new webhook_secret. null removes the webhook.
ttlstring
A new end for the monitor, counted from now, such as 7d. Send it to renew a monitor before it ends.

Response

200

idstring (UUID)
The ID of the monitor.
querystring
What the monitor watches for.
frequencystring
How often Telem runs the query.
statusstringone of active, paused, ended
active: Telem runs the query on the schedule. paused: you paused it. ended: its end time passed, or its API key was revoked or expired, and it does not run again. A monitor without an agent that nobody polls stops its runs but still shows active: see Monitors.
session_idstring (UUID)
The session where Telem records your polls.
created_atstring (date-time)
When you created the monitor.
last_polled_atstring (date-time) or null
Your last poll or delivered webhook, or null.
expires_atstring (date-time) or null
When the monitor ends, or null without a ttl.
webhook_urlstring or null
Where Telem sends new results, or null.
webhook_secretstring or null
The secret to check webhook requests with. Only the response that sets webhook_url has it, so keep it.
agent_notestring or null
Only in the answer to a create: why the monitor agent did not start, or null. The monitor then runs without an agent.
agent_stateobject or null
The monitor's agent: its status, whether it needs_attention, its plan version, when it runs next, and the watermark of List changes. null for a monitor without an agent.

Errors

StatusCodeWhen
400invalid_requestThe body is empty, or a field is not correct, such as a frequency that is not in the list. Or a provider no longer has this monitor: sending the request again will not help, so end the monitor and create a new one.
400invalid_requestAnother key of the project sent frequency or webhook_url for a monitor with an agent. Only the monitor's own key changes them.
400query_immutableThe body has query.
401unauthorizedThe API key is missing or not valid.
403The API key has no access to monitors.
404not_foundThe monitor does not exist, or another API key created it. A monitor with an agent answers every API key of its project, except to a poll: only its own key polls it.
429rate_limitedYour key went over its requests-per-minute cap, or Telem is busy. Wait for the seconds in Retry-After, then try again.
503unavailableTelem cannot run monitors now. Try again later.
409poll_in_progressAnother call uses this monitor now. Try again.
409monitor_endedThe monitor has ended: its end time passed, or its API key was revoked or expired. Its results stay readable. Create a new monitor.
409pause_not_supportedThis monitor cannot make this change, because one of its sources does not support it. Nothing changed. update_not_supported is the same for other changes.
502unavailableThe change failed. Send the same request again: a repeat is safe.

What each error means and what to do: Errors.

Was this page helpful?