---
title: "List SLO History"
method: POST
path: "/slo-history/get-list"
tags: ["SLO History"]
---

# List SLO History

`POST /slo-history/get-list`

## Request

- Base URL: `https://oneuptime.com/api`
- URL: `https://oneuptime.com/api/slo-history/get-list`
- Auth: API key in header `APIKey`
- TypeScript: <https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/docs/slo-history/get-list/post.ts> (a function with typed inputs; its response is checked against the schema)

Endpoint to list all SLO History items

## Request body

- object
  - `query` SloHistoryQuerySchema: Query schema for SloHistory. A field takes a plain value, which it matches exactly, or an operator its type allows. Telemetry tables are large: bound every query by bucketStart.
    - `projectId` union: Query operators for projectId field of type Object ID. Supported operators: EqualTo, NotEqual, IsNull, NotNull, Includes.
      - string
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `sloId` union: Query operators for sloId field of type Object ID. Supported operators: EqualTo, NotEqual, IsNull, NotNull, Includes.
      - string
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `metricName` union: Query operators for metricName field of type Text. Supported operators: EqualTo, NotEqual, IsNull, NotNull, Includes, EqualToOrNull, Search.
      - string
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
      - object
        - `_type` 'EqualToOrNull', required
        - `value` string, required
      - object
        - `_type` 'Search', required
        - `value` string, required
    - `bucketStart` union: Query operators for bucketStart field of type Date. Supported operators: EqualTo, NotEqual, IsNull, NotNull, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
    - `value` union: Query operators for value field of type Decimal. Supported operators: EqualTo, NotEqual, IsNull, NotNull, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, InBetween.
      - number
      - object
        - `_type` 'NotEqual', required
        - `value` number, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'GreaterThan', required
        - `value` number, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` number, required
      - object
        - `_type` 'LessThan', required
        - `value` number, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` number, required
      - object
        - `_type` 'InBetween', required
        - `startValue` number, required
        - `endValue` number, required
    - `version` union: Query operators for version field of type UInt64. Supported operators: EqualTo, NotEqual, IsNull, NotNull, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, InBetween. A value past 2^53 is sent as a string of digits.
      - number
      - string
      - object
        - `_type` 'NotEqual', required
        - `value` union, required
          - number
          - string
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'GreaterThan', required
        - `value` union, required
          - number
          - string
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` union, required
          - number
          - string
      - object
        - `_type` 'LessThan', required
        - `value` union, required
          - number
          - string
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` union, required
          - number
          - string
      - object
        - `_type` 'InBetween', required
        - `startValue` union, required
          - number
          - string
        - `endValue` union, required
          - number
          - string
    - `_id` union: Query operators for _id field of type Object ID. Supported operators: EqualTo, NotEqual, IsNull, NotNull, Includes.
      - string
      - object
        - `_type` 'NotEqual', required
        - `value` string, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'Includes', required
        - `value` string[], required
    - `createdAt` union: Query operators for createdAt field of type Date. Supported operators: EqualTo, NotEqual, IsNull, NotNull, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual, InBetween. Times are ISO-8601, such as 2026-01-01T00:00:00.000Z.
      - string, date-time
      - object
        - `_type` 'NotEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'IsNull', required
      - object
        - `_type` 'NotNull', required
      - object
        - `_type` 'GreaterThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'GreaterThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThan', required
        - `value` string, date-time, required
      - object
        - `_type` 'LessThanOrEqual', required
        - `value` string, date-time, required
      - object
        - `_type` 'InBetween', required
        - `startValue` string, date-time, required
        - `endValue` string, date-time, required
  - `select` SloHistorySelectSchema: Select schema for SloHistory. Set fields to true to include them in the response.
    - `projectId` boolean
    - `sloId` boolean
    - `metricName` boolean
    - `bucketStart` boolean
    - `value` boolean
    - `version` boolean
    - `_id` boolean
    - `createdAt` boolean
  - `sort` SloHistorySortSchema: Sort schema for SloHistory. Only sortable fields are included.
    - `projectId` 'ASC' | 'DESC': Sort order for projectId field
    - `sloId` 'ASC' | 'DESC': Sort order for sloId field
    - `metricName` 'ASC' | 'DESC': Sort order for metricName field
    - `bucketStart` 'ASC' | 'DESC': Sort order for bucketStart field
    - `value` 'ASC' | 'DESC': Sort order for value field
    - `version` 'ASC' | 'DESC': Sort order for version field
    - `_id` 'ASC' | 'DESC': Sort order for _id field
    - `createdAt` 'ASC' | 'DESC': Sort order for createdAt field
  - `groupBy` SloHistoryGroupBySchema: Group by schema for SloHistory. Only one field can be set to true for grouping.
    - `projectId` boolean: Group by projectId field. Only one field can be selected for grouping.
    - `sloId` boolean: Group by sloId field. Only one field can be selected for grouping.
    - `metricName` boolean: Group by metricName field. Only one field can be selected for grouping.
    - `bucketStart` boolean: Group by bucketStart field. Only one field can be selected for grouping.
    - `_id` boolean: Group by _id field. Only one field can be selected for grouping.
    - `createdAt` boolean: Group by createdAt field. Only one field can be selected for grouping.
  - `limit` number: Maximum number of items to return. Defaults to 10.
  - `skip` number: Number of items to skip for pagination. Defaults to 0.

## Response `200`

Successful response

- object
  - `data` SloHistory[]
    - `projectId` string, required: Project ID
    - `sloId` string, required: SLO ID
    - `metricName` string, required: Metric Name
    - `bucketStart` string, date-time, required: Bucket Start
    - `value` number, required: Value
    - `version` string: Version
  - `count` number

## Other responses

- `400`: Bad request. This response indicates that the request was malformed or contained invalid data.
- `401`: Unauthorized. This response indicates that the request requires user authentication.
- `402`: Payment Required. This response indicates that the request requires payment or a valid subscription.
- `403`: Forbidden. This response indicates that the server understood the request, but refuses to authorize it.
- `405`: Project not found. This response indicates that the requested project does not exist or is not accessible.
- `408`: Request Timeout. This response indicates that the server timed out waiting for the request.
- `415`: Unable to reach server. This response indicates that the server is currently unreachable or down.
- `422`: Not authorized. This response indicates that the user does not have permission to access the requested resource.
- `500`: Internal Server Error. This response indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

---

[API](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification.md) - [All operations](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/oneuptime/apis/oneuptime-openapi-specification/revisions/ba3307d00304?raw)
