Skip to content

Commit 9bdb301

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Get Tag Cardinalities Endpoint Spec (#30071)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 718d86c commit 9bdb301

File tree

7 files changed

+884
-4
lines changed

7 files changed

+884
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-07-18 10:24:13.009681",
8-
"spec_repo_commit": "20279f48"
7+
"regenerated": "2025-07-18 13:58:40.387174",
8+
"spec_repo_commit": "dc49df4e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-18 10:24:22.403946",
13-
"spec_repo_commit": "20279f48"
12+
"regenerated": "2025-07-18 13:58:49.708003",
13+
"spec_repo_commit": "dc49df4e"
1414
}
1515
}
1616
}

config/_default/menus/api.en.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,18 @@ menu:
15951595
- DeleteTagConfiguration
15961596
unstable: []
15971597
order: 4
1598+
- name: Get tag key cardinality details
1599+
url: '#get-tag-key-cardinality-details'
1600+
identifier: metrics-get-tag-key-cardinality-details
1601+
parent: metrics
1602+
generated: true
1603+
params:
1604+
versions:
1605+
- v2
1606+
operationids:
1607+
- GetMetricTagCardinalityDetails
1608+
unstable: []
1609+
order: 13
15981610
- name: Tag Configuration Cardinality Estimator
15991611
url: '#tag-configuration-cardinality-estimator'
16001612
identifier: metrics-tag-configuration-cardinality-estimator

content/en/api/v2/metrics/examples.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,64 @@
493493
"html": ""
494494
}
495495
},
496+
"GetMetricTagCardinalityDetails": {
497+
"responses": {
498+
"200": {
499+
"json": {
500+
"data": [
501+
{
502+
"attributes": {
503+
"cardinality_delta": "integer"
504+
},
505+
"id": "string",
506+
"type": "string"
507+
}
508+
],
509+
"meta": {
510+
"metric_name": "string"
511+
}
512+
},
513+
"html": "<div class=\"\"><div class=\"row hasChildData \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row js-collapse-trigger collapse-trigger \">\n <div class=\"col-4 column\">\n <p class=\"key\"><span class=\"toggle-arrow\"><svg width=\"6\" height=\"9\" viewBox=\"0 0 6 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.7294 4.45711L0.733399 7.82311L1.1294 8.29111L5.6654 4.45711L1.1294 0.641113L0.751398 1.12711L4.7294 4.45711Z\" fill=\"black\"/></svg></span> data</p>\n </div>\n <div class=\"col-2 column\"><p>[object]</p></div>\n <div class=\"col-6 column\"><p>A list of tag cardinalities associated with the given metric.</p></div>\n </div>\n <div class=\"row isNested d-none hasChildData \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row js-collapse-trigger collapse-trigger \">\n <div class=\"col-4 column\">\n <p class=\"key\"><span class=\"toggle-arrow\"><svg width=\"6\" height=\"9\" viewBox=\"0 0 6 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.7294 4.45711L0.733399 7.82311L1.1294 8.29111L5.6654 4.45711L1.1294 0.641113L0.751398 1.12711L4.7294 4.45711Z\" fill=\"black\"/></svg></span> attributes</p>\n </div>\n <div class=\"col-2 column\"><p>object</p></div>\n <div class=\"col-6 column\"><p>An object containing properties related to the tag key</p></div>\n </div>\n <div class=\"row isNested d-none \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">cardinality_delta</p>\n </div>\n <div class=\"col-2 column\"><p>int64</p></div>\n <div class=\"col-6 column\"><p>This describes the recent change in the tag keys cardinality</p></div>\n </div>\n \n </div>\n </div>\n </div>\n </div><div class=\"row isNested d-none \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">id</p>\n </div>\n <div class=\"col-2 column\"><p>string</p></div>\n <div class=\"col-6 column\"><p>The name of the tag key.</p></div>\n </div>\n \n </div>\n </div><div class=\"row isNested d-none \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">type</p>\n </div>\n <div class=\"col-2 column\"><p>string</p></div>\n <div class=\"col-6 column\"><p>This describes the endpoint action.</p><p>default: <code>tag_cardinality</code></p></div>\n </div>\n \n </div>\n </div>\n </div>\n </div><div class=\"row hasChildData \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row js-collapse-trigger collapse-trigger \">\n <div class=\"col-4 column\">\n <p class=\"key\"><span class=\"toggle-arrow\"><svg width=\"6\" height=\"9\" viewBox=\"0 0 6 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.7294 4.45711L0.733399 7.82311L1.1294 8.29111L5.6654 4.45711L1.1294 0.641113L0.751398 1.12711L4.7294 4.45711Z\" fill=\"black\"/></svg></span> meta</p>\n </div>\n <div class=\"col-2 column\"><p>object</p></div>\n <div class=\"col-6 column\"><p>Response metadata object.</p></div>\n </div>\n <div class=\"row isNested d-none \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">metric_name</p>\n </div>\n <div class=\"col-2 column\"><p>string</p></div>\n <div class=\"col-6 column\"><p>The name of metric for which the tag cardinalities are returned.\nThis matches the metric name provided in the request.</p></div>\n </div>\n \n </div>\n </div>\n </div>\n </div></div>"
514+
},
515+
"400": {
516+
"json": {
517+
"errors": [
518+
"Bad Request"
519+
]
520+
},
521+
"html": "<div class=\"\"><div class=\"row \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">errors&nbsp;[<em>required</em>]</p>\n </div>\n <div class=\"col-2 column\"><p>[string]</p></div>\n <div class=\"col-6 column\"><p>A list of errors.</p></div>\n </div>\n \n </div>\n </div></div>"
522+
},
523+
"403": {
524+
"json": {
525+
"errors": [
526+
"Bad Request"
527+
]
528+
},
529+
"html": "<div class=\"\"><div class=\"row \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">errors&nbsp;[<em>required</em>]</p>\n </div>\n <div class=\"col-2 column\"><p>[string]</p></div>\n <div class=\"col-6 column\"><p>A list of errors.</p></div>\n </div>\n \n </div>\n </div></div>"
530+
},
531+
"404": {
532+
"json": {
533+
"errors": [
534+
"Bad Request"
535+
]
536+
},
537+
"html": "<div class=\"\"><div class=\"row \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">errors&nbsp;[<em>required</em>]</p>\n </div>\n <div class=\"col-2 column\"><p>[string]</p></div>\n <div class=\"col-6 column\"><p>A list of errors.</p></div>\n </div>\n \n </div>\n </div></div>"
538+
},
539+
"429": {
540+
"json": {
541+
"errors": [
542+
"Bad Request"
543+
]
544+
},
545+
"html": "<div class=\"\"><div class=\"row \">\n <div class=\"col-12 first-column\">\n <div class=\"row first-row \">\n <div class=\"col-4 column\">\n <p class=\"key\">errors&nbsp;[<em>required</em>]</p>\n </div>\n <div class=\"col-2 column\"><p>[string]</p></div>\n <div class=\"col-6 column\"><p>A list of errors.</p></div>\n </div>\n \n </div>\n </div></div>"
546+
}
547+
},
548+
"request": {
549+
"json_curl": {},
550+
"json": {},
551+
"html": ""
552+
}
553+
},
496554
"DeleteTagConfiguration": {
497555
"responses": {
498556
"403": {

data/api/v2/full_spec.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23580,6 +23580,61 @@ components:
2358023580
type: string
2358123581
type: array
2358223582
type: object
23583+
MetricTagCardinalitiesData:
23584+
description: A list of tag cardinalities associated with the given metric.
23585+
items:
23586+
$ref: '#/components/schemas/MetricTagCardinality'
23587+
type: array
23588+
MetricTagCardinalitiesMeta:
23589+
description: Response metadata object.
23590+
properties:
23591+
metric_name:
23592+
description: 'The name of metric for which the tag cardinalities are returned.
23593+
23594+
This matches the metric name provided in the request.
23595+
23596+
'
23597+
type: string
23598+
type: object
23599+
MetricTagCardinalitiesResponse:
23600+
description: 'Response object that includes an array of objects representing
23601+
the cardinality details of a metric''s tags.
23602+
23603+
'
23604+
properties:
23605+
data:
23606+
$ref: '#/components/schemas/MetricTagCardinalitiesData'
23607+
meta:
23608+
$ref: '#/components/schemas/MetricTagCardinalitiesMeta'
23609+
readOnly: true
23610+
type: object
23611+
MetricTagCardinality:
23612+
description: Object containing metadata and attributes related to a specific
23613+
tag key associated with the metric.
23614+
example:
23615+
attributes:
23616+
cardinality_delta: 25
23617+
id: http.request.latency
23618+
type: tag_cardinality
23619+
properties:
23620+
attributes:
23621+
$ref: '#/components/schemas/MetricTagCardinalityAttributes'
23622+
id:
23623+
description: The name of the tag key.
23624+
type: string
23625+
type:
23626+
default: tag_cardinality
23627+
description: This describes the endpoint action.
23628+
type: string
23629+
type: object
23630+
MetricTagCardinalityAttributes:
23631+
description: An object containing properties related to the tag key
23632+
properties:
23633+
cardinality_delta:
23634+
description: This describes the recent change in the tag keys cardinality
23635+
format: int64
23636+
type: integer
23637+
type: object
2358323638
MetricTagConfiguration:
2358423639
description: Object for a single metric tag configuration.
2358523640
example:
@@ -55993,6 +56048,53 @@ paths:
5599356048
permissions: []
5599456049
x-undo:
5599556050
type: safe
56051+
/api/v2/metrics/{metric_name}/tag-cardinalities:
56052+
get:
56053+
description: Returns the cardinality details of tags for a specific metric.
56054+
operationId: GetMetricTagCardinalityDetails
56055+
parameters:
56056+
- $ref: '#/components/parameters/MetricName'
56057+
responses:
56058+
'200':
56059+
content:
56060+
application/json:
56061+
schema:
56062+
$ref: '#/components/schemas/MetricTagCardinalitiesResponse'
56063+
description: Success
56064+
'400':
56065+
content:
56066+
application/json:
56067+
schema:
56068+
$ref: '#/components/schemas/APIErrorResponse'
56069+
description: Bad Request
56070+
'403':
56071+
content:
56072+
application/json:
56073+
schema:
56074+
$ref: '#/components/schemas/APIErrorResponse'
56075+
description: Forbidden
56076+
'404':
56077+
content:
56078+
application/json:
56079+
schema:
56080+
$ref: '#/components/schemas/APIErrorResponse'
56081+
description: Not Found
56082+
'429':
56083+
content:
56084+
application/json:
56085+
schema:
56086+
$ref: '#/components/schemas/APIErrorResponse'
56087+
description: Too Many Requests
56088+
summary: Get tag key cardinality details
56089+
tags:
56090+
- Metrics
56091+
x-menu-order: 13
56092+
x-permission:
56093+
operator: OR
56094+
permissions:
56095+
- metrics_read
56096+
x-undo:
56097+
type: safe
5599656098
/api/v2/metrics/{metric_name}/tags:
5599756099
delete:
5599856100
description: 'Deletes a metric''s tag configuration. Can only be used with application

0 commit comments

Comments
 (0)