Create an SLA policy
Creates an uptime target with an optional monitor or Client scope, rolling window and business hours.
POST https://app.upfour.io/v1/sla-policies
Body
namestringrequired
target_pctnumberrequired
The uptime target in percent, above 0 and at most 100, e.g. 99.9.
All other fields7 fields
business_hoursBusinessHours · nullable
Restricts the measurement to these hours; without it the policy measures around the clock.
Nested fields 2 fields
| Field | Type | Description |
|---|---|---|
days optional | map of string[][] | The weekdays measured, keyed by ISO weekday from 1 (Monday) to 7 (Sunday); each lists its [start, end) windows as HH:MM pairs in tz. A day with no windows is excluded; at least one window is required, and windows of a day may not overlap. |
tz optional | string | IANA time zone name; UTC when empty. |
client_iduuid · nullable
degraded_counts_as_violationboolean
monitor_iduuid · nullable
Scopes the policy to one monitor; without it the policy is the default of its client or Company.
window_daysinteger
The rolling window, 1 to 730 days; 30 when omitted or 0.
Returns
A successful request returns 201 with application/json.
Response fields 1 top-level fields
| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | SLAPolicy | ||||||||||||||||||||||||||||||||||||||||||||||||||||
SLAPolicy · 14 fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
Errors
Only the errors this operation can return. Every error uses the same envelope.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The request is malformed or fails validation. |
| 404 | not_found | The requested resource does not exist or is outside the caller's scope. |
| 403 | permission_denied | The credentials do not permit this action. |
Every call can also return unauthorized (401), rate_limit_exceeded (429) or internal_error (500 / 502). See Responses and errors.