Skip to content

Batch Retrieve Daily Availability



POST /api/v1/slo/availability/list

Overview

Batch retrieve the daily availability of monitor-based SLOs in the current workspace, optionally with a second-level window summary.

Before You Call and Usage Steps

  1. Call the SLO List to filter monitor-based SLOs, and use content.data[].uuid from the result. If one UUID is unavailable, the entire request fails.

  2. Select the business dates and IANA time zone according to report requirements. Both the start and end dates are included in the results, and each day is calculated based on the actual number of seconds in that calendar day.

  3. To query a specific time period, specify a window within the selected date range. The window value and the daily points are calculated separately. When there is no daily sample, the corresponding value in points is null; when the window succeeds but has no cost sample, value is 100, hasData is true, and updatedAt is null.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI Key for the current workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain the calling credential from API Key Management in the target workspace.

Body Request Parameters

Parameter Type Required Description
window object Start inclusive, end exclusive, up to 604800 seconds.
Example: {"startTime": 1785427200, "endTime": 1785430800}
How to obtain or enter: Specify this only when a second-level summary is required; otherwise omit the entire object.
window.startTime integer Conditionally required Must not be earlier than the start of the calendar day for startDate.
Example: 1785427200
How to obtain or enter: Convert the business window start time to Unix seconds.
window.endTime integer Conditionally required Must be later than the start time, not later than the current server time, and not later than the end of the calendar day for endDate.
Example: 1785430800
How to obtain or enter: Convert the window end time to Unix seconds.
sloUUIDs array Y Up to 100 SLO UUIDs. Results follow the deduplicated request order.
Null allowed: False
Example: ["monitor_example"]
How to obtain or enter: Obtain from content.data[].uuid in the SLO List response, selecting monitor-based SLOs.
startDate string Y Includes the start date.
Null allowed: False
Example: 2026-07-31
How to obtain or enter: Use the report start date in the request time zone, in YYYY-MM-DD format.
endDate string Y Includes the end date. The date range can cover up to 90 calendar days.
Null allowed: False
Example: 2026-07-31
How to obtain or enter: Use the report end date in the same time zone, in YYYY-MM-DD format.
timezone string Y Determines the calendar day boundaries used for statistics.
Null allowed: False
Example: Asia/Shanghai
How to obtain or enter: Enter the IANA time zone to which the business date belongs. You can obtain a reference value from content.timezone in Workspace Details.
interval string Aggregates by day. Default: 1d.
Null allowed: False
Optional values: ['1d']
Example: 1d
How to obtain or enter: Enter 1d or omit this parameter.

Additional Parameter Notes

The results include daily availability and its level, and can also be summarized by exact time. See the usage instructions for the two calculation scopes.

Request Example

curl 'https://openapi.guance.com/api/v1/slo/availability/list' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"sloUUIDs":["monitor_example"],"startDate":"2026-07-31","endDate":"2026-07-31","timezone":"Asia/Shanghai","window":{"startTime":1785427200,"endTime":1785430800}}'

Response

HTTP 200, application/json.

Field Type Description
content.data array<object> SLO statistics returned in deduplicated request order.
content.data[].sloUUID string SLO UUID.
content.data[].name string SLO name.
content.data[].status integer 0: Enabled; 2: Disabled.
content.data[].goal number Target availability, as a percentage.
content.data[].minGoal number Minimum availability target, as a percentage.
content.data[].tagInfo array<object> Associated tags. This is an empty array when no tags are associated.
content.data[].tagInfo[].id integer Tag record ID.
content.data[].tagInfo[].uuid string Tag identifier.
content.data[].tagInfo[].name string Tag name, used for tag queries.
content.data[].tagInfo[].description string Tag description.
content.data[].tagInfo[].colour string Tag color.
content.data[].tagInfo[].scope string Tag scope.
content.data[].points array<object> Daily results for the selected business dates, from earliest to latest.
content.data[].points[].date string Business date, YYYY-MM-DD.
content.data[].points[].availability number or null Availability percentage for the day, with up to 6 decimal places; null if there is no sample.
content.data[].points[].level string normal when it reaches goal; warning when it is below goal but reaches minGoal; critical when it is below minGoal; unknown when there is no data.
content.data[].points[].hasData boolean Whether there is an available sample for the day.
content.data[].window object Returned only when the request includes window.
content.data[].window.startTime integer Exact window start time, in Unix seconds.
content.data[].window.endTime integer Exact window end time, in Unix seconds.
content.data[].window.value number Window availability percentage, with up to 6 decimal places.
content.data[].window.hasData boolean true when the complete query succeeds, including when there are no cost samples.
content.data[].window.dataState string complete when the full window is queried successfully.
content.data[].window.updatedAt integer or null Unix seconds of the latest non-corrected cost sample. This is null when there is no such sample; corrected data can still participate in availability calculations.
content.declaration object or null Workspace declaration.
{
  "code": 200,
  "content": {
    "data": [
      {
        "sloUUID": "monitor_example",
        "name": "服务可用率",
        "status": 0,
        "goal": 99.9,
        "minGoal": 99.5,
        "tagInfo": [],
        "points": [
          {
            "date": "2026-07-31",
            "availability": null,
            "level": "unknown",
            "hasData": false
          }
        ],
        "window": {
          "startTime": 1785427200,
          "endTime": 1785430800,
          "value": 100,
          "hasData": true,
          "dataState": "complete",
          "updatedAt": null
        }
      }
    ],
    "declaration": null
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Handling
406 ft.ParameterValidationFailed Field type, required status, or constraint does not conform to the parameter table Request field validation failed. The message indicates the field or rule. Check the fields, types, and constraints.
400 ft.RequestJsonFormatError Invalid request JSON syntax The request JSON is malformed. Read reason, line, and column in content, and then correct the issue.
400 ft.JsonFormatError JSON syntax is valid but the top level is not an object JSON format error. Place the parameters in a JSON object.
400 ft.ParamsValidateError Invalid SLO list, date range, or time zone Parameter validation failed. The details contain the corresponding fields. Check the number of UUIDs, whether the dates are within 90 days, and the IANA time zone.
400 ft.SloMetricUnsupportedOperation A metric-based SLO was selected This operation is not supported for metric-based SLOs. Use a monitor-based SLO instead, or check the running status of the metric-based SLO.
400 ft.StatusPage.invalid_parameter The exact window does not meet the date, length, or time boundary requirements, or the UUID for the window query is not a valid identifier invalid_parameter Check the Unix seconds, date boundaries, and SLO UUID.
404 ft.NotFoundSLO Any SLO in the request does not exist, has been deleted, or does not belong to the current workspace The specified SLO was not found. Query the SLO List again in the same workspace.
403 ft.ForbiddenQuery No permission to query the target metric Insufficient query permissions. Check the API Key's metric query permissions.
503 ft.QueryServiceUnavailable The query service is unavailable The query service is temporarily unavailable. Use content.retryable to determine whether to retry later.
500 ft.InternalServerError An incomplete query result was read for the exact window Internal error. Retry later; save the response traceId for troubleshooting.

Feedback

Is this page helpful?