Skip to content

Commit bdda659

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add specs for Cloud Network Monitoring API (#2124)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 47bb0ff commit bdda659

File tree

18 files changed

+926
-4
lines changed

18 files changed

+926
-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-03-31 17:39:57.837620",
8-
"spec_repo_commit": "3826157e"
7+
"regenerated": "2025-04-01 20:56:02.087355",
8+
"spec_repo_commit": "f629f10b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-31 17:39:57.854596",
13-
"spec_repo_commit": "3826157e"
12+
"regenerated": "2025-04-01 20:56:02.103559",
13+
"spec_repo_commit": "f629f10b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30188,6 +30188,125 @@ components:
3018830188
description: Link to the Incident created on ServiceNow
3018930189
type: string
3019030190
type: object
30191+
SingleAggregatedConnectionResponseArray:
30192+
description: The definition of `SingleAggregatedConnectionResponseArray` object.
30193+
example:
30194+
data:
30195+
- attributes:
30196+
bytes_sent_by_client: 100
30197+
bytes_sent_by_server: 200
30198+
group_bys:
30199+
client_team:
30200+
- networks
30201+
server_service:
30202+
- hucklebuck
30203+
packets_sent_by_client: 10
30204+
packets_sent_by_server: 20
30205+
rtt_micro_seconds: 800
30206+
tcp_closed_connections: 30
30207+
tcp_established_connections: 40
30208+
tcp_refusals: 7
30209+
tcp_resets: 5
30210+
tcp_retransmits: 30
30211+
tcp_timeouts: 6
30212+
id: client_team:networks, server_service:hucklebuck
30213+
type: aggregated_connection
30214+
properties:
30215+
data:
30216+
description: The `SingleAggregatedConnectionResponseArray` `data`.
30217+
items:
30218+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseData'
30219+
type: array
30220+
type: object
30221+
SingleAggregatedConnectionResponseData:
30222+
description: The definition of `SingleAggregatedConnectionResponseData` object.
30223+
properties:
30224+
attributes:
30225+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataAttributes'
30226+
id:
30227+
description: The `SingleAggregatedConnectionResponseData` `id`.
30228+
type: string
30229+
type:
30230+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataType'
30231+
type: object
30232+
SingleAggregatedConnectionResponseDataAttributes:
30233+
description: The definition of `SingleAggregatedConnectionResponseDataAttributes`
30234+
object.
30235+
properties:
30236+
bytes_sent_by_client:
30237+
description: The total number of bytes sent by the client over the given
30238+
period.
30239+
format: int64
30240+
type: integer
30241+
bytes_sent_by_server:
30242+
description: The total number of bytes sent by the server over the given
30243+
period.
30244+
format: int64
30245+
type: integer
30246+
group_bys:
30247+
additionalProperties:
30248+
items:
30249+
type: string
30250+
type: array
30251+
description: The `attributes` `group_bys`.
30252+
type: object
30253+
packets_sent_by_client:
30254+
description: The total number of packets sent by the client over the given
30255+
period.
30256+
format: int64
30257+
type: integer
30258+
packets_sent_by_server:
30259+
description: The total number of packets sent by the server over the given
30260+
period.
30261+
format: int64
30262+
type: integer
30263+
rtt_micro_seconds:
30264+
description: Measured as TCP smoothed roundtrip time in microseconds (the
30265+
time between a TCP frame being sent and acknowledged).
30266+
format: int64
30267+
type: integer
30268+
tcp_closed_connections:
30269+
description: The number of TCP connections in a closed state. Measured in
30270+
connections per second from the client.
30271+
format: int64
30272+
type: integer
30273+
tcp_established_connections:
30274+
description: The number of TCP connections in an established state. Measured
30275+
in connections per second from the client.
30276+
format: int64
30277+
type: integer
30278+
tcp_refusals:
30279+
description: The number of TCP connections that were refused by the server.
30280+
Typically this indicates an attempt to connect to an IP/port that is not
30281+
receiving connections, or a firewall/security misconfiguration.
30282+
format: int64
30283+
type: integer
30284+
tcp_resets:
30285+
description: The number of TCP connections that were reset by the server.
30286+
format: int64
30287+
type: integer
30288+
tcp_retransmits:
30289+
description: TCP Retransmits represent detected failures that are retransmitted
30290+
to ensure delivery. Measured in count of retransmits from the client.
30291+
format: int64
30292+
type: integer
30293+
tcp_timeouts:
30294+
description: The number of TCP connections that timed out from the perspective
30295+
of the operating system. This can indicate general connectivity and latency
30296+
issues.
30297+
format: int64
30298+
type: integer
30299+
type: object
30300+
SingleAggregatedConnectionResponseDataType:
30301+
default: aggregated_connection
30302+
description: 'Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
30303+
30304+
default: `aggregated_connection`'
30305+
enum:
30306+
- aggregated_connection
30307+
type: string
30308+
x-enum-varnames:
30309+
- AGGREGATED_CONNECTION
3019130310
SlackIntegrationMetadata:
3019230311
description: Incident integration metadata for the Slack integration.
3019330312
properties:
@@ -44282,6 +44401,68 @@ paths:
4428244401
summary: Update the tags for a device
4428344402
tags:
4428444403
- Network Device Monitoring
44404+
/api/v2/network/connections/aggregate:
44405+
get:
44406+
description: Get aggregated connections
44407+
operationId: GetAggregatedConnections
44408+
parameters:
44409+
- description: Unix timestamp (number of seconds since epoch) of the start of
44410+
the query window. If not provided, the start of the query window is 15 minutes
44411+
before the "to" timestamp. If neither "from" nor "to" are provided, the
44412+
query window is [now - 15m, now].
44413+
in: query
44414+
name: from
44415+
schema:
44416+
format: int64
44417+
type: integer
44418+
- description: Unix timestamp (number of seconds since epoch) of the end of
44419+
the query window. If not provided, the end of the query window is the current
44420+
time. If neither "from" nor "to" are provided, the query window is [now
44421+
- 15m, now].
44422+
in: query
44423+
name: to
44424+
schema:
44425+
format: int64
44426+
type: integer
44427+
- description: Comma-separated list of fields to group connections by.
44428+
in: query
44429+
name: group_by
44430+
schema:
44431+
type: string
44432+
- description: Comma-separated list of tags to filter connections by.
44433+
in: query
44434+
name: tags
44435+
schema:
44436+
type: string
44437+
- description: The number of connections to be returned. The maximum value is
44438+
5000.
44439+
in: query
44440+
name: limit
44441+
schema:
44442+
default: 100
44443+
format: int32
44444+
maximum: 5000
44445+
minimum: 1
44446+
type: integer
44447+
responses:
44448+
'200':
44449+
content:
44450+
application/json:
44451+
schema:
44452+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseArray'
44453+
description: OK
44454+
'400':
44455+
$ref: '#/components/responses/BadRequestResponse'
44456+
'429':
44457+
$ref: '#/components/responses/TooManyRequestsResponse'
44458+
summary: Get aggregated connections
44459+
tags:
44460+
- Cloud Network Monitoring
44461+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
44462+
44463+
contact [Datadog support](https://docs.datadoghq.com/help/).
44464+
44465+
type: safe'
4428544466
/api/v2/org_configs:
4428644467
get:
4428744468
description: Returns all Org Configs (name, description, and value).
@@ -53624,6 +53805,10 @@ tags:
5362453805
and the `cloud_cost` data source. For more information, see the [Cloud Cost Management
5362553806
documentation](https://docs.datadoghq.com/cloud_cost_management/).
5362653807
name: Cloud Cost Management
53808+
- description: The Cloud Network Monitoring API allows you to fetch aggregated connections
53809+
and their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
53810+
for more information.
53811+
name: Cloud Network Monitoring
5362753812
- description: Manage your Datadog Cloudflare integration directly through the Datadog
5362853813
API. See the [Cloudflare integration page](https://docs.datadoghq.com/integrations/cloudflare/)
5362953814
for more information.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-03-31T18:18:50.338Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Network Monitoring/Get aggregated connections returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "e6fa1daa1a1481fceb36e24e11462296",
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": 534,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/network/connections/aggregate"
29+
},
30+
"response": {
31+
"bodySize": 11,
32+
"content": {
33+
"mimeType": "application/vnd.api+json",
34+
"size": 11,
35+
"text": "{\"data\":[]}"
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": "2025-03-31T18:18:50.572Z",
51+
"time": 191
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-03-31T18:18:50.770Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Network Monitoring/Get all aggregated connections returns \"Bad Request\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "7d2e124612863aeb3175ac7aac0c7e6c",
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": 545,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "GET",
27+
"queryString": [
28+
{
29+
"name": "limit",
30+
"value": "6000"
31+
}
32+
],
33+
"url": "https://api.datadoghq.com/api/v2/network/connections/aggregate?limit=6000"
34+
},
35+
"response": {
36+
"bodySize": 53,
37+
"content": {
38+
"mimeType": "application/vnd.api+json",
39+
"size": 53,
40+
"text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid limit\"}]}"
41+
},
42+
"cookies": [],
43+
"headers": [
44+
{
45+
"name": "content-type",
46+
"value": "application/vnd.api+json"
47+
}
48+
],
49+
"headersSize": 524,
50+
"httpVersion": "HTTP/1.1",
51+
"redirectURL": "",
52+
"status": 400,
53+
"statusText": "Bad Request"
54+
},
55+
"startedDateTime": "2025-03-31T18:18:50.792Z",
56+
"time": 44
57+
}
58+
],
59+
"pages": [],
60+
"version": "1.2"
61+
}
62+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Get aggregated connections returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getAggregatedConnections"] = true;
9+
const apiInstance = new v2.CloudNetworkMonitoringApi(configuration);
10+
11+
apiInstance
12+
.getAggregatedConnections()
13+
.then((data: v2.SingleAggregatedConnectionResponseArray) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4970,6 +4970,29 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
49704970
},
49714971
"operationResponseType": "ListTagsResponse",
49724972
},
4973+
"v2.GetAggregatedConnections": {
4974+
"from": {
4975+
"type": "number",
4976+
"format": "int64",
4977+
},
4978+
"to": {
4979+
"type": "number",
4980+
"format": "int64",
4981+
},
4982+
"groupBy": {
4983+
"type": "string",
4984+
"format": "",
4985+
},
4986+
"tags": {
4987+
"type": "string",
4988+
"format": "",
4989+
},
4990+
"limit": {
4991+
"type": "number",
4992+
"format": "int32",
4993+
},
4994+
"operationResponseType": "SingleAggregatedConnectionResponseArray",
4995+
},
49734996
"v2.ListOrgConfigs": {
49744997
"operationResponseType": "OrgConfigListResponse",
49754998
},

0 commit comments

Comments
 (0)