---
title: "PUT /api/v1/config/drop-rules/{slug}"
method: PUT
path: "/api/v1/config/drop-rules/{slug}"
tags: ["DropRule"]
---

# PUT /api/v1/config/drop-rules/{slug}

`PUT /api/v1/config/drop-rules/{slug}`

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateDropRuleBody
  - `create_if_missing` boolean — If `true`, the DropRule will be created if it does not already exist, identified by `slug`. If `false`, an error will be returned if the DropRule does not already exist.
  - `drop_rule` Configv1DropRule
    - `created_at` string, date-time — Timestamp of when the DropRule was created. Cannot be set by clients.
    - `drop_nan_value` boolean — Drops data points if values are Not a Number (NaN). If set to true, Chronosphere drops NaN data points, along with any published staleness markers. See the [drop rules documentation](https://docs.chronosphere.io/control/shaping/shape-metrics/rules/drop-rules#define-a-value-based-drop-rule) for more information.
    - `filters` Configv1LabelFilter[] — Defines the conditions that determine whether to drop a metric. Drop rules can have multiple filter conditions on different labels, making it possible to drop a subset of the series matching a particular metric name.
      - `name` string — The name of the label to match.
      - `value_glob` string — The glob value of the label to match.
    - `mode` 'ENABLED' | 'DISABLED' | 'PREVIEW'
    - `name` string, required — The name of the DropRule. You can modify this value after the DropRule is created.
    - `slug` string — The unique identifier of the DropRule. If a `slug` isn't provided, one is generated based on the `name` field. You can't modify this field after the DropRule is created.
    - `updated_at` string, date-time — Timestamp of when the DropRule was last updated. Cannot be set by clients.
    - `value_based_drop` DropRuleValueBasedDrop
      - `enabled` boolean — Enables dropping metrics based on a set value.
      - `target_drop_value` number, double — The target data point value at which to drop metrics.
  - `dry_run` boolean — If `true`, validates the specified configuration without creating or updating the DropRule. If the specified configuration is valid, the endpoint returns a partial response without the DropRule. If the specified configuration is invalid, the endpoint returns an error.

## Response `200`

A successful response containing the updated DropRule.

- Configv1UpdateDropRuleResponse
  - `drop_rule` Configv1DropRule
    - `created_at` string, date-time — Timestamp of when the DropRule was created. Cannot be set by clients.
    - `drop_nan_value` boolean — Drops data points if values are Not a Number (NaN). If set to true, Chronosphere drops NaN data points, along with any published staleness markers. See the [drop rules documentation](https://docs.chronosphere.io/control/shaping/shape-metrics/rules/drop-rules#define-a-value-based-drop-rule) for more information.
    - `filters` Configv1LabelFilter[] — Defines the conditions that determine whether to drop a metric. Drop rules can have multiple filter conditions on different labels, making it possible to drop a subset of the series matching a particular metric name.
      - `name` string — The name of the label to match.
      - `value_glob` string — The glob value of the label to match.
    - `mode` 'ENABLED' | 'DISABLED' | 'PREVIEW'
    - `name` string, required — The name of the DropRule. You can modify this value after the DropRule is created.
    - `slug` string — The unique identifier of the DropRule. If a `slug` isn't provided, one is generated based on the `name` field. You can't modify this field after the DropRule is created.
    - `updated_at` string, date-time — Timestamp of when the DropRule was last updated. Cannot be set by clients.
    - `value_based_drop` DropRuleValueBasedDrop
      - `enabled` boolean — Enables dropping metrics based on a set value.
      - `target_drop_value` number, double — The target data point value at which to drop metrics.

## Other responses

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

---

[API](https://skmtc.dev/chronosphere/apis/data-v1-api.md) · [All operations](https://skmtc.dev/chronosphere/apis/data-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chronosphere/data-v1-api/revisions/ee91fd539ced/schema)
