---
type: api
title: Get an SLO
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/operation/operation-getsloop
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/operation/operation-getsloop
products:
  - Kibana
---

# Get an SLO

Authentication: required

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

## Paths

- `GET` `/api/observability/slos/{id}`
- `GET` `/s/{space_id}/api/observability/slos/{id}`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.
- `id` (string · min length: 8 · max length: 48 · pattern: ^[a-z0-9-_]+$) — required
  The identifier of the SLO.

## Description

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

## Required authorization

- Privileges: `slo_read`

## Query string parameters

- `instanceId` (union enum | string) — optional
  the specific instanceId used by the summary calculation
  Values: `*`
- `remoteName` (string) — optional
  The name of the remote cluster where the SLO is defined, for remote SLOs

## Request body

`application/json`

Any of:
- **object**
- **object**

## Responses

#### `200`

Successful request

`application/json`

- `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 string | string[])
  optional group by field or fields to use to generate an SLO per distinct value
- `id` (string)
  The identifier of the SLO.
- `indicator` (object)
  The SLI indicator. Its `params` depend on `type`; see the `indicator` property of the create SLO request body.
  - `params` (object)
  - `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` (object)
  Defines properties for the SLO objective
  - `target` (number · > 0 · < 1)
    the target objective between 0 and 1 excluded
  - `timesliceTarget` (number · min: 0 · max: 1)
    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` (object)
  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 length: 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` (object)
  The SLO computed data
  - `errorBudget` (object)
    - `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` (object)
  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 whether 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
#### `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 kbn:/api/observability/slos/ID
{}
```

#### curl

```curl
curl -X GET "${KIBANA_URL}/api/observability/slos/${ID}" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Response examples

#### Get SLO response

`application/json`

```json
{
  "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
}
```

#### Bad request

`application/json`

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

#### Unauthorized

`application/json`

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

#### Forbidden

`application/json`

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

#### Not found

`application/json`

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

