> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# UpdateLogRetentionConfig



## OpenAPI

````yaml openapi/api_v1_config_openapi3_DOCUMENTATION_ONLY.json PUT /api/v1/config/log-retention-configs/{slug}
openapi: 3.0.3
info:
  description: >

    The Config API provides standard HTTP/JSON REST endpoints for creating,
    reading,

    updating, deleting, and listing configurable Chronosphere resources.


    Use this link to download the raw Swagger specification:

    <a href="/api/v1/config/swagger.json">/api/v1/config/swagger.json</a>
  title: Config V1 API
  version: v1
servers:
  - url: https://{tenant}.chronosphere.io
    variables:
      tenant:
        default: tenant
        description: tenant ID assigned by the service provider
security:
  - ApiKeyAuth: []
tags:
  - name: ConfigV1
paths:
  /api/v1/config/log-retention-configs/{slug}:
    put:
      tags:
        - LogRetentionConfig
      operationId: UpdateLogRetentionConfig
      parameters:
        - in: path
          name: slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfigV1UpdateLogRetentionConfigBody'
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/configv1UpdateLogRetentionConfigResponse'
          description: A successful response containing the updated LogRetentionConfig.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: Cannot update the LogRetentionConfig because the request is invalid.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: >-
            Cannot update the LogRetentionConfig because the slug does not
            exist.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: >-
            Cannot update the LogRetentionConfig because there is a conflict
            with an existing LogRetentionConfig.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiError'
          description: An unexpected error response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/genericError'
          description: An undefined error response.
components:
  schemas:
    ConfigV1UpdateLogRetentionConfigBody:
      properties:
        create_if_missing:
          description: >-
            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.
          type: boolean
        dry_run:
          description: >-
            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.
          type: boolean
        log_retention_config:
          allOf:
            - $ref: '#/components/schemas/configv1LogRetentionConfig'
          description: The LogRetentionConfig to update.
      type: object
    configv1UpdateLogRetentionConfigResponse:
      properties:
        log_retention_config:
          $ref: '#/components/schemas/configv1LogRetentionConfig'
      type: object
    apiError:
      properties:
        message:
          description: An error message describing what went wrong.
          type: string
      type: object
    genericError:
      additionalProperties: true
      type: object
    configv1LogRetentionConfig:
      description: >-
        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.
      properties:
        created_at:
          description: >-
            Timestamp of when the LogRetentionConfig was created. Cannot be set
            by clients.
          format: date-time
          readOnly: true
          type: string
        filter:
          description: >-
            Log query filter. Only matching logs will have the retention config
            applied.
          type: string
        mode:
          allOf:
            - $ref: '#/components/schemas/configv1LogRetentionConfigMode'
          description: Specifies whether the retention config is enabled or disabled.
        name:
          description: >-
            The name of the LogRetentionConfig. You can modify this value after
            the LogRetentionConfig is created.
          type: string
        retention_days:
          description: >-
            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.
          format: int64
          type: integer
        slug:
          description: >-
            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.
          type: string
        updated_at:
          description: >-
            Timestamp of when the LogRetentionConfig was last updated. Cannot be
            set by clients.
          format: date-time
          readOnly: true
          type: string
      required:
        - filter
        - mode
        - name
        - retention_days
        - slug
      type: object
    configv1LogRetentionConfigMode:
      enum:
        - ENABLED
        - DISABLED
      type: string
  securitySchemes:
    ApiKeyAuth:
      description: Chronosphere API token
      in: header
      name: API-Token
      type: apiKey

````