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 APM Spans Metrics API

Create, read, update and delete span-based metric definitions — a compute over a span attribute, a filter query and group-by tags. Five operations.

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

Tagged areas include Spans Metrics. The published artifact set on APIs.io includes an OpenAPI specification and API documentation.

This API exposes 5 operations across 2 paths, and defines 22 schemas. It is described by OpenAPI 3.0.0, at version 1.0.

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

5 operations 2 paths 22 schemas 1 DELETE2 GET1 PATCH1 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.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 APM Spans Metrics API declares 4 security schemes for authenticating requests. It supports OAuth 2.0 (AuthZ) using the authorizationCode flow, exposing 96 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). By default, every request must be authenticated.

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

Paths & Operations 5

Across 2 paths, the API surfaces 5 operations — 1 DELETE, 2 GET, 1 PATCH, 1 POST. Each is listed below with its method, path, parameters, and response codes.

Spans Metrics 5

Manage configuration of [span-based metrics](https://app.datadoghq.com/apm/traces/generate-metrics) for your organization. See [Generate Metrics from Spans](https://docs.datadoghq…

GET
/api/v2/apm/config/metrics
Get all span-based metrics
ListSpansMetrics → 200403429
POST
/api/v2/apm/config/metrics
Create a span-based metric
CreateSpansMetric body → 200400403409429
DELETE
/api/v2/apm/config/metrics/{metric_id}
Delete a span-based metric
DeleteSpansMetric 1 param → 204403404429
GET
/api/v2/apm/config/metrics/{metric_id}
Get a span-based metric
GetSpansMetric 1 param → 200403404429
PATCH
/api/v2/apm/config/metrics/{metric_id}
Update a span-based metric
UpdateSpansMetric 1 param body → 200400403404429

Schemas 22

The contract defines 22 schemas that model the data the API accepts and returns. The most detailed are SpansMetricUpdateAttributes (3 properties), SpansMetricCreateAttributes (3 properties), SpansMetricCreateData (3 properties), SpansMetricResponseData (3 properties). Each schema is shown below with its type and property counts.

SpansMetricsResponse
object
All the available span-based metric objects.
1 property
SpansMetricCreateRequest
object
The new span-based metric body.
1 property 1 required
APIErrorResponse
object
API error response.
1 property 1 required
SpansMetricUpdateRequest
object
The new span-based metric body.
1 property 1 required
SpansMetricCreateData
object
The new span-based metric properties.
3 properties 3 required
SpansMetricResponse
object
The span-based metric object.
1 property
SpansMetricResponseData
object
The span-based metric properties.
3 properties
SpansMetricResponseAttributes
object
The object describing a Datadog span-based metric.
3 properties
SpansMetricResponseFilter
object
The span-based metric filter. Spans matching this filter will be aggregated in this metric.
1 property
SpansMetricID
string
The name of the span-based metric.
SpansMetricUpdateData
object
The new span-based metric properties.
2 properties 2 required
SpansMetricResponseGroupBy
object
A group by rule.
2 properties
SpansMetricType
string
The type of resource. The value should always be spansmetrics.
SpansMetricCreateAttributes
object
The object describing the Datadog span-based metric to create.
3 properties 1 required
SpansMetricUpdateAttributes
object
The span-based metric properties that will be updated.
3 properties
SpansMetricUpdateCompute
object
The compute rule to compute the span-based metric.
1 property
SpansMetricResponseCompute
object
The compute rule to compute the span-based metric.
3 properties
SpansMetricFilter
object
The span-based metric filter. Spans matching this filter will be aggregated in this metric.
1 property
SpansMetricComputeIncludePercentiles
boolean
Toggle to include or exclude percentile aggregations for distribution metrics. Only present when the aggregationtype is distribution.
SpansMetricGroupBy
object
A group by rule.
2 properties 1 required
SpansMetricCompute
object
The compute rule to compute the span-based metric.
3 properties 1 required
SpansMetricComputeAggregationType
string
The type of aggregation to use.

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

datadog-apm-spans-metrics-api-openapi.yml Raw ↑

Other APIs Datadog APM publishes across the network.

Datadog APM Spans API
Datadog APM Retention Filters API
Datadog APM Services API
Datadog APM Service Definitions API
Datadog APM Service Level Objectives API
Datadog APM SLO Corrections API
Datadog MCP Server
Where this information came from

This is an independent, third-party profile of Datadog APM Spans 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.