---
title: "PUT /api/v1/config/log-retention-configs/{slug}"
method: PUT
path: "/api/v1/config/log-retention-configs/{slug}"
tags: ["LogRetentionConfig"]
---

# PUT /api/v1/config/log-retention-configs/{slug}

`PUT /api/v1/config/log-retention-configs/{slug}`

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateLogRetentionConfigBody
  - `create_if_missing` boolean — If `true`, the LogRetentionConfig will be created if it does not already exist, identified by `slug`. If `false`, an error will be returned if the LogRetentionConfig does not already exist.
  - `dry_run` boolean — If `true`, validates the specified configuration without creating or updating the LogRetentionConfig. If the specified configuration is valid, the endpoint returns a partial response without the LogRetentionConfig. If the specified configuration is invalid, the endpoint returns an error.
  - `log_retention_config` Configv1LogRetentionConfig — LogRetentionConfig configures long-term retention policies for log data. Each config specifies a filter to match logs and retention parameters for cold storage (Iceberg). Multiple configs per tenant are supported; when configs overlap, the longest retention wins.
    - `created_at` string, date-time — Timestamp of when the LogRetentionConfig was created. Cannot be set by clients.
    - `filter` string, required — Log query filter. Only matching logs will have the retention config applied.
    - `mode` 'ENABLED' | 'DISABLED', required
    - `name` string, required — The name of the LogRetentionConfig. You can modify this value after the LogRetentionConfig is created.
    - `retention_days` integer, required — Number of days to retain matching logs in long-term (Iceberg) storage after they are exported. Once this period elapses, data is expired from Iceberg by the IcebergDeleter.
    - `slug` string, required — The unique identifier of the LogRetentionConfig. If a `slug` isn't provided, one is generated based on the `name` field. You can't modify this field after the LogRetentionConfig is created.
    - `updated_at` string, date-time — Timestamp of when the LogRetentionConfig was last updated. Cannot be set by clients.

## Response `200`

A successful response containing the updated LogRetentionConfig.

- Configv1UpdateLogRetentionConfigResponse
  - `log_retention_config` Configv1LogRetentionConfig — LogRetentionConfig configures long-term retention policies for log data. Each config specifies a filter to match logs and retention parameters for cold storage (Iceberg). Multiple configs per tenant are supported; when configs overlap, the longest retention wins.
    - `created_at` string, date-time — Timestamp of when the LogRetentionConfig was created. Cannot be set by clients.
    - `filter` string, required — Log query filter. Only matching logs will have the retention config applied.
    - `mode` 'ENABLED' | 'DISABLED', required
    - `name` string, required — The name of the LogRetentionConfig. You can modify this value after the LogRetentionConfig is created.
    - `retention_days` integer, required — Number of days to retain matching logs in long-term (Iceberg) storage after they are exported. Once this period elapses, data is expired from Iceberg by the IcebergDeleter.
    - `slug` string, required — The unique identifier of the LogRetentionConfig. If a `slug` isn't provided, one is generated based on the `name` field. You can't modify this field after the LogRetentionConfig is created.
    - `updated_at` string, date-time — Timestamp of when the LogRetentionConfig was last updated. Cannot be set by clients.

## Other responses

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