Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33939,6 +33939,25 @@ components:
- data
- meta
type: object
ListInterfaceTagsResponse:
description: Response for listing interface tags.
properties:
data:
$ref: '#/components/schemas/ListInterfaceTagsResponseData'
type: object
ListInterfaceTagsResponseData:
description: Response data for listing interface tags.
properties:
attributes:
$ref: '#/components/schemas/ListTagsResponseDataAttributes'
id:
description: The interface ID
example: example:1.2.3.4:1
type: string
type:
description: The type of the resource. The value should always be tags.
type: string
type: object
ListKindCatalogResponse:
description: List kind response.
properties:
Expand Down Expand Up @@ -55890,6 +55909,7 @@ components:
- -start_date
- -expiration_date
- -update_date
- -creation_date
- -enabled
type: string
x-enum-varnames:
Expand All @@ -55902,6 +55922,7 @@ components:
- START_DATE_DESCENDING
- EXPIRATION_DATE_DESCENDING
- UPDATE_DATE_DESCENDING
- CREATION_DATE_DESCENDING
- ENABLED_DESCENDING
SecurityMonitoringSuppressionType:
default: suppressions
Expand Down Expand Up @@ -86637,6 +86658,67 @@ paths:
summary: Update the tags for a device
tags:
- Network Device Monitoring
/api/v2/ndm/tags/interfaces/{interface_id}:
get:
description: Returns the tags associated with the specified interface.
operationId: ListInterfaceUserTags
parameters:
- description: The ID of the interface for which to retrieve tags.
example: example:1.2.3.4:1
in: path
name: interface_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListInterfaceTagsResponse'
description: OK
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: List tags for an interface
tags:
- Network Device Monitoring
patch:
description: Updates the tags associated with the specified interface.
operationId: UpdateInterfaceUserTags
parameters:
- description: The ID of the interface for which to update tags.
example: example:1.2.3.4:1
in: path
name: interface_id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListInterfaceTagsResponse'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListInterfaceTagsResponse'
description: OK
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Update the tags for an interface
tags:
- Network Device Monitoring
/api/v2/network/connections/aggregate:
get:
description: Get all aggregated connections.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-02-17T10:20:35.870Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-02-17T10:20:36.480Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-02-17T10:20:36.989Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2026-02-17T10:20:37.189Z

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List tags for an interface returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::NetworkDeviceMonitoringAPI.new
p api_instance.list_interface_user_tags("example:1.2.3.4:1")
18 changes: 18 additions & 0 deletions examples/v2/network-device-monitoring/UpdateInterfaceUserTags.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Update the tags for an interface returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::NetworkDeviceMonitoringAPI.new

body = DatadogAPIClient::V2::ListInterfaceTagsResponse.new({
data: DatadogAPIClient::V2::ListInterfaceTagsResponseData.new({
attributes: DatadogAPIClient::V2::ListTagsResponseDataAttributes.new({
tags: [
"tag:test",
"tag:testbis",
],
}),
id: "example:1.2.3.4:1",
type: "tags",
}),
})
p api_instance.update_interface_user_tags("example:1.2.3.4:1", body)
7 changes: 7 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2808,6 +2808,13 @@
"device_id" => "String",
"body" => "ListTagsResponse",
},
"v2.ListInterfaceUserTags" => {
"interface_id" => "String",
},
"v2.UpdateInterfaceUserTags" => {
"interface_id" => "String",
"body" => "ListInterfaceTagsResponse",
},
"v2.GetAggregatedConnections" => {
"from" => "Integer",
"to" => "Integer",
Expand Down
38 changes: 38 additions & 0 deletions features/v2/network_device_monitoring.feature
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@ Feature: Network Device Monitoring
And the response "data.attributes.tags[0]" is equal to "tag:test"
And the response "data.attributes.tags[1]" is equal to "tag:testbis"

@replay-only @team:DataDog/network-device-monitoring
Scenario: List tags for an interface returns "Not Found" response
Given new "ListInterfaceUserTags" request
And request contains "interface_id" parameter with value "unknown_interface_id"
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:DataDog/network-device-monitoring
Scenario: List tags for an interface returns "OK" response
Given new "ListInterfaceUserTags" request
And request contains "interface_id" parameter with value "example:1.2.3.4:1"
When the request is sent
Then the response status is 200 OK
And the response "data.id" is equal to "example:1.2.3.4:1"
And the response "data.type" is equal to "tags"
And the response "data.attributes.tags[0]" is equal to "tag:test"
And the response "data.attributes.tags[1]" is equal to "tag:testbis"

@replay-only @team:DataDog/network-device-monitoring
Scenario: Update the tags for a device returns "Not Found" response
Given new "UpdateDeviceUserTags" request
Expand All @@ -143,3 +161,23 @@ Feature: Network Device Monitoring
And the response "data.type" is equal to "tags"
And the response "data.attributes.tags[0]" is equal to "tag:test"
And the response "data.attributes.tags[1]" is equal to "tag:testbis"

@replay-only @team:DataDog/network-device-monitoring
Scenario: Update the tags for an interface returns "Not Found" response
Given new "UpdateInterfaceUserTags" request
And request contains "interface_id" parameter with value "unknown_interface_id"
And body with value {"data": {"attributes": {"tags": ["tag:test", "tag:testbis"]}, "id": "unknown_interface_id", "type":"tags"}}
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:DataDog/network-device-monitoring
Scenario: Update the tags for an interface returns "OK" response
Given new "UpdateInterfaceUserTags" request
And request contains "interface_id" parameter with value "example:1.2.3.4:1"
And body with value {"data": {"attributes": {"tags": ["tag:test", "tag:testbis"]}, "id": "example:1.2.3.4:1", "type":"tags"}}
When the request is sent
Then the response status is 200 OK
And the response "data.id" is equal to "example:1.2.3.4:1"
And the response "data.type" is equal to "tags"
And the response "data.attributes.tags[0]" is equal to "tag:test"
And the response "data.attributes.tags[1]" is equal to "tag:testbis"
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3197,6 +3197,18 @@
"type": "idempotent"
}
},
"ListInterfaceUserTags": {
"tag": "Network Device Monitoring",
"undo": {
"type": "safe"
}
},
"UpdateInterfaceUserTags": {
"tag": "Network Device Monitoring",
"undo": {
"type": "idempotent"
}
},
"GetAggregatedConnections": {
"tag": "Cloud Network Monitoring",
"undo": {
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3052,6 +3052,8 @@ def overrides
"v2.list_findings_meta" => "ListFindingsMeta",
"v2.list_findings_page" => "ListFindingsPage",
"v2.list_findings_response" => "ListFindingsResponse",
"v2.list_interface_tags_response" => "ListInterfaceTagsResponse",
"v2.list_interface_tags_response_data" => "ListInterfaceTagsResponseData",
"v2.list_kind_catalog_response" => "ListKindCatalogResponse",
"v2.list_notification_channels_response" => "ListNotificationChannelsResponse",
"v2.list_on_call_notification_rules_response" => "ListOnCallNotificationRulesResponse",
Expand Down
Loading
Loading