Update a maintenance window
PATCH
/organizations/{org_id}/maintenance-windows/{id}
const url = 'https://api.perstat.io/organizations/example/maintenance-windows/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":"example","monitors":["example"],"public_visible":true,"scheduled_end":1,"scheduled_start":1,"title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.perstat.io/organizations/example/maintenance-windows/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "monitors": [ "example" ], "public_visible": true, "scheduled_end": 1, "scheduled_start": 1, "title": "example" }'Updates a maintenance window as a full replacement of title, body, start and end (Unix seconds), public visibility, and the affected monitors. End must be after start (400 otherwise), and monitor ids that do not belong to the organization are ignored. Returns the updated window. Requires project management rights.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org_id
required
string
id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
body
string
monitors
Betroffene Monitore (public_ids; fremde IDs werden ignoriert).
Array<string>
public_visible
Auf den Status-Seiten anzeigen (Default true). false = internes Fenster:
Alarme bleiben unterdrückt, aber die öffentliche Seite zeigt nichts.
boolean
scheduled_end
required
integer format: int64
scheduled_start
required
Unix-Sekunden (UTC).
integer format: int64
title
string
Examplegenerated
{ "body": "example", "monitors": [ "example" ], "public_visible": true, "scheduled_end": 1, "scheduled_start": 1, "title": "example"}Responses
Section titled “Responses”Media typeapplication/json
object
body
required
string
cancelled
required
boolean
id
required
Fenster-public_id.
string
monitors
required
Array<object>
object
id
required
Monitor-public_id.
string
name
required
string
public_visible
required
Erscheint das Fenster auf den Status-Seiten? (Alarm-Unterdrückung und SLA-Ausschluss gelten unabhängig davon.)
boolean
scheduled_end
required
integer format: int64
scheduled_start
required
Unix-Sekunden (UTC).
integer format: int64
title
required
string
Examplegenerated
{ "body": "example", "cancelled": true, "id": "example", "monitors": [ { "id": "example", "name": "example" } ], "public_visible": true, "scheduled_end": 1, "scheduled_start": 1, "title": "example"}