Datadog Log Indexes API

Manage log indexes and retention policies

Operations 2

GET /api/v1/logs/config/indexes Datadog List Log Indexes #
GET /api/v1/logs/config/indexes/{name} Datadog Get a Log Index #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/datadog-log-indexes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

datadog-log-indexes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Datadog Logs Log Indexes API
  description: The Datadog Logs API allows you to search and send log events to the Datadog platform over HTTP. It supports querying and aggregating log data from the Log Management product. Logs can be searched using Datadog's log query language, and results can be aggregated using facets and measures. The API also supports managing log indexes, which control how long logs are retained and queried.
  version: v2
  contact:
    name: Datadog Support
    url: https://www.datadoghq.com/support/
  termsOfService: https://www.datadoghq.com/legal/terms/
servers:
- url: https://api.datadoghq.com
  description: Datadog API Production Server
security:
- apiKeyAuth: []
tags:
- name: Log Indexes
  description: Manage log indexes and retention policies
paths:
  /api/v1/logs/config/indexes:
    get:
      operationId: listLogIndexes
      summary: Datadog List Log Indexes
      description: Returns the list of configured log indexes for your Datadog organization. Each index defines a filter for which logs to include, a daily retention policy, and log volume limits. Indexes are evaluated in order, and each log can match at most one index. Index configurations affect log retention, querying capabilities, and cost.
      tags:
      - Log Indexes
      responses:
        '200':
          description: Successful response with list of log indexes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsIndexesResponse'
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '403':
          description: Forbidden - insufficient permissions for this operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v1/logs/config/indexes/{name}:
    get:
      operationId: getLogIndex
      summary: Datadog Get a Log Index
      description: Returns the configuration details for a specific log index identified by its name. Includes the filter query, exclusion filters, daily retention settings, and current usage statistics.
      tags:
      - Log Indexes
      parameters:
      - $ref: '#/components/parameters/indexNameParam'
      responses:
        '200':
          description: Successful response with log index configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsIndex'
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '403':
          description: Forbidden - insufficient permissions for this operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '404':
          description: Not found - log index with the specified name does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    LogsIndexesResponse:
      type: object
      description: Response containing the list of configured log indexes
      properties:
        indexes:
          type: array
          description: List of log index configurations for the organization
          items:
            $ref: '#/components/schemas/LogsIndex'
    LogsExclusion:
      type: object
      description: An exclusion filter that drops matching logs from an index
      required:
      - name
      - filter
      properties:
        name:
          type: string
          description: The name of the exclusion filter for identification
          example: Example Monitor
        is_enabled:
          type: boolean
          description: Whether this exclusion filter is currently active
          example: true
        filter:
          type: object
          description: The exclusion filter configuration
          properties:
            query:
              type: string
              description: Log search query for logs to exclude from the index
            sample_rate:
              type: number
              format: double
              minimum: 0
              maximum: 1
              description: The percentage (0 to 1) of logs matching the filter to exclude
    LogsFilter:
      type: object
      description: A filter query that determines which logs are matched by an index or exclusion
      required:
      - query
      properties:
        query:
          type: string
          description: A Datadog log search query that selects which logs match this filter
          example: avg:system.cpu.user{*}
    APIErrorResponse:
      type: object
      description: Standard API error response returned for failed requests
      required:
      - errors
      properties:
        errors:
          type: array
          description: List of error messages describing the failure
          items:
            type: string
    LogsIndex:
      type: object
      description: Configuration for a single Datadog log index
      required:
      - name
      - filter
      properties:
        name:
          type: string
          description: The name of the log index
          example: Example Monitor
        filter:
          $ref: '#/components/schemas/LogsFilter'
        exclusion_filters:
          type: array
          description: List of exclusion filters that drop matching logs before indexing
          items:
            $ref: '#/components/schemas/LogsExclusion'
        num_retention_days:
          type: integer
          description: The number of days to retain logs in this index
          example: 42
        daily_limit:
          type: integer
          format: int64
          description: The maximum number of logs per day before the index is disabled
          example: 42
        is_rate_limited:
          type: boolean
          description: Whether the index has exceeded its daily limit and is currently rate limited
          example: true
  parameters:
    indexNameParam:
      name: name
      in: path
      required: true
      description: The name of the log index to retrieve
      schema:
        type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: DD-API-KEY
      description: Datadog API key for authenticating requests. Obtain from the Datadog organization settings under API Keys.
externalDocs:
  description: Datadog Logs API Documentation
  url: https://docs.datadoghq.com/api/latest/logs/