---
type: api
title: Get a paginated list of SLOs
description: You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-findslosop
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/operation/operation-findslosop
products:
  - Kibana
---

# Get a paginated list of SLOs

- Server: `https://{kibana_url}`

## Paths

- `GET` `/s/{spaceId}/api/observability/slos`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/authentication#basicauth)

#### Path Parameters

- `spaceId` (string)
  An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.

## Description

You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges.

## Query String Parameters

- `kqlQuery` (string)
  A valid kql query to filter the SLO with
- `size` (integer · default: 1)
  The page size to use for cursor-based pagination, must be greater or equal than 1
- `searchAfter` ([] string)
  The cursor to use for fetching the results from, when using a cursor-base pagination.
- `page` (integer · default: 1)
  The page to use for pagination, must be greater or equal than 1
- `perPage` (integer · max: 5000 · default: 25)
  Number of SLOs returned by page
- `sortBy` (enum  · default: status)
  Sort by field
  Values: `sli_value`, `status`, `error_budget_consumed`, `error_budget_remaining`
- `sortDirection` (enum  · default: asc)
  Sort order
  Values: `asc`, `desc`
- `hideStale` (boolean)
  Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings

## Responses

#### `200`

Successful request

`application/json`

- `page` (number)
- `perPage` (number)
- `results` ([] object)
  - `budgetingMethod` (enum)
    The budgeting method to use when computing the rollup data.
    Values: `occurrences`, `timeslices`
  - `createdAt` (string)
    The creation date
  - `description` (string)
    The description of the SLO.
  - `enabled` (boolean)
    Indicate if the SLO is enabled
  - `groupBy` (union)
    optional group by field or fields to use to generate an SLO per distinct value
    One of: `string[]` or `string`
  - `id` (string)
    The identifier of the SLO.
  - `indicator` (union oneOf)
    - **SLOs_indicator_properties_custom_kql** (`type: sli.kql.custom`)
      Defines properties for a custom query indicator type
      - `params` (object)
        An object containing the indicator parameters.
        - `dataViewId` (string)
          The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
        - `filter` (union)
          Defines properties for a filter
          - **string**
            the KQL query to filter the documents with.
          - **{ filters, kqlQuery }**
            - `filters` ([] object)
              - `meta` ({})
                Defines properties for a filter
                - `alias` (string) — nullable
                - `controlledBy` (string)
                - `disabled` (boolean)
                - `field` (string)
                - `group` (string)
                - `index` (string)
                - `isMultiIndex` (boolean)
                - `key` (string)
                - `negate` (boolean)
                - `params` (object)
                - `type` (string)
                - `value` (string)
              - `query` (object)
            - `kqlQuery` (string)
        - `good` (union)
          The KQL query used to define the good events.
          Same options as `filter` in `params`
        - `index` (string)
          The index or index pattern to use
        - `timestampField` (string)
          The timestamp field used in the source indice.
        - `total` (union)
          The KQL query used to define all events.
          Same options as `filter` in `params`
      - `type` (string)
        The type of indicator.
    - **SLOs_indicator_properties_apm_availability** (`type: sli.apm.transactionErrorRate`)
      Defines properties for the APM availability indicator type
      - `params` (object)
        An object containing the indicator parameters.
        - `environment` (string)
          The APM service environment or "*"
        - `filter` (string)
          KQL query used for filtering the data
        - `index` (string)
          The index used by APM metrics
        - `service` (string)
          The APM service name
        - `transactionName` (string)
          The APM transaction name or "*"
        - `transactionType` (string)
          The APM transaction type or "*"
      - `type` (string)
        The type of indicator.
    - **SLOs_indicator_properties_apm_latency** (`type: sli.apm.transactionDuration`)
      Defines properties for the APM latency indicator type
      - `params` (object)
        An object containing the indicator parameters.
        - `environment` (string)
          The APM service environment or "*"
        - `filter` (string)
          KQL query used for filtering the data
        - `index` (string)
          The index used by APM metrics
        - `service` (string)
          The APM service name
        - `threshold` (number)
          The latency threshold in milliseconds
        - `transactionName` (string)
          The APM transaction name or "*"
        - `transactionType` (string)
          The APM transaction type or "*"
      - `type` (string)
        The type of indicator.
    - **SLOs_indicator_properties_custom_metric** (`type: sli.metric.custom`)
      Defines properties for a custom metric indicator type
      - `params` (object)
        An object containing the indicator parameters.
        - `dataViewId` (string)
          The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
        - `filter` (string)
          the KQL query to filter the documents with.
        - `good` (object)
          An object defining the "good" metrics and equation
          - `equation` (string)
            The equation to calculate the "good" metric.
          - `metrics` ([] union oneOf)
            List of metrics with their name, aggregation type, and field.
            - **aggregation: sum**
              - `aggregation` (enum)
                The aggregation type of the metric.
                Values: `sum`
              - `field` (string)
                The field of the metric.
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
            - **aggregation: doc_count**
              - `aggregation` (enum)
                The aggregation type of the metric.
                Values: `doc_count`
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
        - `index` (string)
          The index or index pattern to use
        - `timestampField` (string)
          The timestamp field used in the source indice.
        - `total` (object)
          An object defining the "total" metrics and equation
          - `equation` (string)
            The equation to calculate the "total" metric.
          - `metrics` ([] union oneOf)
            List of metrics with their name, aggregation type, and field.
            - **aggregation: sum**
              - `aggregation` (enum)
                The aggregation type of the metric.
                Values: `sum`
              - `field` (string)
                The field of the metric.
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
            - **aggregation: doc_count**
              - `aggregation` (enum)
                The aggregation type of the metric.
                Values: `doc_count`
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
      - `type` (string)
        The type of indicator.
    - **SLOs_indicator_properties_histogram** (`type: sli.histogram.custom`)
      Defines properties for a histogram indicator type
      - `params` (object)
        An object containing the indicator parameters.
        - `dataViewId` (string)
          The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
        - `filter` (string)
          the KQL query to filter the documents with.
        - `good` (object)
          An object defining the "good" events
          - `aggregation` (enum)
            The type of aggregation to use.
            Values: `value_count`, `range`
          - `field` (string)
            The field use to aggregate the good events.
          - `filter` (string)
            The filter for good events.
          - `from` (number)
            The starting value of the range. Only required for "range" aggregations.
          - `to` (number)
            The ending value of the range. Only required for "range" aggregations.
        - `index` (string)
          The index or index pattern to use
        - `timestampField` (string)
          The timestamp field used in the source indice.
        - `total` (object)
          An object defining the "total" events
          - `aggregation` (enum)
            The type of aggregation to use.
            Values: `value_count`, `range`
          - `field` (string)
            The field use to aggregate the good events.
          - `filter` (string)
            The filter for total events.
          - `from` (number)
            The starting value of the range. Only required for "range" aggregations.
          - `to` (number)
            The ending value of the range. Only required for "range" aggregations.
      - `type` (string)
        The type of indicator.
    - **SLOs_indicator_properties_timeslice_metric** (`type: sli.metric.timeslice`)
      Defines properties for a timeslice metric indicator type
      - `params` (object)
        An object containing the indicator parameters.
        - `dataViewId` (string)
          The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries.
        - `filter` (string)
          the KQL query to filter the documents with.
        - `index` (string)
          The index or index pattern to use
        - `metric` (object)
          An object defining the metrics, equation, and threshold to determine if it's a good slice or not
          - `comparator` (enum)
            The comparator to use to compare the equation to the threshold.
            Values: `GT`, `GTE`, `LT`, `LTE`
          - `equation` (string)
            The equation to calculate the metric.
          - `metrics` ([] union anyOf)
            List of metrics with their name, aggregation type, and field.
            - **SLOs_timeslice_metric_basic_metric_with_field**
              - `aggregation` (enum)
                The aggregation type of the metric.
                Values: `sum`, `avg`, `min`, `max`, `std_deviation`, `last_value`, `cardinality`
              - `field` (string)
                The field of the metric.
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
            - **SLOs_timeslice_metric_percentile_metric**
              - `aggregation` (enum)
                The aggregation type of the metric. Only valid option is "percentile"
                Values: `percentile`
              - `field` (string)
                The field of the metric.
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
              - `percentile` (number)
                The percentile value.
            - **SLOs_timeslice_metric_doc_count_metric**
              - `aggregation` (enum)
                The aggregation type of the metric. Only valid option is "doc_count"
                Values: `doc_count`
              - `filter` (string)
                The filter to apply to the metric.
              - `name` (string · pattern: ^[A-Z]$)
                The name of the metric. Only valid options are A-Z
          - `threshold` (number)
            The threshold used to determine if the metric is a good slice or not.
        - `timestampField` (string)
          The timestamp field used in the source indice.
      - `type` (string)
        The type of indicator.
  - `instanceId` (string)
    the value derived from the groupBy field, if present, otherwise '*'
  - `name` (string)
    The name of the SLO.
  - `objective` ({})
    Defines properties for the SLO objective
    - `target` (number · > 0 · < 100)
      the target objective between 0 and 1 excluded
    - `timesliceTarget` (number · min: 0 · max: 100)
      the target objective for each slice when using a timeslices budgeting method
    - `timesliceWindow` (string)
      the duration of each slice when using a timeslices budgeting method, as {duraton}{unit}
  - `revision` (number)
    The SLO revision
  - `settings` ({})
    Defines properties for SLO settings.
    - `frequency` (string · default: 1m)
      The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute.
    - `preventCrossProjectSearch` (boolean · default: false) — deprecated
      Pin the L1 rollup transform to the local/origin project only, preventing flat-world (cross-linked-project) reads. Only applies on serverless. Default is false, meaning rollup transforms target all linked projects.
    - `preventInitialBackfill` (boolean · default: false)
      Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window.
    - `projectRoutings` (string · max: 8192) — nullable
      ES ProjectRouting expression controlling which linked projects the L1 rollup reads. When set (including null), overrides preventCrossProjectSearch. null and `_alias:_origin` mean origin only; `_alias:*` means all linked projects. Subset example `_id:p1 AND _id:p2`.
    - `syncDelay` (string · default: 1m)
      The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval.
    - `syncField` (string)
      The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field.
  - `summary` ({})
    The SLO computed data
    - `errorBudget` ({})
      - `consumed` (number)
        The error budget consummed, as a percentage of the initial value.
      - `initial` (number)
        The initial error budget, as 1 - objective
      - `isEstimated` (boolean)
        Only for SLO defined with occurrences budgeting method and calendar aligned time window.
      - `remaining` (number)
        The error budget remaining, as a percentage of the initial value.
    - `sliValue` (number)
    - `status` (enum)
      Values: `NO_DATA`, `HEALTHY`, `DEGRADING`, `VIOLATED`
  - `tags` ([] string)
    List of tags
  - `timeWindow` ({})
    Defines properties for the SLO time window
    - `duration` (string)
      the duration formatted as {duration}{unit}. Accepted values for rolling: 7d, 30d, 90d. Accepted values for calendar aligned: 1w (weekly) or 1M (monthly)
    - `type` (enum)
      Indicates weither the time window is a rolling or a calendar aligned time window.
      Values: `rolling`, `calendarAligned`
  - `updatedAt` (string)
    The last update date
  - `version` (number)
    The internal SLO version
- `searchAfter` (string)
- `size` (number)
  Size provided for cursor based pagination
- `total` (number)
#### `400`

Bad request

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `401`

Unauthorized response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `403`

Forbidden response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
#### `404`

Not found response

`application/json`

- `error` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
GET /s/{spaceId}/api/observability/slos
```

#### curl

```curl
curl -X GET "https://{kibana_url}/s/{spaceId}/api/observability/slos" \
  -H "kbn-xsrf: true"
```

## Response Examples

#### A paginated list of SLOs

```json
{
  "page": 1,
  "perPage": 25,
  "results": [
    {
      "budgetingMethod": "occurrences",
      "createdAt": "2025-01-12T10:03:19.000Z",
      "description": "Availability of my web service",
      "enabled": true,
      "groupBy": "*",
      "id": "8853df00-ae2e-11ed-90af-09bb6422b258",
      "indicator": {
        "params": {
          "filter": "field.environment : \u0022production\u0022 and service.name : \u0022my-service\u0022",
          "good": "request.status_code : \u00222xx\u0022",
          "index": "logs-*",
          "timestampField": "@timestamp",
          "total": "request.status_code : *"
        },
        "type": "sli.kql.custom"
      },
      "instanceId": "*",
      "name": "My Service Availability",
      "objective": {
        "target": 0.99
      },
      "revision": 1,
      "settings": {
        "frequency": "5m",
        "syncDelay": "5m"
      },
      "summary": {
        "errorBudget": {
          "consumed": 0.17,
          "initial": 0.01,
          "isEstimated": false,
          "remaining": 0.83
        },
        "sliValue": 0.9983,
        "status": "HEALTHY"
      },
      "tags": [
        "production",
        "web-service"
      ],
      "timeWindow": {
        "duration": "30d",
        "type": "rolling"
      },
      "updatedAt": "2025-01-12T10:03:19.000Z",
      "version": 2
    }
  ],
  "total": 42
}
```

#### Bad request

```json
{
  "error": "Bad Request",
  "message": "Invalid value \u0027invalid\u0027 supplied to: sortBy",
  "statusCode": 400
}
```

#### Unauthorized

```json
{
  "error": "Unauthorized",
  "message": "security_exception: unable to authenticate user for REST request [/api/observability/slos]",
  "statusCode": 401
}
```

#### Forbidden

```json
{
  "error": "Forbidden",
  "message": "security_exception: action [slo_read] is unauthorized for user",
  "statusCode": 403
}
```

#### Not found

```json
{
  "error": "Not Found",
  "message": "SLO [3749f390-03a3-11ee-8139-c7ff60a1692d] not found",
  "statusCode": 404
}
```

