Update a maintenance window
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. Accepts API keys with the maintenance:write scope, subject to current role and resource grants.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Betroffene Monitore (public_ids; fremde IDs werden ignoriert).
Auf den Status-Seiten anzeigen (Default true). false = internes Fenster:
Alarme bleiben unterdrückt, aber die öffentliche Seite zeigt nichts.
Unix-Sekunden (UTC).
Examplegenerated
{ "body": "example", "monitors": [ "example" ], "public_visible": true, "scheduled_end": 1, "scheduled_start": 1, "title": "example"}Responses
Section titled “Responses”Request succeeded. The response body contains the result.
object
Fenster-public_id.
object
Monitor-public_id.
Erscheint das Fenster auf den Status-Seiten? (Alarm-Unterdrückung und SLA-Ausschluss gelten unabhängig davon.)
Unix-Sekunden (UTC).
Examplegenerated
{ "body": "example", "cancelled": true, "id": "example", "monitors": [ { "id": "example", "name": "example" } ], "public_visible": true, "scheduled_end": 1, "scheduled_start": 1, "title": "example"}The request is invalid. Check the supplied fields and values.
Authentication is missing or invalid.
The authenticated caller does not have permission to perform this operation.
No accessible resource matches the supplied identifier.