---
title: "Update an index"
method: PUT
path: "/api/v1/logs/config/indexes/{name}"
tags: ["Logs Indexes"]
---

# Update an index

`PUT /api/v1/logs/config/indexes/{name}`

Update an index as identified by its name.
Returns the Index object passed in the request body when the request is successful.

Using the `PUT` method updates your index's configuration by **replacing**
your current configuration with the new one sent to your Datadog organization.

## Path parameters

- `name` string, required

## Request body

- LogsIndexUpdateRequest — Object for updating a Datadog Log index.
  - `daily_limit` integer — The number of log events you can send in this index per day before you are rate-limited.
  - `daily_limit_reset` LogsDailyLimitReset — Object containing options to override the default daily limit reset time.
    - `reset_time` string — String in `HH:00` format representing the time of day the daily limit should be reset. The hours must be between 00 and 23 (inclusive).
    - `reset_utc_offset` string — String in `(-|+)HH:00` format representing the UTC offset to apply to the given reset time. The hours must be between -12 and +14 (inclusive).
  - `daily_limit_warning_threshold_percentage` number, double — A percentage threshold of the daily quota at which a Datadog warning event is generated.
  - `disable_daily_limit` boolean — If true, sets the `daily_limit` value to null and the index is not limited on a daily basis (any specified `daily_limit` value in the request is ignored). If false or omitted, the index's current `daily_limit` is maintained.
  - `exclusion_filters` LogsExclusion[] — An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.
    - `filter` LogsExclusionFilter — Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle.
      - `query` string — Default query is `*`, meaning all logs flowing in the index would be excluded. Scope down exclusion filter to only a subset of logs with a log query.
      - `sample_attribute` string — Sample attribute to use for the sampling of logs going through this exclusion filter. When set, only the logs with the specified attribute are sampled.
      - `sample_rate` number, double, required — Sample rate to apply to logs going through this exclusion filter, a value of 1.0 excludes all logs matching the query.
    - `is_enabled` boolean — Whether or not the exclusion filter is active.
    - `name` string, required — Name of the index exclusion filter.
  - `filter` LogsFilter, required — Filter for logs.
    - `query` string — The filter query.
  - `num_flex_logs_retention_days` integer — The total number of days logs are stored in Standard and Flex Tier before being deleted from the index. If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through `num_retention_days`, and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached. The available values depend on retention plans specified in your organization's contract/subscriptions. **Note**: Changing this value affects all logs already in this index. It may also affect billing.
  - `num_retention_days` integer — The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index. The available values depend on retention plans specified in your organization's contract/subscriptions. **Note**: Changing this value affects all logs already in this index. It may also affect billing.
  - `tags` string[] — A list of tags associated with the index. Tags must be in `key:value` format.

## Response `200`

OK

- LogsIndex — Object describing a Datadog Log index.
  - `daily_limit` integer — The number of log events you can send in this index per day before you are rate-limited.
  - `daily_limit_reset` LogsDailyLimitReset — Object containing options to override the default daily limit reset time.
    - `reset_time` string — String in `HH:00` format representing the time of day the daily limit should be reset. The hours must be between 00 and 23 (inclusive).
    - `reset_utc_offset` string — String in `(-|+)HH:00` format representing the UTC offset to apply to the given reset time. The hours must be between -12 and +14 (inclusive).
  - `daily_limit_warning_threshold_percentage` number, double — A percentage threshold of the daily quota at which a Datadog warning event is generated.
  - `exclusion_filters` LogsExclusion[] — An array of exclusion objects. The logs are tested against the query of each filter, following the order of the array. Only the first matching active exclusion matters, others (if any) are ignored.
    - `filter` LogsExclusionFilter — Exclusion filter is defined by a query, a sampling rule, and a active/inactive toggle.
      - `query` string — Default query is `*`, meaning all logs flowing in the index would be excluded. Scope down exclusion filter to only a subset of logs with a log query.
      - `sample_attribute` string — Sample attribute to use for the sampling of logs going through this exclusion filter. When set, only the logs with the specified attribute are sampled.
      - `sample_rate` number, double, required — Sample rate to apply to logs going through this exclusion filter, a value of 1.0 excludes all logs matching the query.
    - `is_enabled` boolean — Whether or not the exclusion filter is active.
    - `name` string, required — Name of the index exclusion filter.
  - `filter` LogsFilter, required — Filter for logs.
    - `query` string — The filter query.
  - `is_rate_limited` boolean — A boolean stating if the index is rate limited, meaning more logs than the daily limit have been sent. Rate limit is reset every-day at 2pm UTC.
  - `name` string, required — The name of the index.
  - `num_flex_logs_retention_days` integer — The total number of days logs are stored in Standard and Flex Tier before being deleted from the index. If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through `num_retention_days`, and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached. The available values depend on retention plans specified in your organization's contract/subscriptions.
  - `num_retention_days` integer — The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index. The available values depend on retention plans specified in your organization's contract/subscriptions.
  - `tags` string[] — A list of tags associated with the index. Tags must be in `key:value` format.

## Other responses

- `400` — Invalid Parameter Error
- `403` — Forbidden
- `429` — Too Many Requests

---

[API](https://skmtc.net/datadog/apis/api-v1.md) · [All operations](https://skmtc.net/datadog/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v1/versions/ca5871004d26/schema)
