Skip to content

add start_date to suppression APIs #1929

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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-26 16:01:43.683289",
"spec_repo_commit": "f2e98b01"
"regenerated": "2025-01-02 14:39:42.082975",
"spec_repo_commit": "b4e964b3"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-12-26 16:01:43.698056",
"spec_repo_commit": "f2e98b01"
"regenerated": "2025-01-02 14:39:42.099534",
"spec_repo_commit": "b4e964b3"
}
}
}
21 changes: 21 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24825,6 +24825,12 @@ components:
as the search bar for detection rules.
example: type:log_detection source:cloudtrail
type: string
start_date:
description: A Unix millisecond timestamp giving the start date for the
suppression rule. After this date, it starts suppressing signals.
example: 1703187336000
format: int64
type: integer
suppression_query:
description: The suppression query of the suppression rule. If a signal
matches this query, it is suppressed and not triggered. Same syntax as
Expand Down Expand Up @@ -24880,6 +24886,12 @@ components:
as the search bar for detection rules.
example: type:log_detection source:cloudtrail
type: string
start_date:
description: A Unix millisecond timestamp giving the start date for the
suppression rule. After this date, it starts suppressing signals.
example: 1703187336000
format: int64
type: integer
suppression_query:
description: The suppression query of the suppression rule. If a signal
matches this query, it is suppressed and is not triggered. It uses the
Expand Down Expand Up @@ -24966,6 +24978,15 @@ components:
as the search bar for detection rules.
example: type:log_detection source:cloudtrail
type: string
start_date:
description: A Unix millisecond timestamp giving the start date for the
suppression rule. After this date, it starts suppressing signals. If unset,
the start date of the suppression rule is left untouched. If set to `null`,
the start date is removed.
example: 1703187336000
format: int64
nullable: true
type: integer
suppression_query:
description: The suppression query of the suppression rule. If a signal
matches this query, it is suppressed and not triggered. Same syntax as
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2024-05-20T17:07:03.155Z"
"2024-11-27T15:22:34.711Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "27a1f9163c5e7ca458afa4dfedcf653a",
"_id": "935a1a23dd04eabbdc7d2dd3caa616f9",
"_order": 0,
"cache": {},
"request": {
"bodySize": 345,
"bodySize": 372,
"cookies": [],
"headers": [
{
Expand All @@ -32,36 +32,36 @@
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}}"
"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\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions"
},
"response": {
"bodySize": 569,
"bodySize": 607,
"content": {
"mimeType": "application/json",
"size": 569,
"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"
"mimeType": "application/vnd.api+json",
"size": 607,
"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}}}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
"value": "application/vnd.api+json"
}
],
"headersSize": 654,
"headersSize": 662,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-05-20T17:07:03.163Z",
"time": 200
"startedDateTime": "2024-11-27T15:22:34.717Z",
"time": 188
},
{
"_id": "d9f9b01e05680cee8935b3a7c3962d93",
"_id": "b62286dc79a3ad3484cfc79401028e80",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -78,29 +78,24 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/8qj-mmz-zym"
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ejv-ksi-r4j"
},
"response": {
"bodySize": 0,
"content": {
"mimeType": "text/html; charset=utf-8",
"mimeType": "text/plain",
"size": 0
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "text/html; charset=utf-8"
}
],
"headersSize": 641,
"headers": [],
"headersSize": 601,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 204,
"statusText": "No Content"
},
"startedDateTime": "2024-05-20T17:07:03.375Z",
"time": 165
"startedDateTime": "2024-11-27T15:22:34.912Z",
"time": 124
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"2024-05-20T17:07:12.131Z"
"2024-11-27T15:24:35.169Z"
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
},
"entries": [
{
"_id": "297112e6457fd05913f3dea87bc09b1f",
"_id": "a17e65511af335541cd28e39316f12e5",
"_order": 0,
"cache": {},
"request": {
"bodySize": 366,
"bodySize": 393,
"cookies": [],
"headers": [
{
Expand All @@ -32,36 +32,36 @@
"postData": {
"mimeType": "application/json",
"params": [],
"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\"}}"
"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\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions"
},
"response": {
"bodySize": 587,
"bodySize": 625,
"content": {
"mimeType": "application/json",
"size": 587,
"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"
"mimeType": "application/vnd.api+json",
"size": 625,
"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}}}"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
"value": "application/vnd.api+json"
}
],
"headersSize": 654,
"headersSize": 662,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2024-05-20T17:07:12.139Z",
"time": 208
"startedDateTime": "2024-11-27T15:24:35.176Z",
"time": 150
},
{
"_id": "634e6e91f885024b6ea24fe399feb9ff",
"_id": "78ff53cd61d6a98b250d4650abfcb889",
"_order": 0,
"cache": {},
"request": {
Expand All @@ -78,29 +78,24 @@
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/i9m-nqb-ets"
"url": "https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/rv5-3sh-tvp"
},
"response": {
"bodySize": 0,
"content": {
"mimeType": "text/html; charset=utf-8",
"mimeType": "text/plain",
"size": 0
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "text/html; charset=utf-8"
}
],
"headersSize": 641,
"headers": [],
"headersSize": 601,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 204,
"statusText": "No Content"
},
"startedDateTime": "2024-05-20T17:07:12.360Z",
"time": 169
"startedDateTime": "2024-11-27T15:24:35.331Z",
"time": 118
}
],
"pages": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const params: v2.SecurityMonitoringApiCreateSecurityMonitoringSuppressionRequest
description:
"This rule suppresses low-severity signals in staging environments.",
enabled: true,
startDate: 1637493071000,
expirationDate: 1638443471000,
name: "Example-Security-Monitoring",
ruleQuery: "type:log_detection source:cloudtrail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const params: v2.SecurityMonitoringApiCreateSecurityMonitoringSuppressionRequest
description:
"This rule suppresses low-severity signals in staging environments.",
enabled: true,
startDate: 1637493071000,
expirationDate: 1638443471000,
name: "Example-Security-Monitoring",
ruleQuery: "type:log_detection source:cloudtrail",
Expand Down
Loading
Loading