Change a service.
const url = 'https://api.siteqwality.com/v1/services/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","escalation_policy_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","incident_creation_mode":"auto","disabled":true,"incident_merge_window_minutes":1,"auto_publish_to_status_page_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","default_incident_severity":"minor","public_incident_template":{"title":"example","message":"example","resolved_message":"example"},"reopen_window_minutes":1,"auto_resolve":"always","owner_team":"example","tags":["example"],"on_call_schedule_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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.siteqwality.com/v1/services/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "escalation_policy_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "incident_creation_mode": "auto", "disabled": true, "incident_merge_window_minutes": 1, "auto_publish_to_status_page_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "default_incident_severity": "minor", "public_incident_template": { "title": "example", "message": "example", "resolved_message": "example" }, "reopen_window_minutes": 1, "auto_resolve": "always", "owner_team": "example", "tags": [ "example" ], "on_call_schedule_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Header Parameters
Section titled “Header Parameters ”Makes a retry safe: the same key and body within 24 hours returns the first response with Idempotent-Replayed: true. The same key with another body is refused with 422 idempotency_key_reused, and one still running with 409 idempotency_key_in_use.
Request Body required
Section titled “Request Body required ”object
For the three fields below, null clears the value and leaving the
field out keeps it.
true switches the service off: its monitors open no auto incidents. false switches it on.
Deprecated and unused.
null clears it; each field is optional and blank fields are dropped.
object
The public title; auto-published incidents never show the monitor’s name.
The first public update when the incident is published.
The public “Resolved” update.
0 to 1440.
null clears it.
Replaces the tags; [] clears them.
null clears it, so the policy’s first level is on call.
Responses
Section titled “ Responses ”The service. Fields left out keep their values
object
Whether a failing monitor opens an incident on its service.
Deprecated and unused: every failure joins the service’s open auto incident.
A failure this many minutes after a resolved auto incident’s last alert reopens it; 0 never does.
Whether an auto-created incident resolves itself once every monitor recovers.
When the service was switched off; while set its monitors open no auto incidents.
Prefills Publish and words auto-published incidents.
object
The public title; auto-published incidents never show the monitor’s name.
The first public update when the incident is published.
The public “Resolved” update.
The team that owns the service; filter the list with team.
Free-form labels; filter the list with tag.
Who is on call for this service; without it, the escalation policy’s first level.
The roll-up of incidents, monitors, maintenance and on call. On the list and get routes.
object
The worst of incident and monitor state. Maintenance never changes it.
A maintenance window naming this service is running now. It holds paging, never the status.
Linked monitors failing now; paused ones are left out.
When the newest incident on the service opened.
The service’s on-call schedule, else every user and schedule on the policy’s first level.
One person on call for a service right now.
object
The schedule that puts them on call; absent for a user named on the policy directly.
When the schedule hands off; absent for a direct user or past 90 days.
Example
{ "incident_creation_mode": "auto", "auto_resolve": "always", "default_incident_severity": "minor", "health": { "status": "operational" }}Headers
Section titled “Headers ”true when this is the stored first response
Invalid request body
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}Missing or invalid credentials
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}The key or member may not do this, or lacks the scope it needs
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}No such service, escalation policy, on-call schedule or status page in this account
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}Too many requests; wait for the time in Retry-After
An RFC 9457 problem, the body of every /v1 error.
object
https://docs.siteqwality.com/errors/ and the failure’s code, such as not_found.
urn:uuid: and the request id.
The invalid fields, when the request body was refused.
One validation failure; pointer is an RFC 6901 pointer into the request body.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": [ { "pointer": "example", "detail": "example" } ]}