Skip to content

Archive a monitor

POST
/monitors/{monitor_id}/archive
curl --request POST \
--url https://api.perstat.io/monitors/example/archive \
--header 'Authorization: Bearer <token>'

Retires a monitor without deleting its record. The monitor stops being checked (archiving pauses it), disappears from monitor lists, and no longer counts against the plan’s allowance. Open incidents on it are resolved and running escalations end, so nobody is paged for a service that is gone. Its incidents, check history, availability figures, and exclusion windows are kept, and it stays readable by ID: GET /monitors/{monitor_id} reports archived: true, and GET /monitors/{monitor_id}/incidents still lists its incidents. Its name becomes available for a new monitor in the same project. POST /monitors/{monitor_id}/restore brings it back.

This is how an API key retires a monitor. Deleting one permanently with an API key is deprecated and ends on 2027-01-01.

Idempotent: Archiving a monitor that is already archived changes nothing and returns it unchanged.

Permissions: Requires a project management role in the owning organization. The change is recorded in the activity log. Accepts API keys with the monitors:write scope, subject to current role and resource grants.

monitor_id
required
string

The archived monitor, with archived: true and enabled: false.

Media typeapplication/json
object
alarm_gate
One of:
null
archived

true while the monitor is archived: it runs no checks, appears in no list and does not count against the plan, but keeps its incidents and availability history. Set on the single-monitor read and in the answers of archive and restore; omitted elsewhere, since lists only ever hold active monitors.

boolean | null
config
required
enabled
required
boolean
id
required
string
interval_seconds
required
integer format: int32
last_severity

Severity des rohen jüngsten Checks (informativ; nicht für die Tönung).

string | null
last_status

Bestätigter Anzeige-Status für den Gesundheits-Punkt je Dienst: failed (rot) = offener Incident/Quorum-Ausfall, degraded (gelb) = unbestätigtes Problem (z. B. einzelner Vantage-Point), passed (grün). None = noch kein Check. Folgt damit derselben Logik wie Alarm/Push.

string | null
name
required
string
policy
One of:
null
project_id
required
string
regions
required
Array<string>
slug
required
string
type
required
string
Examplegenerated
{
"alarm_gate": {
"grace_seconds": 1,
"origins": [
"example"
]
},
"archived": true,
"config": "example",
"enabled": true,
"id": "example",
"interval_seconds": 1,
"last_severity": "example",
"last_status": "example",
"name": "example",
"policy": {
"alarm_consecutive": 1,
"alarm_min_duration_seconds": 1,
"alarm_quorum_mode": "example",
"alarm_quorum_value": 1,
"alert_profile_id": "example",
"effective_alarm": {
"alarm_consecutive": 1,
"alarm_min_duration_seconds": 1,
"alarm_quorum_mode": "example",
"alarm_quorum_value": 1,
"source": "example"
},
"failed_interval_seconds": 1,
"recovery_consecutive": 1,
"recovery_quorum_mode": "example",
"recovery_quorum_value": 1
},
"project_id": "example",
"regions": [
"example"
],
"slug": "example",
"type": "example"
}

Authentication is missing or invalid.

The authenticated caller does not have permission to archive this monitor.

No accessible monitor matches the supplied monitor ID.