How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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 pointsand 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 bya user who has the `Manage Tags for Metrics` permission.See the [Metrics page](https://docs.datadoghq.com/metrics/) for more information.

Datadog Metrics API is one of 186 APIs that Datadog publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 4 JSON Schema definitions.

Tagged areas include Metrics. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, authentication docs, an API reference, and 4 JSON Schemas.

This API exposes 6 operations across 6 paths, and defines 75 schemas. It is described by OpenAPI 3.2.0, at version 1.0.

Requests are made against 3 base URLs: https://{subdomain}.{site}, {protocol}://{name}, https://api.datadoghq.com.

6 operations 6 paths 75 schemas 3 PATCH3 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.0
Base URL
https://api.datadoghq.com
Authentication
OAuth 2.0, API Key, API Key, HTTP Bearer
Resource Areas
1

Authentication & Security 4

Datadog Metrics API declares 4 security schemes for authenticating requests. It supports OAuth 2.0 (AuthZ) using the authorizationCode flow, exposing 68 scopes. An API key is passed in the header as DD-API-KEY (apiKeyAuth). An API key is passed in the header as DD-APPLICATION-KEY (appKeyAuth). It accepts HTTP bearer tokens (bearerAuth).

  • AuthZ — This API uses OAuth 2 with the implicit grant flow.
  • apiKeyAuth — Your Datadog API Key.
  • appKeyAuth — Your Datadog APP Key.

Paths & Operations 6

Across 6 paths, the API surfaces 6 operations — 3 PATCH, 3 POST. Each is listed below with its method, path, parameters, and response codes.

Metrics 6

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 conf…

PATCH
/api/v2/apm/config/metrics/{metric_id}
Datadog Update a Span-based Metric
UpdateSpansMetric 1 param body → 200400403404429
PATCH
/api/v2/logs/config/metrics/{metric_id}
Datadog Update a Log-based Metric
UpdateLogsMetric 1 param body → 200400403404429
PATCH
/api/v2/rum/config/metrics/{metric_id}
Datadog Update a Rum-based Metric
UpdateRumMetric 1 param body → 200400403404409429
POST
/api/v2/series
Datadog Submit Metrics
SubmitMetrics 1 param body → 202400403408413429
POST
/api/v2/query/timeseries
Datadog Query Timeseries Data
queryMetricsTimeseries body → 200400401403
POST
/api/v2/query/scalar
Datadog Query Scalar Data
queryMetricsScalar body → 200400401403

Schemas 75

The contract defines 75 schemas that model the data the API accepts and returns. The most detailed are MetricSeries (9 properties), MetricSeries_2 (8 properties), RumMetricResponseAttributes (5 properties), TimeseriesResult (4 properties). Each schema is shown below with its type and property counts.

RumMetricUpdateData
object
The new rum-based metric properties.
3 properties 2 required
LogsMetricComputeIncludePercentiles
boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregationtype is distribution.
MetricPoint
object
A point object is of the form {POSIXtimestamp, numericvalue}.
2 properties
APIErrorResponse
object
API error response.
1 property 1 required
RumMetricGroupBy
object
A group by rule.
2 properties 1 required
MetricSeries
object
A metric to submit to Datadog. See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/custom-metrics-properties).
9 properties 2 required
SpansMetricType
string
The type of resource. The value should always be spansmetrics.
SpansMetricComputeAggregationType
string
The type of aggregation to use.
SpansMetricUpdateData
object
The new span-based metric properties.
2 properties 2 required
SpansMetricUpdateCompute
object
The compute rule to compute the span-based metric.
1 property
RumMetricResponseUniqueness
object
The rule to count updatable events. Is only set if eventtype is session or view.
1 property
LogsMetricResponse
object
The log-based metric object.
1 property
RumMetricUniquenessWhen
string
When to count updatable events. match when the event is first seen, or end when the event is complete.
LogsMetricUpdateData
object
The new log-based metric properties.
2 properties 2 required
RumMetricUpdateCompute
object
The compute rule to compute the rum-based metric.
1 property
RumMetricResponseData
object
The rum-based metric properties.
3 properties
LogsMetricUpdateAttributes
object
The log-based metric properties that will be updated.
3 properties
RumMetricUpdateAttributes
object
The rum-based metric properties that will be updated.
3 properties
MetricIntakeType
integer
The type of metric. The available types are 0 (unspecified), 1 (count), 2 (rate), and 3 (gauge).
MetricResource
object
Metric resource.
2 properties
LogsMetricUpdateCompute
object
The compute rule to compute the log-based metric.
1 property
LogsMetricType
string
The type of the resource. The value should always be logsmetrics.
LogsMetricResponseComputeAggregationType
string
The type of aggregation to use.
SpansMetricResponseGroupBy
object
A group by rule.
2 properties
LogsMetricResponseGroupBy
object
A group by rule.
2 properties
MetricOrigin
object
Metric origin information.
3 properties
LogsMetricResponseCompute
object
The compute rule to compute the log-based metric.
3 properties
LogsMetricResponseData
object
The log-based metric properties.
3 properties
RumMetricResponseGroupBy
object
A group by rule.
2 properties
LogsMetricID
string
The name of the log-based metric.
RumMetricComputeAggregationType
string
The type of aggregation to use.
IntakePayloadAccepted
object
The payload accepted for intake.
1 property
RumMetricID
string
The name of the rum-based metric.
SpansMetricResponseCompute
object
The compute rule to compute the span-based metric.
3 properties
SpansMetricUpdateAttributes
object
The span-based metric properties that will be updated.
3 properties
SpansMetricResponseData
object
The span-based metric properties.
3 properties
RumMetricEventType
string
The type of RUM events to filter on.
MetricPayload
object
The metrics' payload.
1 property 1 required
LogsMetricResponseAttributes
object
The object describing a Datadog log-based metric.
3 properties
SpansMetricID
string
The name of the span-based metric.
SpansMetricComputeIncludePercentiles
boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregationtype is distribution.
SpansMetricResponse
object
The span-based metric object.
1 property
RumMetricResponse
object
The rum-based metric object.
1 property
LogsMetricUpdateRequest
object
The new log-based metric body.
1 property 1 required
LogsMetricGroupBy
object
A group by rule.
2 properties 1 required
RumMetricType
string
The type of the resource. The value should always be rummetrics.
LogsMetricResponseFilter
object
The log-based metric filter. Logs matching this filter will be aggregated in this metric.
1 property
SpansMetricResponseFilter
object
The span-based metric filter. Spans matching this filter will be aggregated in this metric.
1 property
SpansMetricGroupBy
object
A group by rule.
2 properties 1 required
LogsMetricFilter
object
The log-based metric filter. Logs matching this filter will be aggregated in this metric.
1 property
MetricMetadata
object
Metadata for the metric.
1 property
RumMetricUpdateRequest
object
The new rum-based metric body.
1 property 1 required
RumMetricFilter
object
The rum-based metric filter. Events matching this filter will be aggregated in this metric.
1 property 1 required
SpansMetricUpdateRequest
object
The new span-based metric body.
1 property 1 required
RumMetricResponseCompute
object
The compute rule to compute the rum-based metric.
3 properties
RumMetricResponseAttributes
object
The object describing a Datadog rum-based metric.
5 properties
MetricContentEncoding
string
HTTP header used to compress the media-type.
RumMetricResponseFilter
object
The rum-based metric filter. RUM events matching this filter will be aggregated in this metric.
1 property
SpansMetricFilter
object
The span-based metric filter. Spans matching this filter will be aggregated in this metric.
1 property
SpansMetricResponseAttributes
object
The object describing a Datadog span-based metric.
3 properties
RumMetricComputeIncludePercentiles
boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when aggregationtype is distribution.
MetricPoint_2
object
A single data point consisting of a Unix timestamp and a numeric value
2 properties 2 required
ScalarColumn
object
A single column of scalar results from a query formula
3 properties
IntakePayloadAccepted_2
object
Response indicating the metric payload was accepted for processing
1 property
APIErrorResponse_2
object
Standard API error response returned for failed requests
1 property 1 required
MetricSeries_2
object
A single metric series containing data points and associated metadata
8 properties 2 required
MetricTimeseriesQuery
object
Request body for querying timeseries metric data
1 property 1 required
TimeseriesResult
object
A single timeseries result for a query formula
4 properties
MetricPayload_2
object
The payload containing one or more metric series to submit
1 property 1 required
MetricResource_2
object
A resource (such as a host or service) associated with a metric series
2 properties 2 required
MetricQueryDefinition
object
A metric query definition referencing a Datadog metrics query expression
3 properties 3 required
QueryFormula
object
A formula expression that combines one or more query results
3 properties 1 required
MetricScalarResponse
object
Response containing scalar metric values for the requested queries
1 property
MetricScalarQuery
object
Request body for querying scalar metric data
1 property 1 required
MetricTimeseriesResponse
object
Response containing timeseries metric data for the requested queries
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

datadog-metrics-api-openapi.yml Raw ↑

Other APIs Datadog publishes across the network.

Datadog Dashboards API
Datadog Synthetics API
Datadog Service Level Objectives API
Datadog Security Monitoring API
Datadog Service Definition API
Datadog Software Catalog API
Datadog Users API
Datadog Roles API
Datadog Key Management API
Datadog Organizations API
Datadog Downtimes API
Datadog RUM API
Where this information came from

This is an independent, third-party profile of Datadog Metrics API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.