Skip to content

Commit 949bfa2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Extended List Findings API to expose resource related Private IP Addresses to details (#3250)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 859c15b commit 949bfa2

3 files changed

Lines changed: 26 additions & 8 deletions

File tree

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "df31e44",
3-
"generated": "2025-07-28 19:55:56.622"
2+
"spec_repo_commit": "dcf594e",
3+
"generated": "2025-07-31 09:57:14.491"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56012,12 +56012,13 @@ paths:
5601256012
following fields are available for findings:\n- `external_id`: The resource
5601356013
external ID related to the finding.\n- `description`: The description and
5601456014
remediation steps for the finding.\n- `datadog_link`: The Datadog relative
56015-
link for the finding.\n\n### Response\n\nThe response includes an array of
56016-
finding objects, pagination metadata, and a count of items that match the
56017-
query.\n\nEach finding object contains the following:\n\n- The finding ID
56018-
that can be used in a `GetFinding` request to retrieve the full finding details.\n-
56019-
Core attributes, including status, evaluation, high-level resource details,
56020-
muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
56015+
link for the finding.\n- `ip_addresses`: The list of private IP addresses
56016+
for the resource related to the finding.\n\n### Response\n\nThe response includes
56017+
an array of finding objects, pagination metadata, and a count of items that
56018+
match the query.\n\nEach finding object contains the following:\n\n- The finding
56019+
ID that can be used in a `GetFinding` request to retrieve the full finding
56020+
details.\n- Core attributes, including status, evaluation, high-level resource
56021+
details, muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
5602156022
time stamps.\n- An array of associated tags.\n"
5602256023
operationId: ListFindings
5602356024
parameters:
@@ -56088,6 +56089,12 @@ paths:
5608856089
required: false
5608956090
schema:
5609056091
type: string
56092+
- description: Return only findings for the specified resource id.
56093+
in: query
56094+
name: filter[@resource_id]
56095+
required: false
56096+
schema:
56097+
type: string
5609156098
- description: Return findings that were found on a specified date (Unix ms)
5609256099
or date range (using comparison operators).
5609356100
example: '>=1678721573794'

api/datadogV2/api_security_monitoring.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,7 @@ type ListFindingsOptionalParameters struct {
30543054
FilterRuleId *string
30553055
FilterRuleName *string
30563056
FilterResourceType *string
3057+
FilterResourceId *string
30573058
FilterDiscoveryTimestamp *string
30583059
FilterEvaluation *FindingEvaluation
30593060
FilterStatus *FindingStatus
@@ -3121,6 +3122,12 @@ func (r *ListFindingsOptionalParameters) WithFilterResourceType(filterResourceTy
31213122
return r
31223123
}
31233124

3125+
// WithFilterResourceId sets the corresponding parameter name and returns the struct.
3126+
func (r *ListFindingsOptionalParameters) WithFilterResourceId(filterResourceId string) *ListFindingsOptionalParameters {
3127+
r.FilterResourceId = &filterResourceId
3128+
return r
3129+
}
3130+
31243131
// WithFilterDiscoveryTimestamp sets the corresponding parameter name and returns the struct.
31253132
func (r *ListFindingsOptionalParameters) WithFilterDiscoveryTimestamp(filterDiscoveryTimestamp string) *ListFindingsOptionalParameters {
31263133
r.FilterDiscoveryTimestamp = &filterDiscoveryTimestamp
@@ -3184,6 +3191,7 @@ func (r *ListFindingsOptionalParameters) WithDetailedFindings(detailedFindings b
31843191
// - `external_id`: The resource external ID related to the finding.
31853192
// - `description`: The description and remediation steps for the finding.
31863193
// - `datadog_link`: The Datadog relative link for the finding.
3194+
// - `ip_addresses`: The list of private IP addresses for the resource related to the finding.
31873195
//
31883196
// ### Response
31893197
//
@@ -3256,6 +3264,9 @@ func (a *SecurityMonitoringApi) ListFindings(ctx _context.Context, o ...ListFind
32563264
if optionalParams.FilterResourceType != nil {
32573265
localVarQueryParams.Add("filter[resource_type]", datadog.ParameterToString(*optionalParams.FilterResourceType, ""))
32583266
}
3267+
if optionalParams.FilterResourceId != nil {
3268+
localVarQueryParams.Add("filter[@resource_id]", datadog.ParameterToString(*optionalParams.FilterResourceId, ""))
3269+
}
32593270
if optionalParams.FilterDiscoveryTimestamp != nil {
32603271
localVarQueryParams.Add("filter[discovery_timestamp]", datadog.ParameterToString(*optionalParams.FilterDiscoveryTimestamp, ""))
32613272
}

0 commit comments

Comments
 (0)