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

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

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

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateRollupRuleBody
  - `create_if_missing` boolean — If `true`, the RollupRule will be created if it does not already exist, identified by `slug`. If `false`, an error will be returned if the RollupRule does not already exist.
  - `dry_run` boolean — If `true`, validates the specified configuration without creating or updating the RollupRule. If the specified configuration is valid, the endpoint returns a partial response without the RollupRule. If the specified configuration is invalid, the endpoint returns an error.
  - `rollup_rule` Configv1RollupRule
    - `add_metric_type_label` boolean — Defines whether to add a `__rollup_type__` label in the new metric.
    - `aggregation` 'LAST' | 'MIN' | 'MAX' | 'MEAN' | 'MEDIAN' | 'COUNT' | 'SUM' | 'SUMSQ' | 'STDEV' | 'P10' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'P90' | 'P95' | 'P99' | 'P999' | 'P9999' | 'P25' | 'P75' | 'COUNT_SAMPLES' | 'HISTOGRAM'
    - `bucket_slug` string — The slug of the bucket the RollupRule belongs to.
    - `created_at` string, date-time — Timestamp of when the RollupRule was created. Cannot be set by clients.
    - `drop_raw` boolean — Defines whether to automatically generate drop rules for this rollup rule. Set to `true` to remove raw metrics that match this rollup rule. Default: `false`.
    - `expansive_match` boolean — **DEPRECATED**. A series matches and aggregates only if each label defined by filters and `label_policy.keep` or `graphite_label_policy.replace` (respectively) exist in the series. Setting `expansive_match=true` removes this restriction. Default: `expansive_match=false`. If `false`, a series matches and aggregates only if each label defined by the provided `filters` and the `label_policy.keep` or `graphite_label_policy.replace` settings exist in the series.
    - `filters` unknown

## Response `200`

A successful response containing the updated RollupRule.

- Configv1UpdateRollupRuleResponse
  - `rollup_rule` Configv1RollupRule
    - `add_metric_type_label` boolean — Defines whether to add a `__rollup_type__` label in the new metric.
    - `aggregation` 'LAST' | 'MIN' | 'MAX' | 'MEAN' | 'MEDIAN' | 'COUNT' | 'SUM' | 'SUMSQ' | 'STDEV' | 'P10' | 'P20' | 'P30' | 'P40' | 'P50' | 'P60' | 'P70' | 'P80' | 'P90' | 'P95' | 'P99' | 'P999' | 'P9999' | 'P25' | 'P75' | 'COUNT_SAMPLES' | 'HISTOGRAM'
    - `bucket_slug` string — The slug of the bucket the RollupRule belongs to.
    - `created_at` string, date-time — Timestamp of when the RollupRule was created. Cannot be set by clients.
    - `drop_raw` boolean — Defines whether to automatically generate drop rules for this rollup rule. Set to `true` to remove raw metrics that match this rollup rule. Default: `false`.
    - `expansive_match` boolean — **DEPRECATED**. A series matches and aggregates only if each label defined by filters and `label_policy.keep` or `graphite_label_policy.replace` (respectively) exist in the series. Setting `expansive_match=true` removes this restriction. Default: `expansive_match=false`. If `false`, a series matches and aggregates only if each label defined by the provided `filters` and the `label_policy.keep` or `graphite_label_policy.replace` settings exist in the series.
    - `filters` unknown

## Other responses

- `400` — Cannot update the RollupRule because the request is invalid.
- `404` — Cannot update the RollupRule because the slug does not exist.
- `409` — Cannot update the RollupRule because there is a conflict with an existing RollupRule.
- `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)
