Skip to content

Commit 573ddc0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Update NDM GetInterfaces documentation to add get_ip_addresses param (#2149)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 93a839b commit 573ddc0

File tree

8 files changed

+42
-11
lines changed

8 files changed

+42
-11
lines changed

.apigentools-info

+4-4
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-04-14 08:41:56.357428",
8-
"spec_repo_commit": "e73254d7"
7+
"regenerated": "2025-04-14 16:33:13.933543",
8+
"spec_repo_commit": "c0287407"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-14 08:41:56.373102",
13-
"spec_repo_commit": "e73254d7"
12+
"regenerated": "2025-04-14 16:33:13.949636",
13+
"spec_repo_commit": "c0287407"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -46074,6 +46074,13 @@ paths:
4607446074
required: true
4607546075
schema:
4607646076
type: string
46077+
- description: Whether to get the IP addresses of the interfaces.
46078+
example: true
46079+
in: query
46080+
name: get_ip_addresses
46081+
required: false
46082+
schema:
46083+
type: boolean
4607746084
responses:
4607846085
'200':
4607946086
content:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-07-05T14:25:54.313Z"
1+
"2025-04-09T22:39:12.378Z"

cassettes/v2/Network-Device-Monitoring_315763993/Get-the-list-of-interfaces-of-the-device-returns-OK-response_2174575217/recording.har

+10-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "5a6a117e682a544c1c30e0f45537c11a",
11+
"_id": "6c05b1996e29df1ac976189f432c5396",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -21,16 +21,20 @@
2121
"value": "application/json"
2222
}
2323
],
24-
"headersSize": 529,
24+
"headersSize": 558,
2525
"httpVersion": "HTTP/1.1",
2626
"method": "GET",
2727
"queryString": [
2828
{
2929
"name": "device_id",
3030
"value": "default:1.2.3.4"
31+
},
32+
{
33+
"name": "get_ip_addresses",
34+
"value": "true"
3135
}
3236
],
33-
"url": "https://api.datadoghq.com/api/v2/ndm/interfaces?device_id=default:1.2.3.4"
37+
"url": "https://api.datadoghq.com/api/v2/ndm/interfaces?device_id=default%3A1.2.3.4&get_ip_addresses=true"
3438
},
3539
"response": {
3640
"bodySize": 220,
@@ -46,14 +50,14 @@
4650
"value": "application/vnd.api+json"
4751
}
4852
],
49-
"headersSize": 523,
53+
"headersSize": 524,
5054
"httpVersion": "HTTP/1.1",
5155
"redirectURL": "",
5256
"status": 200,
5357
"statusText": "OK"
5458
},
55-
"startedDateTime": "2024-07-05T14:25:54.323Z",
56-
"time": 526
59+
"startedDateTime": "2025-04-09T22:39:12.388Z",
60+
"time": 956
5761
}
5862
],
5963
"pages": [],

examples/v2/network-device-monitoring/GetInterfaces.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const apiInstance = new v2.NetworkDeviceMonitoringApi(configuration);
99

1010
const params: v2.NetworkDeviceMonitoringApiGetInterfacesRequest = {
1111
deviceId: "default:1.2.3.4",
12+
getIpAddresses: true,
1213
};
1314

1415
apiInstance

features/support/scenarios_model_mapping.ts

+4
Original file line numberDiff line numberDiff line change
@@ -4950,6 +4950,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
49504950
"type": "string",
49514951
"format": "",
49524952
},
4953+
"getIpAddresses": {
4954+
"type": "boolean",
4955+
"format": "",
4956+
},
49534957
"operationResponseType": "GetInterfacesResponse",
49544958
},
49554959
"v2.ListDeviceUserTags": {

features/v2/network_device_monitoring.feature

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Feature: Network Device Monitoring
7979
Scenario: Get the list of interfaces of the device returns "OK" response
8080
Given new "GetInterfaces" request
8181
And request contains "device_id" parameter with value "default:1.2.3.4"
82+
And request contains "get_ip_addresses" parameter with value true
8283
When the request is sent
8384
Then the response status is 200 OK
8485
And the response "data[0].type" is equal to "interface"

packages/datadog-api-client-v2/apis/NetworkDeviceMonitoringApi.ts

+14
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class NetworkDeviceMonitoringApiRequestFactory extends BaseAPIRequestFact
5858

5959
public async getInterfaces(
6060
deviceId: string,
61+
getIpAddresses?: boolean,
6162
_options?: Configuration
6263
): Promise<RequestContext> {
6364
const _config = _options || this.configuration;
@@ -85,6 +86,13 @@ export class NetworkDeviceMonitoringApiRequestFactory extends BaseAPIRequestFact
8586
""
8687
);
8788
}
89+
if (getIpAddresses !== undefined) {
90+
requestContext.setQueryParam(
91+
"get_ip_addresses",
92+
ObjectSerializer.serialize(getIpAddresses, "boolean", ""),
93+
""
94+
);
95+
}
8896

8997
// Apply auth methods
9098
applySecurityAuthentication(_config, requestContext, [
@@ -559,6 +567,11 @@ export interface NetworkDeviceMonitoringApiGetInterfacesRequest {
559567
* @type string
560568
*/
561569
deviceId: string;
570+
/**
571+
* Whether to get the IP addresses of the interfaces.
572+
* @type boolean
573+
*/
574+
getIpAddresses?: boolean;
562575
}
563576

564577
export interface NetworkDeviceMonitoringApiListDevicesRequest {
@@ -653,6 +666,7 @@ export class NetworkDeviceMonitoringApi {
653666
): Promise<GetInterfacesResponse> {
654667
const requestContextPromise = this.requestFactory.getInterfaces(
655668
param.deviceId,
669+
param.getIpAddresses,
656670
options
657671
);
658672
return requestContextPromise.then((requestContext) => {

0 commit comments

Comments
 (0)