SLO SLA Status and 24-Hour Trend¶
POST /api/v1/slo/runtime/list
Overview¶
Batch retrieve the current SLA status of SLOs in the workspace of the current API Key, along with the 24-hour status trend up to the specified time. Supports both Monitor-based and Metrics-based SLOs.
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| sloUUIDs | array | Y | List of SLO UUIDs. Pass 1 to 100 items; all SLOs must belong to the current workspace and must not be deleted. |
| asOf | integer | Query cutoff time, Unix timestamp in seconds. Must be a positive integer no later than the current time. When omitted, the current server time is used. |
Additional Notes on Parameters¶
- Requires the SLO management permission in the workspace, authenticated with the
DF-API-KEYrequest header. runtime24h.pointsreturns 24 hourly trend points. The status of each point is calculated based on the SLO statistics period corresponding to the point's end time. The statistics period is determined by the SLO'scheckRange(7 days or 30 days); it does not merely calculate the availability within that single hour.- The current status
current.statusisnormal,degraded,incident, orunknown: if availability reachesgoal, the status isnormal; if it reachesminGoalbut is belowgoal, the status isdegraded; if it is belowminGoal, the status isincident; if availability results are missing, the status isunknown. - When an SLO is disabled, has
groupBygrouping, or data retrieval fails, the SLO status returnsunknownanddataStatereturnsunavailable. Check both the status and data completeness; do not determine that the service is healthy based on HTTP success alone. - If an SLO does not exist, has been deleted, or does not belong to the current workspace, the entire request fails.
Request Example¶
curl 'https://openapi.truewatch.com/api/v1/slo/runtime/list' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"sloUUIDs":["monitor_xxx"]}'
Response¶
The response uses the Common Response Structure, and content contains the following fields:
| Field | Type | Description |
|---|---|---|
| asOf | integer | The cutoff time used for this query, in seconds. |
| data | array | Results for each SLO. Correlate request items by sloUUID; do not rely on the returned order. |
| data[*].sloUUID | string | SLO UUID. |
| data[*].current | object | Current SLA status, including status, dataState, and updatedAt. |
| data[*].runtime24h | object | Trend object, including startTime, endTime, dataState, and points. The start and end times are asOf - 86400 and asOf. |
| data[*].runtime24h.points | array | 24 trend points sorted in ascending order by time. |
| data[].runtime24h.points[].startTime | integer | Start time of the current hourly interval, in seconds. |
| data[].runtime24h.points[].endTime | integer | End time of the current hourly interval, which is also the sampling time of the status for this trend point, in seconds. |
| data[].runtime24h.points[].status | string | SLA status at this time, using the same enumeration as current.status. |
| data[].runtime24h.points[].dataState | string | Data state of this point: complete, no_data, or unavailable. |
| data[].runtime24h.points[].availability | object | Availability information for the statistics period, including value, dataState, updatedAt, startTime, endTime, and dayRange; value is null when there are no available results. |
availability.startTime/endTime indicates the actual availability statistics period, and dayRange is 7d or 30d; these differ from the one-hour display interval of the trend points. updatedAt is the data update time and may be null when no valid results are available.