v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Logs Indexes

Create an index

Creates a new index. Returns the Index object passed in the request body when the request is successful.

post/api/v1/logs/config/indexes

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.

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 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"
  },
  "name": "main",
  "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"
  ]
}