---
title: "PUT /api/v1/config/slos/{slug}"
method: PUT
path: "/api/v1/config/slos/{slug}"
tags: ["SLO"]
---

# PUT /api/v1/config/slos/{slug}

`PUT /api/v1/config/slos/{slug}`

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateSLOBody
  - `slo` Configv1SLO
    - `slug` string — Unique identifier of the SLO. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the SLO is created.
    - `name` string — Required. Name of the SLO. You can modify this value after the SLO is created.
    - `description` string
    - `created_at` string, date-time — Timestamp of when the SLO was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the SLO was last updated. Cannot be set by clients.
    - `collection_ref` Configv1CollectionReference
      - `type` 'SIMPLE' | 'SERVICE' — Type values must match entitiespb.Collection.CollectionType.
      - `slug` string
    - `notification_policy_slug` string — Optional notification policy to explicitly apply to the generated monitors. Slug of the notification policy to use for the SLO. If you don't specify a value, then the collection or service this SLO belongs to must have a notification policy.
    - `signal_grouping` MonitorSignalGrouping — SignalGrouping defines how the set of series from the query are split into signals.
      - `label_names` string[] — Set of label names used to split series into signals. Each unique combination of labels result in its own signal. For example, if `label_names` is `["service", "code"]`, then all series including labels `{service="foo",code="404"}` will be grouped together in the same signal. Cannot be used if `graphite_query` is set.
      - `signal_per_series` boolean — If set to `true`, each series will have its own signal. Cannot be used with `label_names`.
    - `labels` object — Labels are visible in notifications generated by this SLO, and can be used to route alerts with notification overrides.
    - `annotations` object — Annotations are visible in notifications generated by this SLO They can be be templated with labels from notifications.
    - `sli` Configv1SLI
      - `custom_indicator` SLICustomIndicatorConfig — Configuration for error ratio SLIs. You can include these variables in PromQL queries for SLIs: - {{.Window}}. Specifies the window of time that the PromQL query operates on. - {{.GroupBy}}. Specifies a comma-separated list of signal and dimension labels to group the results by. - {{.AdditionalFilters}}. Requires setting `additional_promql_filters`.
        - `good_query_template` string — A PromQL query that measures the number of "good" events for this SLI. Either this or the bad_query_template must be set.
        - `bad_query_template` string — A PromQL query that measures the number of "bad" events for this SLI. Either this or the good_query_template must be set.
        - `total_query_template` string — A PromQL query that measures the total number of events for this SLI. This is required for all error ratio SLOs.
      - `custom_timeslice_indicator` SLICustomTimeSliceIndicatorConfig
        - `query_template` string — A PromQL query template for the timeslice SLI.
        - `timeslice_size` 'TIMESLICE_SIZE_ONE_MINUTE' | 'TIMESLICE_SIZE_FIVE_MINUTES'
        - `condition` SLITimeSliceCondition
          - `op` 'GEQ' | 'GT' | 'LEQ' | 'LT' | 'EQ' | 'NEQ' | 'EXISTS' | 'NOT_EXISTS'
          - `value` number, double — The value to compare against.
      - `custom_dimension_labels` string[] — Used to configure additional labels to export from the underlying queries. This feature provides a logical budget to group unique combination of dimensions. For example, if you want to track a budget per endpoint, add the endpoint label as a dimension. These dimensions are provided on the top-level SLI so that SLOs will receive them in `.GroupBy`.
      - `additional_promql_filters` CommonPromQLMatcher[] — These are made available to the SLO queries and are intended to be used for things like `cluster!~"dev"`
        - `type` 'MatchEqual' | 'MatchRegexp' | 'MatchNotEqual' | 'MatchNotRegexp'
        - `name` string — Prometheus label name for the matcher
        - `value` string — Prometheus label value for the matcher
    - `definition` SLODefinition
      - `objective` number, double
      - `time_window` DefinitionTimeWindow
        - `duration` string — duration as a string in the format "28d" or "24h", etc.
      - `burn_rate_alerting_config` DefinitionBurnRateDefinition[] — Provides the burn rate alert configuration for the SLO. If not provided the default burn rates will be used. The configuration is only valid if the enable_burn_rate_alerting flag is set to true.
        - `window` string
        - `budget` number, double — The amount of allowed errors during a given time window, expressed as a percentage of the error budget. Must be a value between `0.0` and `100.0`, exclusive.
        - `severity` string — Severity may only be one of: critical, warn.
        - `labels` object — Labels to attach when this burn rate triggers. If you add these labels to `signal_groupings`, you can route them in the notification policy, and can route different burn rates to other notifiers.
      - `enable_burn_rate_alerting` boolean — If true enables burn rate alerting.
  - `create_if_missing` boolean — If true, the SLO will be created if it does not already exist, identified by slug. If false, an error will be returned if the SLO does not already exist.
  - `dry_run` boolean — If true, the SLO isn't created or updated, and no response SLO will be returned. The response will return an error if the given SLO is invalid.

## Response `200`

A successful response containing the updated SLO.

- Configv1UpdateSLOResponse
  - `slo` Configv1SLO
    - `slug` string — Unique identifier of the SLO. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the SLO is created.
    - `name` string — Required. Name of the SLO. You can modify this value after the SLO is created.
    - `description` string
    - `created_at` string, date-time — Timestamp of when the SLO was created. Cannot be set by clients.
    - `updated_at` string, date-time — Timestamp of when the SLO was last updated. Cannot be set by clients.
    - `collection_ref` Configv1CollectionReference
      - `type` 'SIMPLE' | 'SERVICE' — Type values must match entitiespb.Collection.CollectionType.
      - `slug` string
    - `notification_policy_slug` string — Optional notification policy to explicitly apply to the generated monitors. Slug of the notification policy to use for the SLO. If you don't specify a value, then the collection or service this SLO belongs to must have a notification policy.
    - `signal_grouping` MonitorSignalGrouping — SignalGrouping defines how the set of series from the query are split into signals.
      - `label_names` string[] — Set of label names used to split series into signals. Each unique combination of labels result in its own signal. For example, if `label_names` is `["service", "code"]`, then all series including labels `{service="foo",code="404"}` will be grouped together in the same signal. Cannot be used if `graphite_query` is set.
      - `signal_per_series` boolean — If set to `true`, each series will have its own signal. Cannot be used with `label_names`.
    - `labels` object — Labels are visible in notifications generated by this SLO, and can be used to route alerts with notification overrides.
    - `annotations` object — Annotations are visible in notifications generated by this SLO They can be be templated with labels from notifications.
    - `sli` Configv1SLI
      - `custom_indicator` SLICustomIndicatorConfig — Configuration for error ratio SLIs. You can include these variables in PromQL queries for SLIs: - {{.Window}}. Specifies the window of time that the PromQL query operates on. - {{.GroupBy}}. Specifies a comma-separated list of signal and dimension labels to group the results by. - {{.AdditionalFilters}}. Requires setting `additional_promql_filters`.
        - `good_query_template` string — A PromQL query that measures the number of "good" events for this SLI. Either this or the bad_query_template must be set.
        - `bad_query_template` string — A PromQL query that measures the number of "bad" events for this SLI. Either this or the good_query_template must be set.
        - `total_query_template` string — A PromQL query that measures the total number of events for this SLI. This is required for all error ratio SLOs.
      - `custom_timeslice_indicator` SLICustomTimeSliceIndicatorConfig
        - `query_template` string — A PromQL query template for the timeslice SLI.
        - `timeslice_size` 'TIMESLICE_SIZE_ONE_MINUTE' | 'TIMESLICE_SIZE_FIVE_MINUTES'
        - `condition` SLITimeSliceCondition
          - `op` 'GEQ' | 'GT' | 'LEQ' | 'LT' | 'EQ' | 'NEQ' | 'EXISTS' | 'NOT_EXISTS'
          - `value` number, double — The value to compare against.
      - `custom_dimension_labels` string[] — Used to configure additional labels to export from the underlying queries. This feature provides a logical budget to group unique combination of dimensions. For example, if you want to track a budget per endpoint, add the endpoint label as a dimension. These dimensions are provided on the top-level SLI so that SLOs will receive them in `.GroupBy`.
      - `additional_promql_filters` CommonPromQLMatcher[] — These are made available to the SLO queries and are intended to be used for things like `cluster!~"dev"`
        - `type` 'MatchEqual' | 'MatchRegexp' | 'MatchNotEqual' | 'MatchNotRegexp'
        - `name` string — Prometheus label name for the matcher
        - `value` string — Prometheus label value for the matcher
    - `definition` SLODefinition
      - `objective` number, double
      - `time_window` DefinitionTimeWindow
        - `duration` string — duration as a string in the format "28d" or "24h", etc.
      - `burn_rate_alerting_config` DefinitionBurnRateDefinition[] — Provides the burn rate alert configuration for the SLO. If not provided the default burn rates will be used. The configuration is only valid if the enable_burn_rate_alerting flag is set to true.
        - `window` string
        - `budget` number, double — The amount of allowed errors during a given time window, expressed as a percentage of the error budget. Must be a value between `0.0` and `100.0`, exclusive.
        - `severity` string — Severity may only be one of: critical, warn.
        - `labels` object — Labels to attach when this burn rate triggers. If you add these labels to `signal_groupings`, you can route them in the notification policy, and can route different burn rates to other notifiers.
      - `enable_burn_rate_alerting` boolean — If true enables burn rate alerting.

## Other responses

- `400` — Cannot update the SLO because the request is invalid.
- `404` — Cannot update the SLO because the slug does not exist.
- `409` — Cannot update the SLO because there is a conflict with an existing SLO.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.net/chronosphere/apis/config-v1-api.md) · [All operations](https://skmtc.net/chronosphere/apis/config-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/chronosphere/config-v1-api/revisions/530951bd2ccf/schema)
