Skip to content

Commit fc4dd56

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add public documentation on NDM interface tags endpoint (#3489)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 68b1baf commit fc4dd56

File tree

19 files changed

+854
-0
lines changed

19 files changed

+854
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33939,6 +33939,25 @@ components:
3393933939
- data
3394033940
- meta
3394133941
type: object
33942+
ListInterfaceTagsResponse:
33943+
description: Response for listing interface tags.
33944+
properties:
33945+
data:
33946+
$ref: '#/components/schemas/ListInterfaceTagsResponseData'
33947+
type: object
33948+
ListInterfaceTagsResponseData:
33949+
description: Response data for listing interface tags.
33950+
properties:
33951+
attributes:
33952+
$ref: '#/components/schemas/ListTagsResponseDataAttributes'
33953+
id:
33954+
description: The interface ID
33955+
example: example:1.2.3.4:1
33956+
type: string
33957+
type:
33958+
description: The type of the resource. The value should always be tags.
33959+
type: string
33960+
type: object
3394233961
ListKindCatalogResponse:
3394333962
description: List kind response.
3394433963
properties:
@@ -86637,6 +86656,67 @@ paths:
8663786656
summary: Update the tags for a device
8663886657
tags:
8663986658
- Network Device Monitoring
86659+
/api/v2/ndm/tags/interfaces/{interface_id}:
86660+
get:
86661+
description: Returns the tags associated with the specified interface.
86662+
operationId: ListInterfaceUserTags
86663+
parameters:
86664+
- description: The ID of the interface for which to retrieve tags.
86665+
example: example:1.2.3.4:1
86666+
in: path
86667+
name: interface_id
86668+
required: true
86669+
schema:
86670+
type: string
86671+
responses:
86672+
'200':
86673+
content:
86674+
application/json:
86675+
schema:
86676+
$ref: '#/components/schemas/ListInterfaceTagsResponse'
86677+
description: OK
86678+
'403':
86679+
$ref: '#/components/responses/ForbiddenResponse'
86680+
'404':
86681+
$ref: '#/components/responses/NotFoundResponse'
86682+
'429':
86683+
$ref: '#/components/responses/TooManyRequestsResponse'
86684+
summary: List tags for an interface
86685+
tags:
86686+
- Network Device Monitoring
86687+
patch:
86688+
description: Updates the tags associated with the specified interface.
86689+
operationId: UpdateInterfaceUserTags
86690+
parameters:
86691+
- description: The ID of the interface for which to update tags.
86692+
example: example:1.2.3.4:1
86693+
in: path
86694+
name: interface_id
86695+
required: true
86696+
schema:
86697+
type: string
86698+
requestBody:
86699+
content:
86700+
application/json:
86701+
schema:
86702+
$ref: '#/components/schemas/ListInterfaceTagsResponse'
86703+
required: true
86704+
responses:
86705+
'200':
86706+
content:
86707+
application/json:
86708+
schema:
86709+
$ref: '#/components/schemas/ListInterfaceTagsResponse'
86710+
description: OK
86711+
'403':
86712+
$ref: '#/components/responses/ForbiddenResponse'
86713+
'404':
86714+
$ref: '#/components/responses/NotFoundResponse'
86715+
'429':
86716+
$ref: '#/components/responses/TooManyRequestsResponse'
86717+
summary: Update the tags for an interface
86718+
tags:
86719+
- Network Device Monitoring
8664086720
/api/v2/network/connections/aggregate:
8664186721
get:
8664286722
description: Get all aggregated connections.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-02-17T10:20:35.870Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Network Device Monitoring/List tags for an interface returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "94b7b6f404204394bc2f3a6085e34f25",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 542,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/ndm/tags/interfaces/unknown_interface_id"
29+
},
30+
"response": {
31+
"bodySize": 49,
32+
"content": {
33+
"mimeType": "application/vnd.api+json",
34+
"size": 49,
35+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/vnd.api+json"
42+
}
43+
],
44+
"headersSize": 524,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 404,
48+
"statusText": "Not Found"
49+
},
50+
"startedDateTime": "2026-02-17T10:20:35.874Z",
51+
"time": 591
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-02-17T10:20:36.480Z"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Network Device Monitoring/List tags for an interface returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "984680f7fd2dbf04400e46d0eb4be6d7",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
}
23+
],
24+
"headersSize": 543,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/ndm/tags/interfaces/example%3A1.2.3.4%3A1"
29+
},
30+
"response": {
31+
"bodySize": 98,
32+
"content": {
33+
"mimeType": "application/vnd.api+json",
34+
"size": 98,
35+
"text": "{\"data\":{\"id\":\"example:1.2.3.4:1\",\"type\":\"tags\",\"attributes\":{\"tags\":[\"tag:test\",\"tag:testbis\"]}}}"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/vnd.api+json"
42+
}
43+
],
44+
"headersSize": 524,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 200,
48+
"statusText": "OK"
49+
},
50+
"startedDateTime": "2026-02-17T10:20:36.485Z",
51+
"time": 487
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-02-17T10:20:36.989Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Network Device Monitoring/Update the tags for an interface returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "5307a138eda8d7fcc5cd2c716ae769aa",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 101,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 599,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "PATCH",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"tags\":[\"tag:test\",\"tag:testbis\"]},\"id\":\"unknown_interface_id\",\"type\":\"tags\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/ndm/tags/interfaces/unknown_interface_id"
39+
},
40+
"response": {
41+
"bodySize": 49,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 49,
45+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 668,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 404,
58+
"statusText": "Not Found"
59+
},
60+
"startedDateTime": "2026-02-17T10:20:36.996Z",
61+
"time": 186
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2026-02-17T10:20:37.189Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Network Device Monitoring/Update the tags for an interface returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "471b978abd0aaa8e3829526b91a99a4b",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 98,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 599,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "PATCH",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"tags\":[\"tag:test\",\"tag:testbis\"]},\"id\":\"example:1.2.3.4:1\",\"type\":\"tags\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/ndm/tags/interfaces/example%3A1.2.3.4%3A1"
39+
},
40+
"response": {
41+
"bodySize": 98,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 98,
45+
"text": "{\"data\":{\"id\":\"example:1.2.3.4:1\",\"type\":\"tags\",\"attributes\":{\"tags\":[\"tag:test\",\"tag:testbis\"]}}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 668,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2026-02-17T10:20:37.196Z",
61+
"time": 517
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* List tags for an interface returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
9+
10+
const params: v2.NetworkDeviceMonitoringApiListInterfaceUserTagsRequest = {
11+
interfaceId: "example:1.2.3.4:1",
12+
};
13+
14+
apiInstance
15+
.listInterfaceUserTags(params)
16+
.then((data: v2.ListInterfaceTagsResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)