-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for multi form parameter support (#312)
Co-authored-by: Kevin Zou <kevin.zou@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
- Loading branch information
1 parent
de29536
commit 7a643e5
Showing
10 changed files
with
97 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
examples/v2_security-monitoring_ListFindings_1668290866.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// List findings with detection_type query param returns "OK" response | ||
use datadog_api_client::datadog; | ||
use datadog_api_client::datadogV2::api_security_monitoring::ListFindingsOptionalParams; | ||
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI; | ||
use datadog_api_client::datadogV2::model::FindingVulnerabilityType; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
let mut configuration = datadog::Configuration::new(); | ||
configuration.set_unstable_operation_enabled("v2.ListFindings", true); | ||
let api = SecurityMonitoringAPI::with_config(configuration); | ||
let resp = api | ||
.list_findings( | ||
ListFindingsOptionalParams::default().filter_vulnerability_type(vec![ | ||
FindingVulnerabilityType::MISCONFIGURATION, | ||
FindingVulnerabilityType::ATTACK_PATH, | ||
]), | ||
) | ||
.await; | ||
if let Ok(value) = resp { | ||
println!("{:#?}", value); | ||
} else { | ||
println!("{:#?}", resp.unwrap_err()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...urity_monitoring/List-findings-with-detection-type-query-param-returns-OK-response.frozen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024-10-21T20:05:58.636Z |
33 changes: 33 additions & 0 deletions
33
...ecurity_monitoring/List-findings-with-detection-type-query-param-returns-OK-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"http_interactions": [ | ||
{ | ||
"request": { | ||
"body": "", | ||
"headers": { | ||
"Accept": [ | ||
"application/json" | ||
] | ||
}, | ||
"method": "get", | ||
"uri": "https://api.datadoghq.com/api/v2/posture_management/findings?filter%5Bvulnerability_type%5D=misconfiguration&filter%5Bvulnerability_type%5D=attack_path" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"data\":[],\"meta\":{\"page\":{\"total_filtered_count\":0},\"snapshot_timestamp\":1729541158755}}", | ||
"encoding": null | ||
}, | ||
"headers": { | ||
"Content-Type": [ | ||
"application/vnd.api+json" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
} | ||
}, | ||
"recorded_at": "Mon, 21 Oct 2024 20:05:58 GMT" | ||
} | ||
], | ||
"recorded_with": "VCR 6.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters