## Get Uptime Metrics `slas.get_uptime_metrics(strdata_source_urn, SlaGetUptimeMetricsParams**kwargs) -> SlaGetUptimeMetricsResponse` **get** `/v1/slas/{sla_urn}/data-sources/{data_source_urn}/uptime-metrics` Get uptime metrics for an SLA data source ### Parameters - `sla_urn: str` - `data_source_urn: str` - `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[SlaGetUptimeMetricsResponseItem]` - `data_source_urn: str` The unique identifier of the data source - `downtime_events: List[SlaGetUptimeMetricsResponseItemDowntimeEvent]` A list of downtime events that occurred during the timeframe - `duration_hours: float` The duration of the downtime event in hours - `end_time: datetime` The end time of the downtime event - `name: str` The display name of the downtime event - `start_time: datetime` The start time of the downtime event - `downtime_hours: float` The total number of downtime hours during the timeframe - `sla_urn: str` The unique identifier of the SLA - `timeframe: SlaGetUptimeMetricsResponseItemTimeframe` The timeframe for which the uptime metrics are calculated - `end: datetime` The ISO-formatted end datetime of the timeframe for which the metrics are calculated - `start: datetime` The ISO-formatted start datetime of the timeframe for which the metrics are calculated - `uptime_percentage: float` The percentage of uptime during the timeframe - `vendor_urn: str` The unique identifier of the vendor ### Example ```python 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.get_uptime_metrics( data_source_urn="data_source_urn", sla_urn="sla_urn", ) print(response) ```