Skip to content

Change a Monitor

PATCH
/projects/{projectId}/monitors/{monitorId}
Code sample: Shell / cURL
curl --request PATCH \
--url https://api.uup.dev/v1/projects/prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8/monitors/mon_01J9Z3K8X4M2N6P8Q0R2S4T6V8 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "intervalSec": 1, "locations": [ "example" ], "request": { "method": "GET", "headers": [], "body": null, "auth": null, "expectedStatus": [ "2xx" ], "followRedirects": true, "timeoutMs": 10000 }, "assertions": [ { "kind": "keyword", "op": "contains", "value": "example" } ], "timeoutMs": 1, "packetCount": 1, "maxPacketLossPct": 1, "expectedIntervalSec": 1, "cron": "example", "graceSec": 1, "onStatusPage": true, "validationId": "example", "checks": { "uptime": { "enabled": true }, "performance": { "enabled": true, "thresholdMs": 1 }, "certificate": { "enabled": true }, "domain": { "enabled": true } } }'

Change what you send; the rest stays. The type and the target never change. Turning a Check off ends its open Incident as this token’s act. Changing locations in the middle of an outage is 409 monitor_busy.

projectId
required

The Project’s identifier, prj_….

string

Example

prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8

The Project’s identifier, prj_….

monitorId
required

The Monitor’s identifier, mon_….

string

Example

mon_01J9Z3K8X4M2N6P8Q0R2S4T6V8

The Monitor’s identifier, mon_….

What to change.

Media typeapplication/json

What to change. A field left out stays as it is. The type and the target never change: a new address is a new Monitor.

object
name
string
>= 1 characters <= 200 characters
description
string | null
intervalSec
integer
>= 30
locations

The locations that check it, by id from GET /locations.

Array<string>
>= 1 items <= 5 items
request
object
method
string
default: GET
Allowed values: GET HEAD POST PUT PATCH DELETE
headers
Array<object>
default: <= 20 items
object
name
required
string
>= 1 characters <= 256 characters
value
required
string
body
string | null
auth
One of:
object
kind
required
string
Allowed values: bearer
token
required
string
>= 1 characters <= 4096 characters
expectedStatus
Array<string>
default: 2xx >= 1 items <= 10 items
followRedirects
boolean
default: true
timeoutMs
integer
default: 10000 >= 1000 <= 30000
assertions
Array
<= 10 items
One of:
object
kind
required
string
Allowed values: keyword
op
required
string
Allowed values: contains not_contains
value
required
string
>= 1 characters <= 256 characters
timeoutMs
integer
packetCount
integer
>= 1 <= 10
maxPacketLossPct
integer
<= 99
expectedIntervalSec
integer
>= 60 <= 2678400
cron
string
graceSec
integer
>= 60
onStatusPage
boolean
validationId
string
>= 1 characters <= 100 characters
checks
object
uptime
object
enabled
required
boolean
performance
object
enabled
boolean
thresholdMs
integer
>= 50 <= 30000
certificate
object
enabled
required
boolean
domain
object
enabled
required
boolean

The Monitor, changed.

Media typeapplication/json

A Monitor and its Checks.

object
id
required

The Monitor’s identifier, mon_….

string
projectId
required
string
type
required

Accept a type you do not know: new ones will come.

string
Allowed values: http tcp ping heartbeat
name
required
string
description
required
string | null
target
required

Its URL or host, or a heartbeat’s name for itself.

string
locations
required

The locations that check it. Empty for a heartbeat.

Array<string>
standIns
required

For a location that cannot check it now, the location checking in its place.

object
key
additional properties
string
state
required

active is checked; paused was paused; suspended was stopped because the Plan no longer covers it.

string
Allowed values: active paused suspended
status
required

The worst Status of its enabled Checks, or null with none enabled.

string | null
Allowed values: pending ok warning failed
onStatusPage
required
boolean
ruleIds
required

The Notification rules assigned to it, rul_….

Array<string>
pausedAt
required

When it was paused, or null.

string | null format: date-time
suspendedAt
required

When the Plan stopped it, or null.

string | null format: date-time
createdAt
required

When it was made.

string format: date-time
checks
required
Array<object>

One question a Monitor asks of its target.

object
id
required

The Check’s identifier, chk_….

string
type
required
string
Allowed values: uptime performance certificate domain
enabled
required
boolean
intervalSec
required
integer
status
required

Its latest Status.

string
Allowed values: pending ok warning failed
snoozedUntil
required

Until when its messages are held, or null.

string | null format: date-time
settings
required

Its settings, told apart by kind, with every secret left out. A heartbeat’s carries the url its job calls.

object
kind
required
string
key
additional properties
notApplicable
required

Why it does not apply to this target, or null.

string | null
Allowed values: not_https address no_registrable_domain no_rdap_service rdap_unknown
heartbeatDeadline
required

When a heartbeat is next due, or null.

string | null format: date-time
openIncident
required

An Incident open now.

object
id
required

The Incident’s identifier, inc_….

string
openedAt
required

When the failure that opened it reached us.

string format: date-time
acknowledgedAt
required

When someone said they are on it, or null.

string | null format: date-time
errorKind
required

What the run that opened it saw.

string | null
Allowed values: dns_failure address_refused connection_refused connection_reset timeout tls_handshake_failed certificate_expired certificate_invalid domain_expired registry_unreadable no_signal redirect_downgrade too_many_redirects redirect_invalid port_blocked unexpected_status keyword_missing keyword_present json_mismatch json_invalid body_truncated read_failed no_reply packet_loss probe_unavailable unreachable
createdAt
required

When it was made.

string format: date-time

Example

{
"type": "http",
"state": "active",
"status": "pending",
"checks": [
{
"type": "uptime",
"status": "pending",
"notApplicable": "not_https",
"openIncident": {
"errorKind": "dns_failure"
}
}
]
}

The request was refused: invalid_request names the field at fault.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

No working API token: unauthenticated.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

The Plan allows no more: not_entitled.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

This token may not do this: forbidden.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

No such thing, or not one this token reaches: not_found.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

It conflicts with what is there now.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

Refused for a reason its code names.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

Too many requests: rate_limited. Retry-After says when to try again.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}