Datadog Metrics API

The metrics endpoint allows you to: - Post metrics data so it can be graphed on Datadog’s dashboards - Query metrics from any time period (timeseries and scalar) - Modify tag configurations for metrics - View tags and volumes for metrics **Note**: A graph can only contain a set number of points and as the timeframe over which a metric is viewed increases, aggregation between points occurs to stay below that set number. The Post, Patch, and Delete `manage_tags` API methods can only be performed by a user who has the `Manage Tags for Metrics` permission. See the [Metrics page](https://docs.datadoghq.com/metrics/) for more information.

Operations 6

PATCH /api/v2/apm/config/metrics/{metric_id} Datadog Update a Span-based Metric #
PATCH /api/v2/logs/config/metrics/{metric_id} Datadog Update a Log-based Metric #
PATCH /api/v2/rum/config/metrics/{metric_id} Datadog Update a Rum-based Metric #
POST /api/v2/series Datadog Submit Metrics #
POST /api/v2/query/timeseries Datadog Query Timeseries Data #
POST /api/v2/query/scalar Datadog Query Scalar Data #

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-metrics-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-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Datadog Metrics API
  version: '1.0'
  description: 'Operations tagged Metrics across 2 of this provider''s published API definitions: datadog-api-openapi.yml, datadog-metrics-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{subdomain}.{site}
  variables:
    site:
      default: datadoghq.com
      description: The regional site for Datadog customers.
      enum:
      - datadoghq.com
      - us3.datadoghq.com
      - us5.datadoghq.com
      - ap1.datadoghq.com
      - datadoghq.eu
      - ddog-gov.com
    subdomain:
      default: api
      description: The subdomain where the API is deployed.
- url: '{protocol}://{name}'
  variables:
    name:
      default: api.datadoghq.com
      description: Full site DNS name.
    protocol:
      default: https
      description: The protocol for accessing the API.
- url: https://api.datadoghq.com
  description: Datadog API Production Server
tags:
- description: 'The metrics endpoint allows you to:


    - Post metrics data so it can be graphed on Datadog’s dashboards

    - Query metrics from any time period (timeseries and scalar)

    - Modify tag configurations for metrics

    - View tags and volumes for metrics


    **Note**: A graph can only contain a set number of points

    and as the timeframe over which a metric is viewed increases,

    aggregation between points occurs to stay below that set number.


    The Post, Patch, and Delete `manage_tags` API methods can only be performed by

    a user who has the `Manage Tags for Metrics` permission.


    See the [Metrics page](https://docs.datadoghq.com/metrics/) for more information.'
  name: Metrics
paths:
  /api/v2/apm/config/metrics/{metric_id}:
    patch:
      description: 'Update a specific span-based metric from your organization.

        Returns the span-based metric object from the request body when the request is successful.'
      operationId: UpdateSpansMetric
      parameters:
      - $ref: '#/components/parameters/SpansMetricIDParameter'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpansMetricUpdateRequest'
        description: New definition of the span-based metric.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpansMetricResponse'
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/NotAuthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Update a Span-based Metric
      tags:
      - Metrics
      x-codegen-request-body-name: body
      x-menu-order: 4
      x-permission:
        operator: OR
        permissions:
        - apm_generate_metrics
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - apiKeyAuth: []
        appKeyAuth: []
    servers:
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: The regional site for Datadog customers.
          enum:
          - datadoghq.com
          - us3.datadoghq.com
          - us5.datadoghq.com
          - ap1.datadoghq.com
          - datadoghq.eu
          - ddog-gov.com
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
    - url: '{protocol}://{name}'
      variables:
        name:
          default: api.datadoghq.com
          description: Full site DNS name.
        protocol:
          default: https
          description: The protocol for accessing the API.
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: Any Datadog deployment.
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
  /api/v2/logs/config/metrics/{metric_id}:
    patch:
      description: 'Update a specific log-based metric from your organization.

        Returns the log-based metric object from the request body when the request is successful.'
      operationId: UpdateLogsMetric
      parameters:
      - $ref: '#/components/parameters/MetricID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LogsMetricUpdateRequest'
        description: New definition of the log-based metric.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsMetricResponse'
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/NotAuthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Update a Log-based Metric
      tags:
      - Metrics
      x-codegen-request-body-name: body
      x-menu-order: 4
      x-permission:
        operator: OR
        permissions:
        - logs_generate_metrics
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - apiKeyAuth: []
        appKeyAuth: []
    servers:
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: The regional site for Datadog customers.
          enum:
          - datadoghq.com
          - us3.datadoghq.com
          - us5.datadoghq.com
          - ap1.datadoghq.com
          - datadoghq.eu
          - ddog-gov.com
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
    - url: '{protocol}://{name}'
      variables:
        name:
          default: api.datadoghq.com
          description: Full site DNS name.
        protocol:
          default: https
          description: The protocol for accessing the API.
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: Any Datadog deployment.
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
  /api/v2/rum/config/metrics/{metric_id}:
    patch:
      description: 'Update a specific rum-based metric from your organization.

        Returns the rum-based metric object from the request body when the request is successful.'
      operationId: UpdateRumMetric
      parameters:
      - $ref: '#/components/parameters/RumMetricIDParameter'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RumMetricUpdateRequest'
        description: New definition of the rum-based metric.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RumMetricResponse'
          description: OK
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/NotAuthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      summary: Datadog Update a Rum-based Metric
      tags:
      - Metrics
      x-codegen-request-body-name: body
      x-menu-order: 4
      x-undo:
        type: idempotent
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - apiKeyAuth: []
        appKeyAuth: []
    servers:
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: The regional site for Datadog customers.
          enum:
          - datadoghq.com
          - us3.datadoghq.com
          - us5.datadoghq.com
          - ap1.datadoghq.com
          - datadoghq.eu
          - ddog-gov.com
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
    - url: '{protocol}://{name}'
      variables:
        name:
          default: api.datadoghq.com
          description: Full site DNS name.
        protocol:
          default: https
          description: The protocol for accessing the API.
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: Any Datadog deployment.
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
  /api/v2/series:
    post:
      description: 'The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards.

        The maximum payload size is 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed size of less than 5 megabytes (5242880 bytes).


        If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:


        - 64 bits for the timestamp

        - 64 bits for the value

        - 20 bytes for the metric names

        - 50 bytes for the timeseries

        - The full payload is approximately 100 bytes.


        Host name is one of the resources in the Resources field.'
      operationId: SubmitMetrics
      parameters:
      - description: HTTP header used to compress the media-type.
        in: header
        name: Content-Encoding
        required: false
        schema:
          $ref: '#/components/schemas/MetricContentEncoding'
        example: example_value
      requestBody:
        content:
          application/json:
            examples:
              dynamic-points:
                description: Post time-series data that can be graphed on Datadog’s dashboards.
                externalValue: examples/metrics/dynamic-points.json.sh
                summary: Dynamic Points
                x-variables:
                  NOW: $(date +%s)
            schema:
              $ref: '#/components/schemas/MetricPayload'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntakePayloadAccepted'
          description: Payload accepted
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Authentication error
        '408':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Request timeout
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
          description: Payload too large
        '429':
          $ref: '#/components/responses/TooManyRequestsResponse'
      security:
      - apiKeyAuth: []
      summary: Datadog Submit Metrics
      tags:
      - Metrics
      x-codegen-request-body-name: body
      x-menu-order: 1
      x-undo:
        type: safe
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: The regional site for Datadog customers.
          enum:
          - datadoghq.com
          - us3.datadoghq.com
          - us5.datadoghq.com
          - ap1.datadoghq.com
          - datadoghq.eu
          - ddog-gov.com
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
    - url: '{protocol}://{name}'
      variables:
        name:
          default: api.datadoghq.com
          description: Full site DNS name.
        protocol:
          default: https
          description: The protocol for accessing the API.
    - url: https://{subdomain}.{site}
      variables:
        site:
          default: datadoghq.com
          description: Any Datadog deployment.
        subdomain:
          default: api
          description: The subdomain where the API is deployed.
  /api/v2/query/timeseries:
    post:
      operationId: queryMetricsTimeseries
      summary: Datadog Query Timeseries Data
      description: Queries timeseries metric data for the specified time range and metric queries. Supports multiple metric queries in a single request. Returns time series data including timestamps, values, and associated metadata. The query uses Datadog's metrics query language supporting rollup, aggregation, and arithmetic operations.
      tags:
      - Metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricTimeseriesQuery'
      responses:
        '200':
          description: Successful response with timeseries data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricTimeseriesResponse'
        '400':
          description: Bad request - invalid query syntax or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse_2'
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse_2'
        '403':
          description: Forbidden - insufficient permissions for this operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse_2'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - apiKeyAuth: []
    servers:
    - url: https://api.datadoghq.com
      description: Datadog API Production Server
  /api/v2/query/scalar:
    post:
      operationId: queryMetricsScalar
      summary: Datadog Query Scalar Data
      description: Queries scalar metric data for the specified time range and returns a single aggregated value per query formula. Useful for computing summary statistics such as averages, sums, or percentiles over a time window. Supports multiple formulas and metric queries in a single request.
      tags:
      - Metrics
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetricScalarQuery'
      responses:
        '200':
          description: Successful response with scalar query results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricScalarResponse'
        '400':
          description: Bad request - invalid query syntax or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse_2'
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse_2'
        '403':
          description: Forbidden - insufficient permissions for this operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse_2'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - apiKeyAuth: []
    servers:
    - url: https://api.datadoghq.com
      description: Datadog API Production Server
components:
  responses:
    BadRequestResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
      description: Bad Request
    NotAuthorizedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
      description: Not Authorized
    ConflictResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
      description: Conflict
    TooManyRequestsResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
      description: Too many requests
    NotFoundResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIErrorResponse'
      description: Not Found
  schemas:
    LogsMetricUpdateData:
      description: The new log-based metric properties.
      properties:
        attributes:
          $ref: '#/components/schemas/LogsMetricUpdateAttributes'
        type:
          $ref: '#/components/schemas/LogsMetricType'
      required:
      - type
      - attributes
      type: object
    RumMetricGroupBy:
      description: A group by rule.
      properties:
        path:
          description: The path to the value the rum-based metric will be aggregated over.
          example: '@browser.name'
          type: string
        tag_name:
          description: Eventual name of the tag that gets created. By default, `path` is used as the tag name.
          example: browser_name
          type: string
      required:
      - path
      type: object
    LogsMetricResponseGroupBy:
      description: A group by rule.
      properties:
        path:
          description: The path to the value the log-based metric will be aggregated over.
          example: '@http.status_code'
          type: string
        tag_name:
          description: Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.
          example: status_code
          type: string
      type: object
    LogsMetricUpdateRequest:
      description: The new log-based metric body.
      properties:
        data:
          $ref: '#/components/schemas/LogsMetricUpdateData'
      required:
      - data
      type: object
    LogsMetricUpdateCompute:
      description: The compute rule to compute the log-based metric.
      properties:
        include_percentiles:
          $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles'
      type: object
    MetricIntakeType:
      description: The type of metric. The available types are `0` (unspecified), `1` (count), `2` (rate), and `3` (gauge).
      enum:
      - 0
      - 1
      - 2
      - 3
      format: int32
      type: integer
      x-enum-varnames:
      - UNSPECIFIED
      - COUNT
      - RATE
      - GAUGE
    SpansMetricComputeIncludePercentiles:
      description: 'Toggle to include or exclude percentile aggregations for distribution metrics.

        Only present when the `aggregation_type` is `distribution`.'
      example: false
      type: boolean
    SpansMetricUpdateData:
      description: The new span-based metric properties.
      properties:
        attributes:
          $ref: '#/components/schemas/SpansMetricUpdateAttributes'
        type:
          $ref: '#/components/schemas/SpansMetricType'
      required:
      - type
      - attributes
      type: object
    RumMetricResponseAttributes:
      description: The object describing a Datadog rum-based metric.
      properties:
        compute:
          $ref: '#/components/schemas/RumMetricResponseCompute'
        event_type:
          $ref: '#/components/schemas/RumMetricEventType'
        filter:
          $ref: '#/components/schemas/RumMetricResponseFilter'
        group_by:
          description: The rules for the group by.
          items:
            $ref: '#/components/schemas/RumMetricResponseGroupBy'
          type: array
        uniqueness:
          $ref: '#/components/schemas/RumMetricResponseUniqueness'
      type: object
    RumMetricResponse:
      description: The rum-based metric object.
      properties:
        data:
          $ref: '#/components/schemas/RumMetricResponseData'
      type: object
    SpansMetricResponseFilter:
      description: The span-based metric filter. Spans matching this filter will be aggregated in this metric.
      properties:
        query:
          description: The search query - following the span search syntax.
          example: '@http.status_code:200 service:my-service'
          type: string
      type: object
    MetricResource:
      description: Metric resource.
      example:
        name: dummyhost
        type: host
      properties:
        name:
          description: The name of the resource.
          type: string
          example: Example Monitor
        type:
          description: The type of the resource.
          type: string
          example: metric alert
      type: object
    LogsMetricResponseData:
      description: The log-based metric properties.
      properties:
        attributes:
          $ref: '#/components/schemas/LogsMetricResponseAttributes'
        id:
          $ref: '#/components/schemas/LogsMetricID'
        type:
          $ref: '#/components/schemas/LogsMetricType'
      type: object
    SpansMetricType:
      default: spans_metrics
      description: The type of resource. The value should always be spans_metrics.
      enum:
      - spans_metrics
      example: spans_metrics
      type: string
      x-enum-varnames:
      - SPANS_METRICS
    SpansMetricID:
      description: The name of the span-based metric.
      example: my.metric
      type: string
    RumMetricType:
      default: rum_metrics
      description: The type of the resource. The value should always be rum_metrics.
      enum:
      - rum_metrics
      example: rum_metrics
      type: string
      x-enum-varnames:
      - RUM_METRICS
    MetricSeries:
      description: 'A metric to submit to Datadog.

        See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).'
      properties:
        interval:
          description: If the type of the metric is rate or count, define the corresponding interval in seconds.
          example: 20
          format: int64
          type: integer
        metadata:
          $ref: '#/components/schemas/MetricMetadata'
        metric:
          description: The name of the timeseries.
          example: system.load.1
          type: string
        points:
          description: Points relating to a metric. All points must be objects with timestamp and a scalar value (cannot be a string). Timestamps should be in POSIX time in seconds, and cannot be more than ten minutes in the future or more than one hour in the past.
          example:
          - timestamp: 1575317847
            value: 0.5
          items:
            $ref: '#/components/schemas/MetricPoint'
          type: array
        resources:
          description: A list of resources to associate with this metric.
          items:
            $ref: '#/components/schemas/MetricResource'
          type: array
        source_type_name:
          description: The source type name.
          example: datadog
          type: string
        tags:
          description: A list of tags associated with the metric.
          example:
          - environment:test
          items:
            description: Individual tags.
            type: string
          type: array
        type:
          $ref: '#/components/schemas/MetricIntakeType'
        unit:
          description: The unit of point value.
          example: second
          type: string
      required:
      - metric
      - points
      type: object
    RumMetricResponseData:
      description: The rum-based metric properties.
      properties:
        attributes:
          $ref: '#/components/schemas/RumMetricResponseAttributes'
        id:
          $ref: '#/components/schemas/RumMetricID'
        type:
          $ref: '#/components/schemas/RumMetricType'
      type: object
    SpansMetricUpdateAttributes:
      description: The span-based metric properties that will be updated.
      properties:
        compute:
          $ref: '#/components/schemas/SpansMetricUpdateCompute'
        filter:
          $ref: '#/components/schemas/SpansMetricFilter'
        group_by:
          description: The rules for the group by.
          items:
            $ref: '#/components/schemas/SpansMetricGroupBy'
          type: array
      type: object
    RumMetricComputeIncludePercentiles:
      description: 'Toggle to include or exclude percentile aggregations for distribution metrics.

        Only present when `aggregation_type` is `distribution`.'
      example: true
      type: boolean
    LogsMetricID:
      description: The name of the log-based metric.
      example: logs.page.load.count
      type: string
    RumMetricID:
      description: The name of the rum-based metric.
      example: rum.sessions.webui.count
      type: string
    LogsMetricResponseCompute:
      description: The compute rule to compute the log-based metric.
      properties:
        aggregation_type:
          $ref: '#/components/schemas/LogsMetricResponseComputeAggregationType'
        include_percentiles:
          $ref: '#/components/schemas/LogsMetricComputeIncludePercentiles'
        path:
          description: The path to the value the log-based metric will aggregate on (only used if the aggregation type is a "distribution").
          example: '@duration'
          type: string
      type: object
    RumMetricUpdateAttributes:
      description: The rum-based metric properties that will be updated.
      properties:
        compute:
          $ref: '#/components/schemas/RumMetricUpdateCompute'
        filter:
          $ref: '#/components/schemas/RumMetricFilter'
        group_by:
          description: The rules for the group by.
          items:
            $ref: '#/components/schemas/RumMetricGroupBy'
          type: array
      type: object
    APIErrorResponse:
      description: API error response.
      properties:
        errors:
          description: A list of errors.
          example:
          - Bad Request
          items:
            description: A list of items.
            example: Bad Request
            type: string
          type: array
      required:
      - errors
      type: object
    LogsMetricType:
      default: logs_metrics
      description: The type of the resource. The value should always be logs_metrics.
      enum:
      - logs_metrics
      example: logs_metrics
      type: string
      x-enum-varnames:
      - LOGS_METRICS
    LogsMetricFilter:
      description: The log-based metric filter. Logs matching this filter will be aggregated in this metric.
      properties:
        query:
          default: '*'
          description: The search query - following the log search syntax.
          example: service:web* AND @http.status_code:[200 TO 299]
          type: string
      type: object
    MetricPoint:
      description: A point object is of the form `{POSIX_timestamp, numeric_value}`.
      example:
        timestamp: 1575317847
        value: 0.5
      properties:
        timestamp:
          description: 'The timestamp should be in seconds and current.

            Current is defined as not more than 10 minutes in the future or more than 1 hour in the past.'
          format: int64
          type: integer
          example: 42
        value:
          description: The numeric value format should be a 64bit float gauge-type value.
          format: double
          type: number
          example: 95.5
      type: object
    RumMetricUpdateData:
      description: The new rum-based metric properties.
      properties:
        attributes:
          $ref: '#/components/schemas/RumMetricUpdateAttributes'
        id:
          $ref: '#/components/schemas/RumMetricID'
        type:
          $ref: '#/components/schemas/RumMetricType'
      required:
      - type
      - attributes
      type: object
    RumMetricUpdateCompute:
      description: The compute rule to compute the rum-based metric.
      properties:
        include_percentiles:
          $ref: '#/components/schemas/RumMetricComputeIncludePercentiles'
      type: object
    RumMetricFilter:
      description: The rum-based metric filter. Events matching this filter will be aggregated in this metric.
      properties:
        query:
          default: '*'
          description: The search query - following the RUM search syntax.
          example: '@service:web-ui: '
          type: string
      required:
      - query
      type: object
    SpansMetricResponseGroupBy:
      description: A group by rule.
      properties:
        path:
          description: The path to the value the span-based metric will be aggregated over.
          example: resource_name
          type: string
        tag_name:
          description: Eventual name of the tag that gets created. By default, the path attribute is used as the tag name.
          example: resource_name
          type: string
      type: object
    SpansMetricComputeAggregationType:
      description: The type of aggregation to use.
      enum:
      - count
      - distribution
      example: distribution
      type: string
      x-enum-varnames:
      - COUNT
      - DISTRIBUTION
    MetricPayload:
      description: The metrics' payload.
      properties:
        series:
          description: A list of timeseries to submit to Datadog.
          example:
          - metric: system.load.1
            points:
            - timestamp: 1475317847
              value: 0.7
            resources:
            - name: dummyhost
              type: host
          items:
            $ref: '#/components/schemas/MetricSeries'
          type: array
      required:
      - series
      type: object
    RumMetricResponseUniqueness:
      description: The rule to count updatable events. Is only set if `event_type` is `session` or `view`.
      properties:
        when:
          $ref: '#/components/schemas/RumMetricUniquenessWhen'
      type: object
    LogsMetricComputeIncludePercentiles:
      description: 'Toggle to include or exclude percentile aggregations for distribution metrics.

        Only present when the `aggregation_type` is `distribution`.'
      example: true
      type: boolean
    RumMetricResponseGroupBy:
      description: A group by rule.
      properties:
        path:
          description: The path to the value the rum-based metric will be aggregated over.
          example: '@http.status_code'
          type: string
        tag_name:
          description: Eventual name of the tag that gets created. By default, `path` is used as the tag name.
          example: status_code
          type: string
      type: object
    LogsMetricUpdateAttributes:
      description: The log-based metric properties that will be updated.
      properties:
        compute:
          $ref: '#/components/schemas/LogsMetricUpdateCompute'
        filter:
          $ref: '#/components/schemas/LogsMetricFilter'
        group_by:
          description: The rules for the group by.
          items:
            $ref: '#/components/schemas/LogsMetricGroupBy'
          type: array
      type: object
    MetricOrigin:
      description: Metric origin information.
      properties:
        metric_type:
          default: 0
          description: The origin metric type code
          format: int32
          maximum: 1000
          type: integer
          example: 42
        product:
          default: 0
          description: The origin product code
          format: int32
          maximum: 1000
          type: integer
          example: 42
        service:
          default: 0
          description: The origin service code
          format: 

# --- truncated at 32 KB (58 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/datadog/refs/heads/main/openapi/datadog-metrics-api-openapi.yml