List all violations for an SLA, sorted first by timestamp (oldest first) and second by total downtime (longest first).
slas.list_violations(strsla_urn, SlaListViolationsParams**kwargs) -> SlaListViolationsResponse
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).
Parameters
sla_urn: str
data_source_urn: Optional[str]
An SLA data source's unique identifier
end_month: Optional[str]
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[str]
Year and month landing within the first SLA evaluation period to include in the result, in the format YYYY-MM. Defaults to 2024-01.
Returns
List all violations for an SLA, sorted first by timestamp (oldest first) and second by total downtime (longest first).
import os
from clarative import Clarative
client = Clarative(
api_key=os.environ.get("CLARATIVE_API_KEY"), # This is the default and can be omitted
)
response = client.slas.list_violations(
sla_urn="sla_urn",
)
print(response)[
{
"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"
}
]