-
Notifications
You must be signed in to change notification settings - Fork 16
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 (#1836)
* add support for multi query params * handle edge case * cleanup * docs * Regenerate client from commit aeb956c4 of spec repo --------- Co-authored-by: Sherzod Karimov <[email protected]> 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 <[email protected]>
- Loading branch information
1 parent
ac0f7f2
commit e600a8f
Showing
59 changed files
with
1,138 additions
and
516 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ Component,Licence,Copyright | |
@types/jest,MIT,Copyright Microsoft Corporation | ||
@types/node,MIT,Copyright Microsoft Corporation | ||
@types/pako,MIT,Copyright Caleb Eggensperger Muhammet Öztürk | ||
@types/url-parse,MIT,Copyright Microsoft Corporation | ||
@typescript-eslint/eslint-plugin,MIT,Copyright (c) 2019 TypeScript ESLint and other contributors | ||
@typescript-eslint/parser,BSD-2-Clause, | ||
buffer-from,MIT,Copyright (c) 2016, 2018 Linus Unnebäck | ||
|
@@ -31,6 +30,5 @@ prettier,MIT,Copyright © James Long and contributors | |
ts-node,MIT,Copyright (c) 2014 Blake Embrey ([email protected]) | ||
typedoc,Apache-2.0,Copyright (c) 2015 Sebastian Lenz Copyright (c) 2016-2021 TypeDoc Contributors. | ||
typescript,Apache-2.0,Copyright (c) Microsoft Corporation. | ||
url-parse,MIT,Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors. | ||
loglevel,MIT,Copyright (c) 2013 Tim Perry | ||
zstd.ts,BSD-2-Clause,Copyright (c) [2021] [Beeno Tung (Tung Cheung Leong)] |
1 change: 1 addition & 0 deletions
1
.../List-findings-with-detection_type-query-param-returns-OK-response_3927018946/frozen.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 @@ | ||
"2024-10-21T20:05:58.636Z" |
67 changes: 67 additions & 0 deletions
67
...ist-findings-with-detection_type-query-param-returns-OK-response_3927018946/recording.har
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,67 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "Security Monitoring/List findings with detection_type query param returns \"OK\" response", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "5f6fcc703704b0462fc33728fd9b12b2", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 0, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 611, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "GET", | ||
"queryString": [ | ||
{ | ||
"name": "filter", | ||
"value": { | ||
"vulnerability_type": [ | ||
"misconfiguration", | ||
"attack_path" | ||
] | ||
} | ||
} | ||
], | ||
"url": "https://api.datadoghq.com/api/v2/posture_management/findings?filter%5Bvulnerability_type%5D=misconfiguration&filter%5Bvulnerability_type%5D=attack_path" | ||
}, | ||
"response": { | ||
"bodySize": 89, | ||
"content": { | ||
"mimeType": "application/vnd.api+json", | ||
"size": 89, | ||
"text": "{\"data\":[],\"meta\":{\"page\":{\"total_filtered_count\":0},\"snapshot_timestamp\":1729541158755}}" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/vnd.api+json" | ||
} | ||
], | ||
"headersSize": 524, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2024-10-21T20:05:58.644Z", | ||
"time": 141 | ||
} | ||
], | ||
"pages": [], | ||
"version": "1.2" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
examples/v2/security-monitoring/ListFindings_1668290866.ts
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,22 @@ | ||
/** | ||
* List findings with detection_type query param returns "OK" response | ||
*/ | ||
|
||
import { client, v2 } from "@datadog/datadog-api-client"; | ||
|
||
const configuration = client.createConfiguration(); | ||
configuration.unstableOperations["v2.listFindings"] = true; | ||
const apiInstance = new v2.SecurityMonitoringApi(configuration); | ||
|
||
const params: v2.SecurityMonitoringApiListFindingsRequest = { | ||
filterVulnerabilityType: ["misconfiguration", "attack_path"], | ||
}; | ||
|
||
apiInstance | ||
.listFindings(params) | ||
.then((data: v2.ListFindingsResponse) => { | ||
console.log( | ||
"API called successfully. Returned data: " + JSON.stringify(data) | ||
); | ||
}) | ||
.catch((error: any) => console.error(error)); |
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
Oops, something went wrong.