v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Logs Indexes

Update an index

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.

put/api/v1/logs/config/indexes/{name}

Path parameters

namestring required

Name of the log index.

Request body

daily_limitinteger

The number of log events you can send in this index per day before you are rate-limited.

daily_limit_warning_threshold_percentagenumber double

A percentage threshold of the daily quota at which a Datadog warning event is generated.

disable_daily_limitboolean

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.

num_flex_logs_retention_daysinteger

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_daysinteger

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.

tagsstring[]

A list of tags associated with the index. Tags must be in key:value format.

Example request

{
  "daily_limit": 300000000,
  "daily_limit_reset": {
    "reset_time": "14:00",
    "reset_utc_offset": "+02:00"
  },
  "daily_limit_warning_threshold_percentage": 70,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_attribute": "@ci.job_id",
        "sample_rate": 1
      },
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "num_flex_logs_retention_days": 360,
  "num_retention_days": 15,
  "tags": [
    "team:backend",
    "env:production"
  ]
}

Response

OK

daily_limitinteger

The number of log events you can send in this index per day before you are rate-limited.

daily_limit_warning_threshold_percentagenumber double

A percentage threshold of the daily quota at which a Datadog warning event is generated.

is_rate_limitedboolean

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.

namestring required

The name of the index.

num_flex_logs_retention_daysinteger

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_daysinteger

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.

tagsstring[]

A list of tags associated with the index. Tags must be in key:value format.

Example response

{
  "daily_limit": 300000000,
  "daily_limit_reset": {
    "reset_time": "14:00",
    "reset_utc_offset": "+02:00"
  },
  "daily_limit_warning_threshold_percentage": 70,
  "exclusion_filters": [
    {
      "filter": {
        "query": "*",
        "sample_attribute": "@ci.job_id",
        "sample_rate": 1
      },
      "name": "payment"
    }
  ],
  "filter": {
    "query": "source:python"
  },
  "name": "main",
  "num_flex_logs_retention_days": 360,
  "num_retention_days": 15,
  "tags": [
    "team:backend",
    "env:production"
  ]
}