Skip to content

Commit 7256f9a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
add start_date to suppression APIs (#1929)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 306a60a commit 7256f9a

File tree

12 files changed

+99
-59
lines changed

12 files changed

+99
-59
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-12-26 16:01:43.683289",
8-
"spec_repo_commit": "f2e98b01"
7+
"regenerated": "2025-01-02 14:39:42.082975",
8+
"spec_repo_commit": "b4e964b3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-26 16:01:43.698056",
13-
"spec_repo_commit": "f2e98b01"
12+
"regenerated": "2025-01-02 14:39:42.099534",
13+
"spec_repo_commit": "b4e964b3"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -24825,6 +24825,12 @@ components:
2482524825
as the search bar for detection rules.
2482624826
example: type:log_detection source:cloudtrail
2482724827
type: string
24828+
start_date:
24829+
description: A Unix millisecond timestamp giving the start date for the
24830+
suppression rule. After this date, it starts suppressing signals.
24831+
example: 1703187336000
24832+
format: int64
24833+
type: integer
2482824834
suppression_query:
2482924835
description: The suppression query of the suppression rule. If a signal
2483024836
matches this query, it is suppressed and not triggered. Same syntax as
@@ -24880,6 +24886,12 @@ components:
2488024886
as the search bar for detection rules.
2488124887
example: type:log_detection source:cloudtrail
2488224888
type: string
24889+
start_date:
24890+
description: A Unix millisecond timestamp giving the start date for the
24891+
suppression rule. After this date, it starts suppressing signals.
24892+
example: 1703187336000
24893+
format: int64
24894+
type: integer
2488324895
suppression_query:
2488424896
description: The suppression query of the suppression rule. If a signal
2488524897
matches this query, it is suppressed and is not triggered. It uses the
@@ -24966,6 +24978,15 @@ components:
2496624978
as the search bar for detection rules.
2496724979
example: type:log_detection source:cloudtrail
2496824980
type: string
24981+
start_date:
24982+
description: A Unix millisecond timestamp giving the start date for the
24983+
suppression rule. After this date, it starts suppressing signals. If unset,
24984+
the start date of the suppression rule is left untouched. If set to `null`,
24985+
the start date is removed.
24986+
example: 1703187336000
24987+
format: int64
24988+
nullable: true
24989+
type: integer
2496924990
suppression_query:
2497024991
description: The suppression query of the suppression rule. If a signal
2497124992
matches this query, it is suppressed and not triggered. Same syntax as
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-05-20T17:07:03.155Z"
1+
"2024-11-27T15:22:34.711Z"

cassettes/v2/Security-Monitoring_1187227211/Create-a-suppression-rule-returns-OK-response_1135731355/recording.har

+18-23
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "27a1f9163c5e7ca458afa4dfedcf653a",
11+
"_id": "935a1a23dd04eabbdc7d2dd3caa616f9",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 345,
15+
"bodySize": 372,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -32,36 +32,36 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1718039223000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1716224823\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"suppression_query\":\"env:staging status:low\"},\"type\":\"suppressions\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1734535354000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1732720954\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733584954000,\"suppression_query\":\"env:staging status:low\"},\"type\":\"suppressions\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions"
3939
},
4040
"response": {
41-
"bodySize": 569,
41+
"bodySize": 607,
4242
"content": {
43-
"mimeType": "application/json",
44-
"size": 569,
45-
"text": "{\"data\":{\"id\":\"8qj-mmz-zym\",\"attributes\":{\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1716224823\",\"enabled\":true,\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"suppression_query\":\"env:staging status:low\",\"data_exclusion_query\":\"\",\"expiration_date\":1718039223000,\"version\":1,\"creation_date\":1716224823374,\"update_date\":1716224823374,\"creator\":{\"name\":null,\"handle\":\"frog@datadoghq.com\"},\"updater\":{\"name\":null,\"handle\":\"frog@datadoghq.com\"}},\"type\":\"suppressions\"}}\n"
43+
"mimeType": "application/vnd.api+json",
44+
"size": 607,
45+
"text": "{\"data\":{\"id\":\"ejv-ksi-r4j\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1732720954868,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"\"},\"data_exclusion_query\":\"\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"editable\":true,\"enabled\":true,\"expiration_date\":1734535354000,\"name\":\"Test-Create_a_suppression_rule_returns_OK_response-1732720954\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733584954000,\"suppression_query\":\"env:staging status:low\",\"update_date\":1732720954868,\"updater\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"\"},\"version\":1}}}"
4646
},
4747
"cookies": [],
4848
"headers": [
4949
{
5050
"name": "content-type",
51-
"value": "application/json"
51+
"value": "application/vnd.api+json"
5252
}
5353
],
54-
"headersSize": 654,
54+
"headersSize": 662,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2024-05-20T17:07:03.163Z",
61-
"time": 200
60+
"startedDateTime": "2024-11-27T15:22:34.717Z",
61+
"time": 188
6262
},
6363
{
64-
"_id": "d9f9b01e05680cee8935b3a7c3962d93",
64+
"_id": "b62286dc79a3ad3484cfc79401028e80",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,29 +78,24 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/8qj-mmz-zym"
81+
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ejv-ksi-r4j"
8282
},
8383
"response": {
8484
"bodySize": 0,
8585
"content": {
86-
"mimeType": "text/html; charset=utf-8",
86+
"mimeType": "text/plain",
8787
"size": 0
8888
},
8989
"cookies": [],
90-
"headers": [
91-
{
92-
"name": "content-type",
93-
"value": "text/html; charset=utf-8"
94-
}
95-
],
96-
"headersSize": 641,
90+
"headers": [],
91+
"headersSize": 601,
9792
"httpVersion": "HTTP/1.1",
9893
"redirectURL": "",
9994
"status": 204,
10095
"statusText": "No Content"
10196
},
102-
"startedDateTime": "2024-05-20T17:07:03.375Z",
103-
"time": 165
97+
"startedDateTime": "2024-11-27T15:22:34.912Z",
98+
"time": 124
10499
}
105100
],
106101
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-05-20T17:07:12.131Z"
1+
"2024-11-27T15:24:35.169Z"

cassettes/v2/Security-Monitoring_1187227211/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response_3158025700/recording.har

+18-23
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "297112e6457fd05913f3dea87bc09b1f",
11+
"_id": "a17e65511af335541cd28e39316f12e5",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 366,
15+
"bodySize": 393,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -32,36 +32,36 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"data_exclusion_query\":\"account_id:12345\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1718039232000,\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1716224832\",\"rule_query\":\"type:log_detection source:cloudtrail\"},\"type\":\"suppressions\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"data_exclusion_query\":\"account_id:12345\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"enabled\":true,\"expiration_date\":1734535475000,\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1732721075\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733585075000},\"type\":\"suppressions\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions"
3939
},
4040
"response": {
41-
"bodySize": 587,
41+
"bodySize": 625,
4242
"content": {
43-
"mimeType": "application/json",
44-
"size": 587,
45-
"text": "{\"data\":{\"id\":\"i9m-nqb-ets\",\"attributes\":{\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1716224832\",\"enabled\":true,\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"suppression_query\":\"\",\"data_exclusion_query\":\"account_id:12345\",\"expiration_date\":1718039232000,\"version\":1,\"creation_date\":1716224832354,\"update_date\":1716224832355,\"creator\":{\"name\":null,\"handle\":\"frog@datadoghq.com\"},\"updater\":{\"name\":null,\"handle\":\"frog@datadoghq.com\"}},\"type\":\"suppressions\"}}\n"
43+
"mimeType": "application/vnd.api+json",
44+
"size": 625,
45+
"text": "{\"data\":{\"id\":\"rv5-3sh-tvp\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1732721075298,\"creator\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"\"},\"data_exclusion_query\":\"account_id:12345\",\"description\":\"This rule suppresses low-severity signals in staging environments.\",\"editable\":true,\"enabled\":true,\"expiration_date\":1734535475000,\"name\":\"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1732721075\",\"rule_query\":\"type:log_detection source:cloudtrail\",\"start_date\":1733585075000,\"suppression_query\":\"\",\"update_date\":1732721075298,\"updater\":{\"handle\":\"frog@datadoghq.com\",\"name\":\"\"},\"version\":1}}}"
4646
},
4747
"cookies": [],
4848
"headers": [
4949
{
5050
"name": "content-type",
51-
"value": "application/json"
51+
"value": "application/vnd.api+json"
5252
}
5353
],
54-
"headersSize": 654,
54+
"headersSize": 662,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2024-05-20T17:07:12.139Z",
61-
"time": 208
60+
"startedDateTime": "2024-11-27T15:24:35.176Z",
61+
"time": 150
6262
},
6363
{
64-
"_id": "634e6e91f885024b6ea24fe399feb9ff",
64+
"_id": "78ff53cd61d6a98b250d4650abfcb889",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,29 +78,24 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/i9m-nqb-ets"
81+
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/rv5-3sh-tvp"
8282
},
8383
"response": {
8484
"bodySize": 0,
8585
"content": {
86-
"mimeType": "text/html; charset=utf-8",
86+
"mimeType": "text/plain",
8787
"size": 0
8888
},
8989
"cookies": [],
90-
"headers": [
91-
{
92-
"name": "content-type",
93-
"value": "text/html; charset=utf-8"
94-
}
95-
],
96-
"headersSize": 641,
90+
"headers": [],
91+
"headersSize": 601,
9792
"httpVersion": "HTTP/1.1",
9893
"redirectURL": "",
9994
"status": 204,
10095
"statusText": "No Content"
10196
},
102-
"startedDateTime": "2024-05-20T17:07:12.360Z",
103-
"time": 169
97+
"startedDateTime": "2024-11-27T15:24:35.331Z",
98+
"time": 118
10499
}
105100
],
106101
"pages": [],

examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const params: v2.SecurityMonitoringApiCreateSecurityMonitoringSuppressionRequest
1515
description:
1616
"This rule suppresses low-severity signals in staging environments.",
1717
enabled: true,
18+
startDate: 1637493071000,
1819
expirationDate: 1638443471000,
1920
name: "Example-Security-Monitoring",
2021
ruleQuery: "type:log_detection source:cloudtrail",

examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const params: v2.SecurityMonitoringApiCreateSecurityMonitoringSuppressionRequest
1515
description:
1616
"This rule suppresses low-severity signals in staging environments.",
1717
enabled: true,
18+
startDate: 1637493071000,
1819
expirationDate: 1638443471000,
1920
name: "Example-Security-Monitoring",
2021
ruleQuery: "type:log_detection source:cloudtrail",

0 commit comments

Comments
 (0)