---
title: "Update stream settings"
method: PUT
path: "/api/{org_id}/streams/{stream_name}/settings"
tags: ["Streams"]
---

# Update stream settings

`PUT /api/{org_id}/streams/{stream_name}/settings`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/streams/{stream_name}/settings`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/streams/:stream_name/settings/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates configuration settings for an existing stream, including retention policies, partitioning, and other stream-specific options

## Path parameters

- `org_id` string, required
- `stream_name` string, required

## Query parameters

- `type` string

## Request body

- object
  - `approx_partition` boolean, nullable
  - `bloom_filter_fields` UpdateSettingsWrapperString
    - `add` string[]
    - `remove` string[]
  - `cross_links` UpdateSettingsWrapperCrossLink
    - `add` object[]
      - `fields` CrossLinkField[]: Show link only when at least one field matches the record. If empty, the link is always shown.
        - `alias` string, nullable: Populated by result_schema: the alias used in the query for this field.
        - `name` string, required
      - `name` string, required: Display name for the link
      - `url` string, required: URL template with {field_name} placeholders
    - `remove` object[]
      - `fields` CrossLinkField[]: Show link only when at least one field matches the record. If empty, the link is always shown.
        - `alias` string, nullable: Populated by result_schema: the alias used in the query for this field.
        - `name` string, required
      - `name` string, required: Display name for the link
      - `url` string, required: URL template with {field_name} placeholders
  - `data_retention` integer, nullable
  - `defined_schema_fields` UpdateSettingsWrapperString
    - `add` string[]
    - `remove` string[]
  - `distinct_value_fields` UpdateSettingsWrapperString
    - `add` string[]
    - `remove` string[]
  - `dynamic_partition` boolean, nullable: Whether the classifier decides the level; a value equal to the env's follows the env.
  - `enable_distinct_fields` boolean, nullable
  - `enable_log_patterns_extraction` boolean, nullable
  - `extended_retention_days` UpdateSettingsWrapperTimeRange
    - `add` object[]
      - `end` integer, required: End timestamp in microseconds
      - `start` integer, required: Start timestamp in microseconds
    - `remove` object[]
      - `end` integer, required: End timestamp in microseconds
      - `start` integer, required: Start timestamp in microseconds
  - `flatten_level` integer, nullable
  - `full_text_search_keys` UpdateSettingsWrapperString
    - `add` string[]
    - `remove` string[]
  - `index_all_values` boolean, nullable
  - `index_fields` UpdateSettingsWrapperString
    - `add` string[]
    - `remove` string[]
  - `index_original_data` boolean, nullable
  - `is_llm_stream` boolean, nullable
  - `max_query_range` integer, nullable
  - `partition_keys` UpdateSettingsWrapperStreamPartition
    - `add` object[]
      - `disabled` boolean
      - `field` string, required
      - `types` union
        - 'value'
        - object
          - `hash` integer, required
        - 'prefix'
    - `remove` object[]
      - `disabled` boolean
      - `field` string, required
      - `types` union
        - 'value'
        - object
          - `hash` integer, required
        - 'prefix'
  - `partition_time_level` 'unset' | 'hourly' | 'daily'
  - `pattern_associations` UpdateSettingsWrapperPatternAssociation
    - `add` object[]
      - `apply_at` string, required
      - `description` string, required
      - `field` string, required
      - `pattern` string, required
      - `pattern_id` string, required
      - `pattern_name` string, required
      - `policy` string, required
    - `remove` object[]
      - `apply_at` string, required
      - `description` string, required
      - `field` string, required
      - `pattern` string, required
      - `pattern_id` string, required
      - `pattern_name` string, required
      - `policy` string, required
  - `storage_type` 'normal' | 'compliance'
  - `store_original_data` boolean, nullable

## Response `200`

Success

- HttpResponse: HTTP response code 200 is success code 400 is error code 404 is not found code 500 is internal server error code 503 is service unavailable code >= 1000 is custom error code message is the message or error message
  - `code` integer, required
  - `error_detail` string, nullable
  - `hint` string, nullable: One-line guidance on how to fix the error (agent self-correction, D4).
  - `id` string, nullable
  - `message` string, required
  - `name` string, nullable
  - `suggestions` string[], nullable: Closest valid alternatives for a mistyped field/function name.
  - `trace_id` string, nullable
  - `warnings` string[], nullable: Problems with a request that succeeded anyway. Distinct from `hint`, which explains a failure: these accompany a 200, and the caller is entitled to have meant it.

## Other responses

- `400`: Failure
- `404`: NotFound
- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
