Skip to content
Get started

List all violations for an SLA, sorted first by timestamp (oldest first) and second by total downtime (longest first).

GET/v1/slas/{sla_urn}/violations

List all violations for an SLA, sorted first by timestamp (oldest first) and second by total downtime (longest first).

Path ParametersExpand Collapse
sla_urn: string
Query ParametersExpand Collapse
data_source_urn: optional string

An SLA data source's unique identifier

end_month: optional string

Year and month landing within the last SLA evaluation period to include in the result, in the format YYYY-MM. Defaults to the current time.

start_month: optional string

Year and month landing within the first SLA evaluation period to include in the result, in the format YYYY-MM. Defaults to 2024-01.

ReturnsExpand Collapse
allowable_downtime_hours: number

The total number of allowable downtime hours during the evaluation period, as defined by the SLA's terms

data_source_type: "STATUS_PAGE" or "MONITOR"

The type of data source used to determine the violation.

Accepts one of the following:
"STATUS_PAGE"
"MONITOR"
data_source_urn: string

The unique identifier of the data source used to determine the violation

downtime_hours: number

The total number of downtime hours during the evaluation period

evaluation_period: object { end_month, start_month }

The evaluation period during which the SLA violation occurred. The length of the period is determined by the SLA's configured evaluation window (for example: monthly or quarterly).

end_month: object { month, year }

The month in which the SLA violation ended. Null if the violation is ongoing.

month: number

The month number (1-12)

year: number

The year of the month

start_month: object { month, year }

The month in which the SLA violation started

month: number

The month number (1-12)

year: number

The year of the month

uptime_percentage: number

The percentage of uptime during the evaluation period

urn: string

A unique identifier composed of the SLA URN and the evaluation period

List all violations for an SLA, sorted first by timestamp (oldest first) and second by total downtime (longest first).

curl https://developer.clarative.ai/v1/slas/$SLA_URN/violations \
    -H "Authorization: Bearer $CLARATIVE_API_KEY"
[
  {
    "allowable_downtime_hours": 0,
    "data_source_type": "STATUS_PAGE",
    "data_source_urn": "data_source_urn",
    "downtime_hours": 0,
    "evaluation_period": {
      "end_month": {
        "month": 0,
        "year": 0
      },
      "start_month": {
        "month": 0,
        "year": 0
      }
    },
    "uptime_percentage": 0,
    "urn": "urn"
  }
]
Returns Examples
[
  {
    "allowable_downtime_hours": 0,
    "data_source_type": "STATUS_PAGE",
    "data_source_urn": "data_source_urn",
    "downtime_hours": 0,
    "evaluation_period": {
      "end_month": {
        "month": 0,
        "year": 0
      },
      "start_month": {
        "month": 0,
        "year": 0
      }
    },
    "uptime_percentage": 0,
    "urn": "urn"
  }
]