Skip to content

Extended List Findings API to expose resource related Private IP Addresses to details #2733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "df31e44",
"generated": "2025-07-28 19:54:45.232"
"spec_repo_commit": "dcf594e",
"generated": "2025-07-31 09:55:56.724"
}
19 changes: 13 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56012,12 +56012,13 @@ paths:
following fields are available for findings:\n- `external_id`: The resource
external ID related to the finding.\n- `description`: The description and
remediation steps for the finding.\n- `datadog_link`: The Datadog relative
link for the finding.\n\n### Response\n\nThe response includes an array of
finding objects, pagination metadata, and a count of items that match the
query.\n\nEach finding object contains the following:\n\n- The finding ID
that can be used in a `GetFinding` request to retrieve the full finding details.\n-
Core attributes, including status, evaluation, high-level resource details,
muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
link for the finding.\n- `ip_addresses`: The list of private IP addresses
for the resource related to the finding.\n\n### Response\n\nThe response includes
an array of finding objects, pagination metadata, and a count of items that
match the query.\n\nEach finding object contains the following:\n\n- The finding
ID that can be used in a `GetFinding` request to retrieve the full finding
details.\n- Core attributes, including status, evaluation, high-level resource
details, muted state, and rule details.\n- `evaluation_changed_at` and `resource_discovery_date`
time stamps.\n- An array of associated tags.\n"
operationId: ListFindings
parameters:
Expand Down Expand Up @@ -56088,6 +56089,12 @@ paths:
required: false
schema:
type: string
- description: Return only findings for the specified resource id.
in: query
name: filter[@resource_id]
required: false
schema:
type: string
- description: Return findings that were found on a specified date (Unix ms)
or date range (using comparison operators).
example: '>=1678721573794'
Expand Down
18 changes: 18 additions & 0 deletions src/datadog_api_client/v2/api/security_monitoring_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,11 @@ def __init__(self, api_client=None):
"attribute": "filter[resource_type]",
"location": "query",
},
"filter_resource_id": {
"openapi_types": (str,),
"attribute": "filter[@resource_id]",
"location": "query",
},
"filter_discovery_timestamp": {
"openapi_types": (str,),
"attribute": "filter[discovery_timestamp]",
Expand Down Expand Up @@ -2613,6 +2618,7 @@ def list_findings(
filter_rule_id: Union[str, UnsetType] = unset,
filter_rule_name: Union[str, UnsetType] = unset,
filter_resource_type: Union[str, UnsetType] = unset,
filter_resource_id: Union[str, UnsetType] = unset,
filter_discovery_timestamp: Union[str, UnsetType] = unset,
filter_evaluation: Union[FindingEvaluation, UnsetType] = unset,
filter_status: Union[FindingStatus, UnsetType] = unset,
Expand Down Expand Up @@ -2654,6 +2660,7 @@ def list_findings(
* ``external_id`` : The resource external ID related to the finding.
* ``description`` : The description and remediation steps for the finding.
* ``datadog_link`` : The Datadog relative link for the finding.
* ``ip_addresses`` : The list of private IP addresses for the resource related to the finding.

**Response**

Expand Down Expand Up @@ -2684,6 +2691,8 @@ def list_findings(
:type filter_rule_name: str, optional
:param filter_resource_type: Return only findings for the specified resource type.
:type filter_resource_type: str, optional
:param filter_resource_id: Return only findings for the specified resource id.
:type filter_resource_id: str, optional
:param filter_discovery_timestamp: Return findings that were found on a specified date (Unix ms) or date range (using comparison operators).
:type filter_discovery_timestamp: str, optional
:param filter_evaluation: Return only ``pass`` or ``fail`` findings.
Expand Down Expand Up @@ -2724,6 +2733,9 @@ def list_findings(
if filter_resource_type is not unset:
kwargs["filter_resource_type"] = filter_resource_type

if filter_resource_id is not unset:
kwargs["filter_resource_id"] = filter_resource_id

if filter_discovery_timestamp is not unset:
kwargs["filter_discovery_timestamp"] = filter_discovery_timestamp

Expand Down Expand Up @@ -2753,6 +2765,7 @@ def list_findings_with_pagination(
filter_rule_id: Union[str, UnsetType] = unset,
filter_rule_name: Union[str, UnsetType] = unset,
filter_resource_type: Union[str, UnsetType] = unset,
filter_resource_id: Union[str, UnsetType] = unset,
filter_discovery_timestamp: Union[str, UnsetType] = unset,
filter_evaluation: Union[FindingEvaluation, UnsetType] = unset,
filter_status: Union[FindingStatus, UnsetType] = unset,
Expand Down Expand Up @@ -2781,6 +2794,8 @@ def list_findings_with_pagination(
:type filter_rule_name: str, optional
:param filter_resource_type: Return only findings for the specified resource type.
:type filter_resource_type: str, optional
:param filter_resource_id: Return only findings for the specified resource id.
:type filter_resource_id: str, optional
:param filter_discovery_timestamp: Return findings that were found on a specified date (Unix ms) or date range (using comparison operators).
:type filter_discovery_timestamp: str, optional
:param filter_evaluation: Return only ``pass`` or ``fail`` findings.
Expand Down Expand Up @@ -2823,6 +2838,9 @@ def list_findings_with_pagination(
if filter_resource_type is not unset:
kwargs["filter_resource_type"] = filter_resource_type

if filter_resource_id is not unset:
kwargs["filter_resource_id"] = filter_resource_id

if filter_discovery_timestamp is not unset:
kwargs["filter_discovery_timestamp"] = filter_discovery_timestamp

Expand Down
Loading