List all violations for an SLA
slas.list_violations(strsla_urn, SlaListViolationsParams**kwargs) -> SlaListViolationsResponse
GET/v1/slas/{sla_urn}/violations
List all violations for an SLA
Parameters
sla_urn: str
data_source_urn: Optional[str]
An SLA data source's unique identifier
timeframe_end: Optional[str]
Year and month landing within the last SLA evaluation period to include in the result, in the format YYYY-MM
timeframe_start: Optional[str]
Year and month landing within the first SLA evaluation period to include in the result, in the format YYYY-MM
Returns
List all violations for an SLA
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",
"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",
"downtime_hours": 0,
"evaluation_period": {
"end_month": {
"month": 0,
"year": 0
},
"start_month": {
"month": 0,
"year": 0
}
},
"uptime_percentage": 0,
"urn": "urn"
}
]