diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5fefa9009c9..a6c3d8b9361 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -37239,7 +37239,7 @@ components: - data type: object DueDateRuleDataCreate: - description: The data object for a due date rule create or update request. + description: The data object for a due date rule create request. properties: attributes: $ref: "#/components/schemas/DueDateRuleAttributesCreate" @@ -37266,6 +37266,23 @@ components: - type - attributes type: object + DueDateRuleDataUpdate: + description: The data object for a due date rule update request. The `id` must match the `rule_id` path parameter. + properties: + attributes: + $ref: "#/components/schemas/DueDateRuleAttributesCreate" + id: + description: The ID of the due date rule to update. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/DueDateRuleType" + required: + - id + - type + - attributes + type: object DueDateRuleReorderData: description: The ordered list of all due date rules. Every rule must be included. items: @@ -37286,7 +37303,15 @@ components: - id type: object DueDateRuleReorderRequest: - description: The body of the due date rule reorder request. + description: The body of a due date rule reorder request. + properties: + data: + $ref: "#/components/schemas/DueDateRuleReorderData" + required: + - data + type: object + DueDateRuleReorderResponse: + description: The response of a due date rule reorder request. properties: data: $ref: "#/components/schemas/DueDateRuleReorderData" @@ -37313,7 +37338,7 @@ components: description: The body of a due date rule update request. properties: data: - $ref: "#/components/schemas/DueDateRuleDataCreate" + $ref: "#/components/schemas/DueDateRuleDataUpdate" required: - data type: object @@ -37936,6 +37961,13 @@ components: required: - revisions type: object + EntityContextEntityType: + default: siem_entity_identity + description: The type of entity to retrieve. Only `siem_entity_identity` is currently supported. + enum: [siem_entity_identity] + example: siem_entity_identity + type: string + x-enum-varnames: [SIEM_ENTITY_IDENTITY] EntityContextPage: description: Pagination metadata for the entity context response. properties: @@ -38005,6 +38037,15 @@ components: email: user@example.com principal_id: user@example.com type: object + EntityContextRevisionsMode: + default: latest + description: |- + Which revisions to return for each entity: `latest` returns only the latest revision of each entity as of `to`, + and `all` returns every revision in the requested time range. + enum: [latest, all] + example: latest + type: string + x-enum-varnames: [LATEST, ALL] EntityData: description: Entity data. properties: @@ -73647,7 +73688,7 @@ components: - data type: object MuteRuleDataCreate: - description: The data object for a mute rule create or update request. + description: The data object for a mute rule create request. properties: attributes: $ref: "#/components/schemas/MuteRuleAttributesCreate" @@ -73674,6 +73715,23 @@ components: - type - attributes type: object + MuteRuleDataUpdate: + description: The data object for a mute rule update request. The `id` must match the `rule_id` path parameter. + properties: + attributes: + $ref: "#/components/schemas/MuteRuleAttributesCreate" + id: + description: The ID of the mute rule to update. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/MuteRuleType" + required: + - id + - type + - attributes + type: object MuteRuleReorderData: description: The ordered list of all mute rules. Every rule must be included. items: @@ -73694,7 +73752,15 @@ components: - id type: object MuteRuleReorderRequest: - description: The body of the mute rule reorder request. + description: The body of a mute rule reorder request. + properties: + data: + $ref: "#/components/schemas/MuteRuleReorderData" + required: + - data + type: object + MuteRuleReorderResponse: + description: The response of a mute rule reorder request. properties: data: $ref: "#/components/schemas/MuteRuleReorderData" @@ -73721,7 +73787,7 @@ components: description: The body of a mute rule update request. properties: data: - $ref: "#/components/schemas/MuteRuleDataCreate" + $ref: "#/components/schemas/MuteRuleDataUpdate" required: - data type: object @@ -92891,6 +92957,17 @@ components: x-enum-varnames: - ANY - ALL + RecentlyUpdatedEntitiesResponse: + description: Response from the recently updated entities endpoint, containing the entities with the most recent updates in the requested time range, ordered from most to least recently updated. + properties: + data: + description: The list of entities with the most recent updates, ordered from most to least recently updated. + items: + $ref: "#/components/schemas/EntityContextEntity" + type: array + required: + - data + type: object RecommendationAttributes: description: Attributes of the SPA Recommendation resource. Contains recommendations for both driver and executor components. properties: @@ -110561,7 +110638,7 @@ components: - data type: object SeverityModifierRuleDataCreate: - description: The data object for a severity modifier rule create or update request. + description: The data object for a severity modifier rule create request. properties: attributes: $ref: "#/components/schemas/SeverityModifierRuleAttributesCreate" @@ -110588,6 +110665,23 @@ components: - type - attributes type: object + SeverityModifierRuleDataUpdate: + description: The data object for a severity modifier rule update request. The `id` must match the `rule_id` path parameter. + properties: + attributes: + $ref: "#/components/schemas/SeverityModifierRuleAttributesCreate" + id: + description: The ID of the severity modifier rule to update. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/SeverityModifierRuleType" + required: + - id + - type + - attributes + type: object SeverityModifierRuleReorderData: description: The ordered list of all severity modifier rules. Every rule must be included. items: @@ -110691,7 +110785,7 @@ components: description: The body of a severity modifier rule update request. properties: data: - $ref: "#/components/schemas/SeverityModifierRuleDataCreate" + $ref: "#/components/schemas/SeverityModifierRuleDataUpdate" required: - data type: object @@ -123725,7 +123819,7 @@ components: - data type: object TicketCreationRuleDataCreate: - description: The data object for a ticket creation rule create or update request. + description: The data object for a ticket creation rule create request. properties: attributes: $ref: "#/components/schemas/TicketCreationRuleAttributesCreate" @@ -123752,6 +123846,23 @@ components: - type - attributes type: object + TicketCreationRuleDataUpdate: + description: The data object for a ticket creation rule update request. The `id` must match the `rule_id` path parameter. + properties: + attributes: + $ref: "#/components/schemas/TicketCreationRuleAttributesCreate" + id: + description: The ID of the ticket creation rule to update. + example: "00000000-0000-0000-0000-000000000000" + format: uuid + type: string + type: + $ref: "#/components/schemas/TicketCreationRuleType" + required: + - id + - type + - attributes + type: object TicketCreationRuleReorderData: description: The ordered list of all ticket creation rules. Every rule must be included. items: @@ -123772,7 +123883,15 @@ components: - id type: object TicketCreationRuleReorderRequest: - description: The body of the ticket creation rule reorder request. + description: The body of a ticket creation rule reorder request. + properties: + data: + $ref: "#/components/schemas/TicketCreationRuleReorderData" + required: + - data + type: object + TicketCreationRuleReorderResponse: + description: The response of a ticket creation rule reorder request. properties: data: $ref: "#/components/schemas/TicketCreationRuleReorderData" @@ -123799,7 +123918,7 @@ components: description: The body of a ticket creation rule update request. properties: data: - $ref: "#/components/schemas/TicketCreationRuleDataCreate" + $ref: "#/components/schemas/TicketCreationRuleDataUpdate" required: - data type: object @@ -205341,7 +205460,7 @@ paths: - id: "11111111-1111-1111-1111-111111111111" type: due_date_rules schema: - $ref: "#/components/schemas/DueDateRuleReorderRequest" + $ref: "#/components/schemas/DueDateRuleReorderResponse" description: Successfully reordered the due date rules "400": content: @@ -205514,6 +205633,7 @@ paths: finding_types: - misconfiguration query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" type: due_date_rules schema: $ref: "#/components/schemas/DueDateRuleUpdateRequest" @@ -206225,7 +206345,7 @@ paths: - id: "11111111-1111-1111-1111-111111111111" type: mute_rules schema: - $ref: "#/components/schemas/MuteRuleReorderRequest" + $ref: "#/components/schemas/MuteRuleReorderResponse" description: Successfully reordered the mute rules "400": content: @@ -206388,6 +206508,7 @@ paths: finding_types: - misconfiguration query: "env:dev" + id: "00000000-0000-0000-0000-000000000000" type: mute_rules schema: $ref: "#/components/schemas/MuteRuleUpdateRequest" @@ -206840,6 +206961,7 @@ paths: finding_types: - misconfiguration query: "env:dev" + id: "00000000-0000-0000-0000-000000000000" type: severity_modifier_rules schema: $ref: "#/components/schemas/SeverityModifierRuleUpdateRequest" @@ -207115,7 +207237,7 @@ paths: - id: "11111111-1111-1111-1111-111111111111" type: ticket_creation_rules schema: - $ref: "#/components/schemas/TicketCreationRuleReorderRequest" + $ref: "#/components/schemas/TicketCreationRuleReorderResponse" description: Successfully reordered the ticket creation rules "400": content: @@ -207280,6 +207402,7 @@ paths: finding_types: - misconfiguration query: "env:prod" + id: "00000000-0000-0000-0000-000000000000" type: ticket_creation_rules schema: $ref: "#/components/schemas/TicketCreationRuleUpdateRequest" @@ -212778,6 +212901,15 @@ paths: required: false schema: type: string + - description: |- + The type of entity to retrieve. Only `siem_entity_identity` is currently supported. + Defaults to `siem_entity_identity`. + example: siem_entity_identity + in: query + name: entity_type + required: false + schema: + $ref: "#/components/schemas/EntityContextEntityType" - description: |- The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now-7d`). Defaults to `now-7d`. Ignored when `as_of` is set. @@ -212870,6 +213002,113 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security_monitoring/entity_context/recently_updated: + get: + description: |- + Get the entities with the most recent updates in the Cloud SIEM entity context store. Entities are ranked + by the time of their most recent revision in the requested time range, and the top `limit` entities are + returned in that order. This endpoint is not paginated. + operationId: GetEntityContextRecentlyUpdated + parameters: + - description: A free-text query (for example, an email address or principal ID) used to filter the entities returned. + example: user@example.com + in: query + name: query + required: false + schema: + type: string + - description: |- + The type of entity to retrieve. Only `siem_entity_identity` is currently supported. + Defaults to `siem_entity_identity`. + example: siem_entity_identity + in: query + name: entity_type + required: false + schema: + $ref: "#/components/schemas/EntityContextEntityType" + - description: |- + The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now-7d`). + Defaults to `now-7d`. + in: query + name: from + required: false + schema: + default: now-7d + example: now-7d + type: string + - description: |- + The end of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now`). + Defaults to `now`. Entities are ranked by their most recent revision within `[from, to]`. + in: query + name: to + required: false + schema: + default: now + example: now + type: string + - description: The number of entities to return. Must be between 1 and 100. + example: 50 + in: query + name: limit + required: false + schema: + default: 50 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: |- + Which revisions to return for each entity: `latest` returns only the latest revision of each entity as of `to`, + and `all` returns every revision in the requested time range. + example: latest + in: query + name: revisions + required: false + schema: + $ref: "#/components/schemas/EntityContextRevisionsMode" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + revisions: + - attributes: + accounts: + - linked-account-123 + display_name: Test User + email: user@example.com + principal_id: user@example.com + first_seen_at: "2026-04-01T00:00:00Z" + last_seen_at: "2026-05-01T00:00:00Z" + id: user@example.com + type: siem_entity_identity + schema: + $ref: "#/components/schemas/RecentlyUpdatedEntitiesResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - siem_entities_read + summary: Get recently updated entity context + tags: ["Security Monitoring"] + x-permission: + operator: OR + permissions: + - siem_entities_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/entity_context/{id}: get: description: |- @@ -212886,6 +213125,15 @@ paths: schema: example: user@example.com type: string + - description: |- + The type of entity to retrieve. Only `siem_entity_identity` is currently supported. + Defaults to `siem_entity_identity`. + example: siem_entity_identity + in: query + name: entity_type + required: false + schema: + $ref: "#/components/schemas/EntityContextEntityType" - description: |- The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now-7d`). Defaults to `now-7d`. Ignored when `as_of` is set. diff --git a/examples/v2/security-monitoring/GetEntityContextRecentlyUpdated.java b/examples/v2/security-monitoring/GetEntityContextRecentlyUpdated.java new file mode 100644 index 00000000000..eb62e2d18aa --- /dev/null +++ b/examples/v2/security-monitoring/GetEntityContextRecentlyUpdated.java @@ -0,0 +1,27 @@ +// Get recently updated entity context returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.RecentlyUpdatedEntitiesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN")); + defaultClient.setUnstableOperationEnabled("v2.getEntityContextRecentlyUpdated", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + RecentlyUpdatedEntitiesResponse result = apiInstance.getEntityContextRecentlyUpdated(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#getEntityContextRecentlyUpdated"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.java b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.java index 6012e130569..76579fe44b3 100644 --- a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.java +++ b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationDueDateRules.java @@ -5,6 +5,7 @@ import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.DueDateRuleReorderItem; import com.datadog.api.client.v2.model.DueDateRuleReorderRequest; +import com.datadog.api.client.v2.model.DueDateRuleReorderResponse; import com.datadog.api.client.v2.model.DueDateRuleType; import java.util.Collections; import java.util.UUID; @@ -34,7 +35,7 @@ public static void main(String[] args) { .type(DueDateRuleType.DUE_DATE_RULES))); try { - DueDateRuleReorderRequest result = + DueDateRuleReorderResponse result = apiInstance.reorderSecurityFindingsAutomationDueDateRules(body); System.out.println(result); } catch (ApiException e) { diff --git a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.java b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.java index 9ac1eb737de..0d6af67805b 100644 --- a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.java +++ b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationMuteRules.java @@ -5,6 +5,7 @@ import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.MuteRuleReorderItem; import com.datadog.api.client.v2.model.MuteRuleReorderRequest; +import com.datadog.api.client.v2.model.MuteRuleReorderResponse; import com.datadog.api.client.v2.model.MuteRuleType; import java.util.Collections; import java.util.UUID; @@ -34,7 +35,7 @@ public static void main(String[] args) { .type(MuteRuleType.MUTE_RULES))); try { - MuteRuleReorderRequest result = apiInstance.reorderSecurityFindingsAutomationMuteRules(body); + MuteRuleReorderResponse result = apiInstance.reorderSecurityFindingsAutomationMuteRules(body); System.out.println(result); } catch (ApiException e) { System.err.println( diff --git a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.java b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.java index d0bffa94fd6..e0676ca274b 100644 --- a/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.java +++ b/examples/v2/security-monitoring/ReorderSecurityFindingsAutomationTicketCreationRules.java @@ -5,6 +5,7 @@ import com.datadog.api.client.v2.api.SecurityMonitoringApi; import com.datadog.api.client.v2.model.TicketCreationRuleReorderItem; import com.datadog.api.client.v2.model.TicketCreationRuleReorderRequest; +import com.datadog.api.client.v2.model.TicketCreationRuleReorderResponse; import com.datadog.api.client.v2.model.TicketCreationRuleType; import java.util.Collections; import java.util.UUID; @@ -35,7 +36,7 @@ public static void main(String[] args) { .type(TicketCreationRuleType.TICKET_CREATION_RULES))); try { - TicketCreationRuleReorderRequest result = + TicketCreationRuleReorderResponse result = apiInstance.reorderSecurityFindingsAutomationTicketCreationRules(body); System.out.println(result); } catch (ApiException e) { diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.java b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.java index 6edbf8a473f..c7226028805 100644 --- a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.java +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationDueDateRule.java @@ -8,7 +8,7 @@ import com.datadog.api.client.v2.model.DueDatePerSeverityItem; import com.datadog.api.client.v2.model.DueDateRuleAction; import com.datadog.api.client.v2.model.DueDateRuleAttributesCreate; -import com.datadog.api.client.v2.model.DueDateRuleDataCreate; +import com.datadog.api.client.v2.model.DueDateRuleDataUpdate; import com.datadog.api.client.v2.model.DueDateRuleResponse; import com.datadog.api.client.v2.model.DueDateRuleType; import com.datadog.api.client.v2.model.DueDateRuleUpdateRequest; @@ -36,7 +36,7 @@ public static void main(String[] args) { DueDateRuleUpdateRequest body = new DueDateRuleUpdateRequest() .data( - new DueDateRuleDataCreate() + new DueDateRuleDataUpdate() .attributes( new DueDateRuleAttributesCreate() .action( @@ -55,6 +55,7 @@ public static void main(String[] args) { Collections.singletonList( SecurityFindingType.MISCONFIGURATION)) .query("env:staging"))) + .id(VALID_DUE_DATE_RULE_DATA_ID) .type(DueDateRuleType.DUE_DATE_RULES)); try { diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.java b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.java index d89a696c46b..08294abffb5 100644 --- a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.java +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationMuteRule.java @@ -7,7 +7,7 @@ import com.datadog.api.client.v2.model.MuteReason; import com.datadog.api.client.v2.model.MuteRuleAction; import com.datadog.api.client.v2.model.MuteRuleAttributesCreate; -import com.datadog.api.client.v2.model.MuteRuleDataCreate; +import com.datadog.api.client.v2.model.MuteRuleDataUpdate; import com.datadog.api.client.v2.model.MuteRuleResponse; import com.datadog.api.client.v2.model.MuteRuleType; import com.datadog.api.client.v2.model.MuteRuleUpdateRequest; @@ -33,7 +33,7 @@ public static void main(String[] args) { MuteRuleUpdateRequest body = new MuteRuleUpdateRequest() .data( - new MuteRuleDataCreate() + new MuteRuleDataUpdate() .attributes( new MuteRuleAttributesCreate() .action(new MuteRuleAction().reason(MuteReason.FALSE_POSITIVE)) @@ -45,6 +45,7 @@ public static void main(String[] args) { Collections.singletonList( SecurityFindingType.MISCONFIGURATION)) .query("env:staging"))) + .id(VALID_MUTE_RULE_DATA_ID) .type(MuteRuleType.MUTE_RULES)); try { diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationSeverityModifierRule.java b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationSeverityModifierRule.java index 9367201491e..46352c8c348 100644 --- a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationSeverityModifierRule.java +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationSeverityModifierRule.java @@ -8,7 +8,7 @@ import com.datadog.api.client.v2.model.SecurityFindingType; import com.datadog.api.client.v2.model.SeverityModifierRuleAction; import com.datadog.api.client.v2.model.SeverityModifierRuleAttributesCreate; -import com.datadog.api.client.v2.model.SeverityModifierRuleDataCreate; +import com.datadog.api.client.v2.model.SeverityModifierRuleDataUpdate; import com.datadog.api.client.v2.model.SeverityModifierRuleResponse; import com.datadog.api.client.v2.model.SeverityModifierRuleSetAction; import com.datadog.api.client.v2.model.SeverityModifierRuleSetActionType; @@ -38,7 +38,7 @@ public static void main(String[] args) { SeverityModifierRuleUpdateRequest body = new SeverityModifierRuleUpdateRequest() .data( - new SeverityModifierRuleDataCreate() + new SeverityModifierRuleDataUpdate() .attributes( new SeverityModifierRuleAttributesCreate() .action( @@ -55,6 +55,7 @@ public static void main(String[] args) { Collections.singletonList( SecurityFindingType.MISCONFIGURATION)) .query("env:prod team:platform"))) + .id(VALID_SEVERITY_MODIFIER_RULE_DATA_ID) .type(SeverityModifierRuleType.SEVERITY_MODIFIER_RULES)); try { diff --git a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.java b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.java index ea67485ef71..e4350e3cd21 100644 --- a/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.java +++ b/examples/v2/security-monitoring/UpdateSecurityFindingsAutomationTicketCreationRule.java @@ -7,7 +7,7 @@ import com.datadog.api.client.v2.model.SecurityFindingType; import com.datadog.api.client.v2.model.TicketCreationRuleAction; import com.datadog.api.client.v2.model.TicketCreationRuleAttributesCreate; -import com.datadog.api.client.v2.model.TicketCreationRuleDataCreate; +import com.datadog.api.client.v2.model.TicketCreationRuleDataUpdate; import com.datadog.api.client.v2.model.TicketCreationRuleResponse; import com.datadog.api.client.v2.model.TicketCreationRuleType; import com.datadog.api.client.v2.model.TicketCreationRuleUpdateRequest; @@ -35,7 +35,7 @@ public static void main(String[] args) { TicketCreationRuleUpdateRequest body = new TicketCreationRuleUpdateRequest() .data( - new TicketCreationRuleDataCreate() + new TicketCreationRuleDataUpdate() .attributes( new TicketCreationRuleAttributesCreate() .action( @@ -52,6 +52,7 @@ public static void main(String[] args) { Collections.singletonList( SecurityFindingType.MISCONFIGURATION)) .query("env:staging"))) + .id(VALID_TICKET_CREATION_RULE_DATA_ID) .type(TicketCreationRuleType.TICKET_CREATION_RULES)); try { diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 31da385557d..1870c7db820 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1053,6 +1053,7 @@ public class ApiClient { put("v2.exportSecurityMonitoringTerraformResource", false); put("v2.getContentPacksStates", false); put("v2.getEntityContext", false); + put("v2.getEntityContextRecentlyUpdated", false); put("v2.getEntraIdAzureAppRegistrations", false); put("v2.getFinding", false); put("v2.getHistoricalJob", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java index e8a29f0ae00..cf9ee3def5c 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SecurityMonitoringApi.java @@ -31,10 +31,13 @@ import com.datadog.api.client.v2.model.DetachCaseRequest; import com.datadog.api.client.v2.model.DueDateRuleCreateRequest; import com.datadog.api.client.v2.model.DueDateRuleReorderRequest; +import com.datadog.api.client.v2.model.DueDateRuleReorderResponse; import com.datadog.api.client.v2.model.DueDateRuleResponse; import com.datadog.api.client.v2.model.DueDateRuleUpdateRequest; import com.datadog.api.client.v2.model.DueDateRulesResponse; +import com.datadog.api.client.v2.model.EntityContextEntityType; import com.datadog.api.client.v2.model.EntityContextResponse; +import com.datadog.api.client.v2.model.EntityContextRevisionsMode; import com.datadog.api.client.v2.model.Finding; import com.datadog.api.client.v2.model.FindingCaseResponse; import com.datadog.api.client.v2.model.FindingCaseResponseArray; @@ -75,6 +78,7 @@ import com.datadog.api.client.v2.model.MuteFindingsResponse; import com.datadog.api.client.v2.model.MuteRuleCreateRequest; import com.datadog.api.client.v2.model.MuteRuleReorderRequest; +import com.datadog.api.client.v2.model.MuteRuleReorderResponse; import com.datadog.api.client.v2.model.MuteRuleResponse; import com.datadog.api.client.v2.model.MuteRuleUpdateRequest; import com.datadog.api.client.v2.model.MuteRulesResponse; @@ -83,6 +87,7 @@ import com.datadog.api.client.v2.model.NotificationRuleResponse; import com.datadog.api.client.v2.model.NotificationRulesListResponse; import com.datadog.api.client.v2.model.PatchNotificationRuleParameters; +import com.datadog.api.client.v2.model.RecentlyUpdatedEntitiesResponse; import com.datadog.api.client.v2.model.RunHistoricalJobRequest; import com.datadog.api.client.v2.model.SBOMComponentLicenseType; import com.datadog.api.client.v2.model.SBOMFormat; @@ -178,6 +183,7 @@ import com.datadog.api.client.v2.model.SingleEntityContextResponse; import com.datadog.api.client.v2.model.TicketCreationRuleCreateRequest; import com.datadog.api.client.v2.model.TicketCreationRuleReorderRequest; +import com.datadog.api.client.v2.model.TicketCreationRuleReorderResponse; import com.datadog.api.client.v2.model.TicketCreationRuleResponse; import com.datadog.api.client.v2.model.TicketCreationRuleUpdateRequest; import com.datadog.api.client.v2.model.TicketCreationRulesResponse; @@ -11187,6 +11193,7 @@ public ApiResponse getCustomFrameworkWithHttpInfo( /** Manage optional parameters to getEntityContext. */ public static class GetEntityContextOptionalParameters { private String query; + private EntityContextEntityType entityType; private String from; private String to; private String asOf; @@ -11205,6 +11212,19 @@ public GetEntityContextOptionalParameters query(String query) { return this; } + /** + * Set entityType. + * + * @param entityType The type of entity to retrieve. Only siem_entity_identity is + * currently supported. Defaults to siem_entity_identity. (optional, default to + * "siem_entity_identity") + * @return GetEntityContextOptionalParameters + */ + public GetEntityContextOptionalParameters entityType(EntityContextEntityType entityType) { + this.entityType = entityType; + return this; + } + /** * Set from. * @@ -11357,6 +11377,7 @@ public ApiResponse getEntityContextWithHttpInfo( } Object localVarPostBody = null; String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; String from = parameters.from; String to = parameters.to; String asOf = parameters.asOf; @@ -11369,6 +11390,7 @@ public ApiResponse getEntityContextWithHttpInfo( Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); @@ -11417,6 +11439,7 @@ public CompletableFuture> getEntityContextWit } Object localVarPostBody = null; String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; String from = parameters.from; String to = parameters.to; String asOf = parameters.asOf; @@ -11429,6 +11452,7 @@ public CompletableFuture> getEntityContextWit Map localVarHeaderParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); @@ -11462,6 +11486,292 @@ public CompletableFuture> getEntityContextWit new GenericType() {}); } + /** Manage optional parameters to getEntityContextRecentlyUpdated. */ + public static class GetEntityContextRecentlyUpdatedOptionalParameters { + private String query; + private EntityContextEntityType entityType; + private String from; + private String to; + private Long limit; + private EntityContextRevisionsMode revisions; + + /** + * Set query. + * + * @param query A free-text query (for example, an email address or principal ID) used to filter + * the entities returned. (optional) + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set entityType. + * + * @param entityType The type of entity to retrieve. Only siem_entity_identity is + * currently supported. Defaults to siem_entity_identity. (optional, default to + * "siem_entity_identity") + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters entityType( + EntityContextEntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Set from. + * + * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time + * (for example, now-7d). Defaults to now-7d. (optional, default + * to "now-7d") + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters from(String from) { + this.from = from; + return this; + } + + /** + * Set to. + * + * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for + * example, now). Defaults to now. Entities are ranked by their + * most recent revision within [from, to]. (optional, default to "now") + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters to(String to) { + this.to = to; + return this; + } + + /** + * Set limit. + * + * @param limit The number of entities to return. Must be between 1 and 100. (optional, default + * to 50) + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Set revisions. + * + * @param revisions Which revisions to return for each entity: latest returns only + * the latest revision of each entity as of to, and all returns + * every revision in the requested time range. (optional, default to "latest") + * @return GetEntityContextRecentlyUpdatedOptionalParameters + */ + public GetEntityContextRecentlyUpdatedOptionalParameters revisions( + EntityContextRevisionsMode revisions) { + this.revisions = revisions; + return this; + } + } + + /** + * Get recently updated entity context. + * + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. + * + * @return RecentlyUpdatedEntitiesResponse + * @throws ApiException if fails to make API call + */ + public RecentlyUpdatedEntitiesResponse getEntityContextRecentlyUpdated() throws ApiException { + return getEntityContextRecentlyUpdatedWithHttpInfo( + new GetEntityContextRecentlyUpdatedOptionalParameters()) + .getData(); + } + + /** + * Get recently updated entity context. + * + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfoAsync}. + * + * @return CompletableFuture<RecentlyUpdatedEntitiesResponse> + */ + public CompletableFuture getEntityContextRecentlyUpdatedAsync() { + return getEntityContextRecentlyUpdatedWithHttpInfoAsync( + new GetEntityContextRecentlyUpdatedOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get recently updated entity context. + * + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return RecentlyUpdatedEntitiesResponse + * @throws ApiException if fails to make API call + */ + public RecentlyUpdatedEntitiesResponse getEntityContextRecentlyUpdated( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) throws ApiException { + return getEntityContextRecentlyUpdatedWithHttpInfo(parameters).getData(); + } + + /** + * Get recently updated entity context. + * + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RecentlyUpdatedEntitiesResponse> + */ + public CompletableFuture getEntityContextRecentlyUpdatedAsync( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) { + return getEntityContextRecentlyUpdatedWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the entities with the most recent updates in the Cloud SIEM entity context store. Entities + * are ranked by the time of their most recent revision in the requested time range, and the top + * limit entities are returned in that order. This endpoint is not paginated. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<RecentlyUpdatedEntitiesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse getEntityContextRecentlyUpdatedWithHttpInfo( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getEntityContextRecentlyUpdated"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + Long limit = parameters.limit; + EntityContextRevisionsMode revisions = parameters.revisions; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/entity_context/recently_updated"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "revisions", revisions)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getEntityContextRecentlyUpdated", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get recently updated entity context. + * + *

See {@link #getEntityContextRecentlyUpdatedWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<RecentlyUpdatedEntitiesResponse>> + */ + public CompletableFuture> + getEntityContextRecentlyUpdatedWithHttpInfoAsync( + GetEntityContextRecentlyUpdatedOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getEntityContextRecentlyUpdated"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String query = parameters.query; + EntityContextEntityType entityType = parameters.entityType; + String from = parameters.from; + String to = parameters.to; + Long limit = parameters.limit; + EntityContextRevisionsMode revisions = parameters.revisions; + // create path and map variables + String localVarPath = "/api/v2/security_monitoring/entity_context/recently_updated"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "revisions", revisions)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getEntityContextRecentlyUpdated", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get Entra ID Azure App Registration prerequisites. * @@ -16788,10 +17098,24 @@ public ApiResponse getSignalNotificationRulesWith /** Manage optional parameters to getSingleEntityContext. */ public static class GetSingleEntityContextOptionalParameters { + private EntityContextEntityType entityType; private String from; private String to; private String asOf; + /** + * Set entityType. + * + * @param entityType The type of entity to retrieve. Only siem_entity_identity is + * currently supported. Defaults to siem_entity_identity. (optional, default to + * "siem_entity_identity") + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters entityType(EntityContextEntityType entityType) { + this.entityType = entityType; + return this; + } + /** * Set from. * @@ -16934,6 +17258,7 @@ public ApiResponse getSingleEntityContextWithHttpIn throw new ApiException( 400, "Missing the required parameter 'id' when calling getSingleEntityContext"); } + EntityContextEntityType entityType = parameters.entityType; String from = parameters.from; String to = parameters.to; String asOf = parameters.asOf; @@ -16945,6 +17270,7 @@ public ApiResponse getSingleEntityContextWithHttpIn List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); @@ -17003,6 +17329,7 @@ public ApiResponse getSingleEntityContextWithHttpIn 400, "Missing the required parameter 'id' when calling getSingleEntityContext")); return result; } + EntityContextEntityType entityType = parameters.entityType; String from = parameters.from; String to = parameters.to; String asOf = parameters.asOf; @@ -17014,6 +17341,7 @@ public ApiResponse getSingleEntityContextWithHttpIn List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "entity_type", entityType)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); @@ -26534,10 +26862,10 @@ public ApiResponse patchVulnerabilityNotificationRuleW *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * * @param body (required) - * @return DueDateRuleReorderRequest + * @return DueDateRuleReorderResponse * @throws ApiException if fails to make API call */ - public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( + public DueDateRuleReorderResponse reorderSecurityFindingsAutomationDueDateRules( DueDateRuleReorderRequest body) throws ApiException { return reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo(body).getData(); } @@ -26548,9 +26876,9 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<DueDateRuleReorderRequest> + * @return CompletableFuture<DueDateRuleReorderResponse> */ - public CompletableFuture + public CompletableFuture reorderSecurityFindingsAutomationDueDateRulesAsync(DueDateRuleReorderRequest body) { return reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync(body) .thenApply( @@ -26563,7 +26891,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( * Reorder the list of due date rules for the current organization. * * @param body (required) - * @return ApiResponse<DueDateRuleReorderRequest> + * @return ApiResponse<DueDateRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -26576,7 +26904,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( * *
429 Too many requests -
*/ - public ApiResponse + public ApiResponse reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo(DueDateRuleReorderRequest body) throws ApiException { // Check if unstable operation is enabled @@ -26617,7 +26945,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -26626,9 +26954,9 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( *

See {@link #reorderSecurityFindingsAutomationDueDateRulesWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<DueDateRuleReorderRequest>> + * @return CompletableFuture<ApiResponse<DueDateRuleReorderResponse>> */ - public CompletableFuture> + public CompletableFuture> reorderSecurityFindingsAutomationDueDateRulesWithHttpInfoAsync( DueDateRuleReorderRequest body) { // Check if unstable operation is enabled @@ -26636,7 +26964,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -26645,7 +26973,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, @@ -26670,7 +26998,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -26682,7 +27010,7 @@ public DueDateRuleReorderRequest reorderSecurityFindingsAutomationDueDateRules( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -26847,10 +27175,10 @@ public InboxRuleReorderResponse reorderSecurityFindingsAutomationInboxRules( *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfo}. * * @param body (required) - * @return MuteRuleReorderRequest + * @return MuteRuleReorderResponse * @throws ApiException if fails to make API call */ - public MuteRuleReorderRequest reorderSecurityFindingsAutomationMuteRules( + public MuteRuleReorderResponse reorderSecurityFindingsAutomationMuteRules( MuteRuleReorderRequest body) throws ApiException { return reorderSecurityFindingsAutomationMuteRulesWithHttpInfo(body).getData(); } @@ -26861,9 +27189,9 @@ public MuteRuleReorderRequest reorderSecurityFindingsAutomationMuteRules( *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<MuteRuleReorderRequest> + * @return CompletableFuture<MuteRuleReorderResponse> */ - public CompletableFuture reorderSecurityFindingsAutomationMuteRulesAsync( + public CompletableFuture reorderSecurityFindingsAutomationMuteRulesAsync( MuteRuleReorderRequest body) { return reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(body) .thenApply( @@ -26876,7 +27204,7 @@ public CompletableFuture reorderSecurityFindingsAutomati * Reorder the list of mute rules for the current organization. * * @param body (required) - * @return ApiResponse<MuteRuleReorderRequest> + * @return ApiResponse<MuteRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -26889,8 +27217,9 @@ public CompletableFuture reorderSecurityFindingsAutomati * *
429 Too many requests -
*/ - public ApiResponse reorderSecurityFindingsAutomationMuteRulesWithHttpInfo( - MuteRuleReorderRequest body) throws ApiException { + public ApiResponse + reorderSecurityFindingsAutomationMuteRulesWithHttpInfo(MuteRuleReorderRequest body) + throws ApiException { // Check if unstable operation is enabled String operationId = "reorderSecurityFindingsAutomationMuteRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -26929,7 +27258,7 @@ public ApiResponse reorderSecurityFindingsAutomationMute localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -26938,16 +27267,16 @@ public ApiResponse reorderSecurityFindingsAutomationMute *

See {@link #reorderSecurityFindingsAutomationMuteRulesWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<MuteRuleReorderRequest>> + * @return CompletableFuture<ApiResponse<MuteRuleReorderResponse>> */ - public CompletableFuture> + public CompletableFuture> reorderSecurityFindingsAutomationMuteRulesWithHttpInfoAsync(MuteRuleReorderRequest body) { // Check if unstable operation is enabled String operationId = "reorderSecurityFindingsAutomationMuteRules"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -26956,7 +27285,7 @@ public ApiResponse reorderSecurityFindingsAutomationMute // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, @@ -26981,7 +27310,7 @@ public ApiResponse reorderSecurityFindingsAutomationMute new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -26993,7 +27322,7 @@ public ApiResponse reorderSecurityFindingsAutomationMute localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -27163,10 +27492,10 @@ public SeverityModifierRuleReorderResponse reorderSecurityFindingsAutomationSeve *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * * @param body (required) - * @return TicketCreationRuleReorderRequest + * @return TicketCreationRuleReorderResponse * @throws ApiException if fails to make API call */ - public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketCreationRules( + public TicketCreationRuleReorderResponse reorderSecurityFindingsAutomationTicketCreationRules( TicketCreationRuleReorderRequest body) throws ApiException { return reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo(body).getData(); } @@ -27177,9 +27506,9 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<TicketCreationRuleReorderRequest> + * @return CompletableFuture<TicketCreationRuleReorderResponse> */ - public CompletableFuture + public CompletableFuture reorderSecurityFindingsAutomationTicketCreationRulesAsync( TicketCreationRuleReorderRequest body) { return reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync(body) @@ -27193,7 +27522,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC * Reorder the list of ticket creation rules for the current organization. * * @param body (required) - * @return ApiResponse<TicketCreationRuleReorderRequest> + * @return ApiResponse<TicketCreationRuleReorderResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -27206,7 +27535,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC * *
429 Too many requests -
*/ - public ApiResponse + public ApiResponse reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo( TicketCreationRuleReorderRequest body) throws ApiException { // Check if unstable operation is enabled @@ -27247,7 +27576,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -27256,9 +27585,9 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC *

See {@link #reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<TicketCreationRuleReorderRequest>> + * @return CompletableFuture<ApiResponse<TicketCreationRuleReorderResponse>> */ - public CompletableFuture> + public CompletableFuture> reorderSecurityFindingsAutomationTicketCreationRulesWithHttpInfoAsync( TicketCreationRuleReorderRequest body) { // Check if unstable operation is enabled @@ -27266,7 +27595,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -27276,7 +27605,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( @@ -27302,7 +27631,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -27315,7 +27644,7 @@ public TicketCreationRuleReorderRequest reorderSecurityFindingsAutomationTicketC localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** diff --git a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleCreateRequest.java index 390216c21d4..272bcecd5ab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleCreateRequest.java @@ -42,7 +42,7 @@ public DueDateRuleCreateRequest data(DueDateRuleDataCreate data) { } /** - * The data object for a due date rule create or update request. + * The data object for a due date rule create request. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataCreate.java b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataCreate.java index cde45658c19..b68fc1e4c44 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataCreate.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The data object for a due date rule create or update request. */ +/** The data object for a due date rule create request. */ @JsonPropertyOrder({ DueDateRuleDataCreate.JSON_PROPERTY_ATTRIBUTES, DueDateRuleDataCreate.JSON_PROPERTY_TYPE diff --git a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataUpdate.java b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataUpdate.java new file mode 100644 index 00000000000..542c5abead1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleDataUpdate.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * The data object for a due date rule update request. The id must match the + * rule_id path parameter. + */ +@JsonPropertyOrder({ + DueDateRuleDataUpdate.JSON_PROPERTY_ATTRIBUTES, + DueDateRuleDataUpdate.JSON_PROPERTY_ID, + DueDateRuleDataUpdate.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DueDateRuleDataUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DueDateRuleAttributesCreate attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DueDateRuleType type; + + public DueDateRuleDataUpdate() {} + + @JsonCreator + public DueDateRuleDataUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DueDateRuleAttributesCreate attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) DueDateRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DueDateRuleDataUpdate attributes(DueDateRuleAttributesCreate attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a due date rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DueDateRuleAttributesCreate getAttributes() { + return attributes; + } + + public void setAttributes(DueDateRuleAttributesCreate attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public DueDateRuleDataUpdate id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the due date rule to update. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public DueDateRuleDataUpdate type(DueDateRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for due date rules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DueDateRuleType getType() { + return type; + } + + public void setType(DueDateRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DueDateRuleDataUpdate + */ + @JsonAnySetter + public DueDateRuleDataUpdate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DueDateRuleDataUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DueDateRuleDataUpdate dueDateRuleDataUpdate = (DueDateRuleDataUpdate) o; + return Objects.equals(this.attributes, dueDateRuleDataUpdate.attributes) + && Objects.equals(this.id, dueDateRuleDataUpdate.id) + && Objects.equals(this.type, dueDateRuleDataUpdate.type) + && Objects.equals(this.additionalProperties, dueDateRuleDataUpdate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DueDateRuleDataUpdate {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderRequest.java b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderRequest.java index 796f6cb1259..63da4b1d799 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** The body of the due date rule reorder request. */ +/** The body of a due date rule reorder request. */ @JsonPropertyOrder({DueDateRuleReorderRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderResponse.java b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderResponse.java new file mode 100644 index 00000000000..eca36a0b5c4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleReorderResponse.java @@ -0,0 +1,164 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response of a due date rule reorder request. */ +@JsonPropertyOrder({DueDateRuleReorderResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DueDateRuleReorderResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public DueDateRuleReorderResponse() {} + + @JsonCreator + public DueDateRuleReorderResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (DueDateRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + } + + public DueDateRuleReorderResponse data(List data) { + this.data = data; + for (DueDateRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DueDateRuleReorderResponse addDataItem(DueDateRuleReorderItem dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ordered list of all due date rules. Every rule must be included. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (DueDateRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DueDateRuleReorderResponse + */ + @JsonAnySetter + public DueDateRuleReorderResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DueDateRuleReorderResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DueDateRuleReorderResponse dueDateRuleReorderResponse = (DueDateRuleReorderResponse) o; + return Objects.equals(this.data, dueDateRuleReorderResponse.data) + && Objects.equals( + this.additionalProperties, dueDateRuleReorderResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DueDateRuleReorderResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleUpdateRequest.java index 468951236c1..f6604d51d93 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DueDateRuleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/DueDateRuleUpdateRequest.java @@ -24,35 +24,36 @@ public class DueDateRuleUpdateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private DueDateRuleDataCreate data; + private DueDateRuleDataUpdate data; public DueDateRuleUpdateRequest() {} @JsonCreator public DueDateRuleUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DueDateRuleDataCreate data) { + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DueDateRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; } - public DueDateRuleUpdateRequest data(DueDateRuleDataCreate data) { + public DueDateRuleUpdateRequest data(DueDateRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The data object for a due date rule create or update request. + * The data object for a due date rule update request. The id must match the + * rule_id path parameter. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public DueDateRuleDataCreate getData() { + public DueDateRuleDataUpdate getData() { return data; } - public void setData(DueDateRuleDataCreate data) { + public void setData(DueDateRuleDataUpdate data) { this.data = data; if (data != null) { this.unparsed |= data.unparsed; diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityContextEntityType.java b/src/main/java/com/datadog/api/client/v2/model/EntityContextEntityType.java new file mode 100644 index 00000000000..b2d5da62e06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityContextEntityType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of entity to retrieve. Only siem_entity_identity is currently supported. + */ +@JsonSerialize(using = EntityContextEntityType.EntityContextEntityTypeSerializer.class) +public class EntityContextEntityType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("siem_entity_identity")); + + public static final EntityContextEntityType SIEM_ENTITY_IDENTITY = + new EntityContextEntityType("siem_entity_identity"); + + EntityContextEntityType(String value) { + super(value, allowedValues); + } + + public static class EntityContextEntityTypeSerializer + extends StdSerializer { + public EntityContextEntityTypeSerializer(Class t) { + super(t); + } + + public EntityContextEntityTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityContextEntityType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityContextEntityType fromValue(String value) { + return new EntityContextEntityType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityContextRevisionsMode.java b/src/main/java/com/datadog/api/client/v2/model/EntityContextRevisionsMode.java new file mode 100644 index 00000000000..f728825d84d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityContextRevisionsMode.java @@ -0,0 +1,61 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Which revisions to return for each entity: latest returns only the latest revision + * of each entity as of to, and all returns every revision in the + * requested time range. + */ +@JsonSerialize(using = EntityContextRevisionsMode.EntityContextRevisionsModeSerializer.class) +public class EntityContextRevisionsMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("latest", "all")); + + public static final EntityContextRevisionsMode LATEST = new EntityContextRevisionsMode("latest"); + public static final EntityContextRevisionsMode ALL = new EntityContextRevisionsMode("all"); + + EntityContextRevisionsMode(String value) { + super(value, allowedValues); + } + + public static class EntityContextRevisionsModeSerializer + extends StdSerializer { + public EntityContextRevisionsModeSerializer(Class t) { + super(t); + } + + public EntityContextRevisionsModeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityContextRevisionsMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityContextRevisionsMode fromValue(String value) { + return new EntityContextRevisionsMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MuteRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MuteRuleCreateRequest.java index f12fe57e3c8..3733ceab2c5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MuteRuleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MuteRuleCreateRequest.java @@ -42,7 +42,7 @@ public MuteRuleCreateRequest data(MuteRuleDataCreate data) { } /** - * The data object for a mute rule create or update request. + * The data object for a mute rule create request. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataCreate.java b/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataCreate.java index 959827cc8dd..464bcd25210 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataCreate.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The data object for a mute rule create or update request. */ +/** The data object for a mute rule create request. */ @JsonPropertyOrder({ MuteRuleDataCreate.JSON_PROPERTY_ATTRIBUTES, MuteRuleDataCreate.JSON_PROPERTY_TYPE diff --git a/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataUpdate.java b/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataUpdate.java new file mode 100644 index 00000000000..d2591967973 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MuteRuleDataUpdate.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * The data object for a mute rule update request. The id must match the rule_id + * path parameter. + */ +@JsonPropertyOrder({ + MuteRuleDataUpdate.JSON_PROPERTY_ATTRIBUTES, + MuteRuleDataUpdate.JSON_PROPERTY_ID, + MuteRuleDataUpdate.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MuteRuleDataUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private MuteRuleAttributesCreate attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private MuteRuleType type; + + public MuteRuleDataUpdate() {} + + @JsonCreator + public MuteRuleDataUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + MuteRuleAttributesCreate attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MuteRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public MuteRuleDataUpdate attributes(MuteRuleAttributesCreate attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a mute rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MuteRuleAttributesCreate getAttributes() { + return attributes; + } + + public void setAttributes(MuteRuleAttributesCreate attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public MuteRuleDataUpdate id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the mute rule to update. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public MuteRuleDataUpdate type(MuteRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for mute rules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MuteRuleType getType() { + return type; + } + + public void setType(MuteRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MuteRuleDataUpdate + */ + @JsonAnySetter + public MuteRuleDataUpdate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MuteRuleDataUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MuteRuleDataUpdate muteRuleDataUpdate = (MuteRuleDataUpdate) o; + return Objects.equals(this.attributes, muteRuleDataUpdate.attributes) + && Objects.equals(this.id, muteRuleDataUpdate.id) + && Objects.equals(this.type, muteRuleDataUpdate.type) + && Objects.equals(this.additionalProperties, muteRuleDataUpdate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MuteRuleDataUpdate {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderRequest.java b/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderRequest.java index e2cc20f1759..9f685bf3cc0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** The body of the mute rule reorder request. */ +/** The body of a mute rule reorder request. */ @JsonPropertyOrder({MuteRuleReorderRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderResponse.java b/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderResponse.java new file mode 100644 index 00000000000..87b5beff1e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MuteRuleReorderResponse.java @@ -0,0 +1,162 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response of a mute rule reorder request. */ +@JsonPropertyOrder({MuteRuleReorderResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MuteRuleReorderResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public MuteRuleReorderResponse() {} + + @JsonCreator + public MuteRuleReorderResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + for (MuteRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + } + + public MuteRuleReorderResponse data(List data) { + this.data = data; + for (MuteRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public MuteRuleReorderResponse addDataItem(MuteRuleReorderItem dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ordered list of all mute rules. Every rule must be included. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (MuteRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MuteRuleReorderResponse + */ + @JsonAnySetter + public MuteRuleReorderResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MuteRuleReorderResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MuteRuleReorderResponse muteRuleReorderResponse = (MuteRuleReorderResponse) o; + return Objects.equals(this.data, muteRuleReorderResponse.data) + && Objects.equals(this.additionalProperties, muteRuleReorderResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MuteRuleReorderResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MuteRuleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MuteRuleUpdateRequest.java index 947acf7db09..b065f716c0a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/MuteRuleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/MuteRuleUpdateRequest.java @@ -24,35 +24,36 @@ public class MuteRuleUpdateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private MuteRuleDataCreate data; + private MuteRuleDataUpdate data; public MuteRuleUpdateRequest() {} @JsonCreator public MuteRuleUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) MuteRuleDataCreate data) { + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) MuteRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; } - public MuteRuleUpdateRequest data(MuteRuleDataCreate data) { + public MuteRuleUpdateRequest data(MuteRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The data object for a mute rule create or update request. + * The data object for a mute rule update request. The id must match the + * rule_id path parameter. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public MuteRuleDataCreate getData() { + public MuteRuleDataUpdate getData() { return data; } - public void setData(MuteRuleDataCreate data) { + public void setData(MuteRuleDataUpdate data) { this.data = data; if (data != null) { this.unparsed |= data.unparsed; diff --git a/src/main/java/com/datadog/api/client/v2/model/RecentlyUpdatedEntitiesResponse.java b/src/main/java/com/datadog/api/client/v2/model/RecentlyUpdatedEntitiesResponse.java new file mode 100644 index 00000000000..11f9c66eecf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RecentlyUpdatedEntitiesResponse.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Response from the recently updated entities endpoint, containing the entities with the most + * recent updates in the requested time range, ordered from most to least recently updated. + */ +@JsonPropertyOrder({RecentlyUpdatedEntitiesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RecentlyUpdatedEntitiesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public RecentlyUpdatedEntitiesResponse() {} + + @JsonCreator + public RecentlyUpdatedEntitiesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + for (EntityContextEntity item : data) { + this.unparsed |= item.unparsed; + } + } + + public RecentlyUpdatedEntitiesResponse data(List data) { + this.data = data; + for (EntityContextEntity item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public RecentlyUpdatedEntitiesResponse addDataItem(EntityContextEntity dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of entities with the most recent updates, ordered from most to least recently updated. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (EntityContextEntity item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RecentlyUpdatedEntitiesResponse + */ + @JsonAnySetter + public RecentlyUpdatedEntitiesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RecentlyUpdatedEntitiesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecentlyUpdatedEntitiesResponse recentlyUpdatedEntitiesResponse = + (RecentlyUpdatedEntitiesResponse) o; + return Objects.equals(this.data, recentlyUpdatedEntitiesResponse.data) + && Objects.equals( + this.additionalProperties, recentlyUpdatedEntitiesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecentlyUpdatedEntitiesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleCreateRequest.java index 2371d21fd88..c68dd0f15db 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleCreateRequest.java @@ -43,7 +43,7 @@ public SeverityModifierRuleCreateRequest data(SeverityModifierRuleDataCreate dat } /** - * The data object for a severity modifier rule create or update request. + * The data object for a severity modifier rule create request. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataCreate.java b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataCreate.java index 9b8716ca704..135e0c1c727 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataCreate.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The data object for a severity modifier rule create or update request. */ +/** The data object for a severity modifier rule create request. */ @JsonPropertyOrder({ SeverityModifierRuleDataCreate.JSON_PROPERTY_ATTRIBUTES, SeverityModifierRuleDataCreate.JSON_PROPERTY_TYPE diff --git a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataUpdate.java b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataUpdate.java new file mode 100644 index 00000000000..fe3c2e09604 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleDataUpdate.java @@ -0,0 +1,219 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * The data object for a severity modifier rule update request. The id must match the + * rule_id path parameter. + */ +@JsonPropertyOrder({ + SeverityModifierRuleDataUpdate.JSON_PROPERTY_ATTRIBUTES, + SeverityModifierRuleDataUpdate.JSON_PROPERTY_ID, + SeverityModifierRuleDataUpdate.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SeverityModifierRuleDataUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SeverityModifierRuleAttributesCreate attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SeverityModifierRuleType type; + + public SeverityModifierRuleDataUpdate() {} + + @JsonCreator + public SeverityModifierRuleDataUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SeverityModifierRuleAttributesCreate attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SeverityModifierRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SeverityModifierRuleDataUpdate attributes( + SeverityModifierRuleAttributesCreate attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a severity modifier rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SeverityModifierRuleAttributesCreate getAttributes() { + return attributes; + } + + public void setAttributes(SeverityModifierRuleAttributesCreate attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public SeverityModifierRuleDataUpdate id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the severity modifier rule to update. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public SeverityModifierRuleDataUpdate type(SeverityModifierRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for severity modifier rules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SeverityModifierRuleType getType() { + return type; + } + + public void setType(SeverityModifierRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SeverityModifierRuleDataUpdate + */ + @JsonAnySetter + public SeverityModifierRuleDataUpdate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SeverityModifierRuleDataUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SeverityModifierRuleDataUpdate severityModifierRuleDataUpdate = + (SeverityModifierRuleDataUpdate) o; + return Objects.equals(this.attributes, severityModifierRuleDataUpdate.attributes) + && Objects.equals(this.id, severityModifierRuleDataUpdate.id) + && Objects.equals(this.type, severityModifierRuleDataUpdate.type) + && Objects.equals( + this.additionalProperties, severityModifierRuleDataUpdate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SeverityModifierRuleDataUpdate {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleUpdateRequest.java index 0beef3bee51..97a2ea8a08a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/SeverityModifierRuleUpdateRequest.java @@ -24,36 +24,37 @@ public class SeverityModifierRuleUpdateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private SeverityModifierRuleDataCreate data; + private SeverityModifierRuleDataUpdate data; public SeverityModifierRuleUpdateRequest() {} @JsonCreator public SeverityModifierRuleUpdateRequest( @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - SeverityModifierRuleDataCreate data) { + SeverityModifierRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; } - public SeverityModifierRuleUpdateRequest data(SeverityModifierRuleDataCreate data) { + public SeverityModifierRuleUpdateRequest data(SeverityModifierRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The data object for a severity modifier rule create or update request. + * The data object for a severity modifier rule update request. The id must match the + * rule_id path parameter. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SeverityModifierRuleDataCreate getData() { + public SeverityModifierRuleDataUpdate getData() { return data; } - public void setData(SeverityModifierRuleDataCreate data) { + public void setData(SeverityModifierRuleDataUpdate data) { this.data = data; if (data != null) { this.unparsed |= data.unparsed; diff --git a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleCreateRequest.java index 0a9132bea2f..b403f6a23e8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleCreateRequest.java @@ -43,7 +43,7 @@ public TicketCreationRuleCreateRequest data(TicketCreationRuleDataCreate data) { } /** - * The data object for a ticket creation rule create or update request. + * The data object for a ticket creation rule create request. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataCreate.java b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataCreate.java index 129ac59bf71..3af46fa2829 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataCreate.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The data object for a ticket creation rule create or update request. */ +/** The data object for a ticket creation rule create request. */ @JsonPropertyOrder({ TicketCreationRuleDataCreate.JSON_PROPERTY_ATTRIBUTES, TicketCreationRuleDataCreate.JSON_PROPERTY_TYPE diff --git a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataUpdate.java b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataUpdate.java new file mode 100644 index 00000000000..313410a1fd1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleDataUpdate.java @@ -0,0 +1,217 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * The data object for a ticket creation rule update request. The id must match the + * rule_id path parameter. + */ +@JsonPropertyOrder({ + TicketCreationRuleDataUpdate.JSON_PROPERTY_ATTRIBUTES, + TicketCreationRuleDataUpdate.JSON_PROPERTY_ID, + TicketCreationRuleDataUpdate.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TicketCreationRuleDataUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TicketCreationRuleAttributesCreate attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TicketCreationRuleType type; + + public TicketCreationRuleDataUpdate() {} + + @JsonCreator + public TicketCreationRuleDataUpdate( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TicketCreationRuleAttributesCreate attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TicketCreationRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TicketCreationRuleDataUpdate attributes(TicketCreationRuleAttributesCreate attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating a ticket creation rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TicketCreationRuleAttributesCreate getAttributes() { + return attributes; + } + + public void setAttributes(TicketCreationRuleAttributesCreate attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public TicketCreationRuleDataUpdate id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the ticket creation rule to update. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public TicketCreationRuleDataUpdate type(TicketCreationRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for ticket creation rules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TicketCreationRuleType getType() { + return type; + } + + public void setType(TicketCreationRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TicketCreationRuleDataUpdate + */ + @JsonAnySetter + public TicketCreationRuleDataUpdate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TicketCreationRuleDataUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TicketCreationRuleDataUpdate ticketCreationRuleDataUpdate = (TicketCreationRuleDataUpdate) o; + return Objects.equals(this.attributes, ticketCreationRuleDataUpdate.attributes) + && Objects.equals(this.id, ticketCreationRuleDataUpdate.id) + && Objects.equals(this.type, ticketCreationRuleDataUpdate.type) + && Objects.equals( + this.additionalProperties, ticketCreationRuleDataUpdate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TicketCreationRuleDataUpdate {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderRequest.java b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderRequest.java index f4d0d62b89e..f5f08331501 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** The body of the ticket creation rule reorder request. */ +/** The body of a ticket creation rule reorder request. */ @JsonPropertyOrder({TicketCreationRuleReorderRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderResponse.java b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderResponse.java new file mode 100644 index 00000000000..7067adfe67f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleReorderResponse.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response of a ticket creation rule reorder request. */ +@JsonPropertyOrder({TicketCreationRuleReorderResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TicketCreationRuleReorderResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public TicketCreationRuleReorderResponse() {} + + @JsonCreator + public TicketCreationRuleReorderResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (TicketCreationRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + } + + public TicketCreationRuleReorderResponse data(List data) { + this.data = data; + for (TicketCreationRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TicketCreationRuleReorderResponse addDataItem(TicketCreationRuleReorderItem dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The ordered list of all ticket creation rules. Every rule must be included. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (TicketCreationRuleReorderItem item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TicketCreationRuleReorderResponse + */ + @JsonAnySetter + public TicketCreationRuleReorderResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TicketCreationRuleReorderResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TicketCreationRuleReorderResponse ticketCreationRuleReorderResponse = + (TicketCreationRuleReorderResponse) o; + return Objects.equals(this.data, ticketCreationRuleReorderResponse.data) + && Objects.equals( + this.additionalProperties, ticketCreationRuleReorderResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TicketCreationRuleReorderResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleUpdateRequest.java index b2424b6e588..3ce0c83087d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TicketCreationRuleUpdateRequest.java @@ -24,36 +24,37 @@ public class TicketCreationRuleUpdateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private TicketCreationRuleDataCreate data; + private TicketCreationRuleDataUpdate data; public TicketCreationRuleUpdateRequest() {} @JsonCreator public TicketCreationRuleUpdateRequest( @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - TicketCreationRuleDataCreate data) { + TicketCreationRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; } - public TicketCreationRuleUpdateRequest data(TicketCreationRuleDataCreate data) { + public TicketCreationRuleUpdateRequest data(TicketCreationRuleDataUpdate data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The data object for a ticket creation rule create or update request. + * The data object for a ticket creation rule update request. The id must match the + * rule_id path parameter. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TicketCreationRuleDataCreate getData() { + public TicketCreationRuleDataUpdate getData() { return data; } - public void setData(TicketCreationRuleDataCreate data) { + public void setData(TicketCreationRuleDataUpdate data) { this.data = data; if (data != null) { this.unparsed |= data.unparsed; diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index a1781b2257a..4a3d03be1c6 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -1049,7 +1049,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Create an inbox rule returns "Successfully created the inbox rule" response Given operation "CreateSecurityFindingsAutomationInboxRule" enabled And new "CreateSecurityFindingsAutomationInboxRule" request @@ -1493,7 +1493,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Delete an inbox rule returns "Successfully deleted the inbox rule" response Given operation "DeleteSecurityFindingsAutomationInboxRule" enabled And there is a valid "valid_inbox_rule" in the system @@ -1531,7 +1531,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Disable a default inbox rule returns "Successfully disabled the default inbox rule" response Given operation "DisableSecurityFindingsAutomationDefaultInboxRule" enabled And new "DisableSecurityFindingsAutomationDefaultInboxRule" request @@ -1550,7 +1550,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Enable a default inbox rule returns "Successfully enabled the default inbox rule" response Given operation "EnableSecurityFindingsAutomationDefaultInboxRule" enabled And new "EnableSecurityFindingsAutomationDefaultInboxRule" request @@ -1784,7 +1784,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Get a default inbox rule returns "Successfully retrieved the default inbox rule" response Given operation "GetSecurityFindingsAutomationDefaultInboxRule" enabled And new "GetSecurityFindingsAutomationDefaultInboxRule" request @@ -2159,7 +2159,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Get all default inbox rules returns "Successfully retrieved the list of default inbox rules" response Given operation "ListSecurityFindingsAutomationDefaultInboxRules" enabled And new "ListSecurityFindingsAutomationDefaultInboxRules" request @@ -2176,7 +2176,7 @@ Feature: Security Monitoring Then the response status is 200 Successfully retrieved the list of due date rules And the response "data" has item with field "id" with value "{{ valid_due_date_rule.data.id }}" - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Get all inbox rules returns "Successfully retrieved the list of inbox rules" response Given operation "ListSecurityFindingsAutomationInboxRules" enabled And there is a valid "valid_inbox_rule" in the system @@ -2291,7 +2291,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Get an inbox rule returns "Successfully retrieved the inbox rule" response Given operation "GetSecurityFindingsAutomationInboxRule" enabled And there is a valid "valid_inbox_rule" in the system @@ -2505,6 +2505,20 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/cloud-siem + Scenario: Get recently updated entity context returns "Bad Request" response + Given operation "GetEntityContextRecentlyUpdated" enabled + And new "GetEntityContextRecentlyUpdated" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-siem + Scenario: Get recently updated entity context returns "OK" response + Given operation "GetEntityContextRecentlyUpdated" enabled + And new "GetEntityContextRecentlyUpdated" request + When the request is sent + Then the response status is 200 OK + @skip-go @skip-java @skip-ruby @team:DataDog/cloud-siem Scenario: Get rule version history returns "OK" response Given operation "GetRuleVersionHistory" enabled @@ -3166,7 +3180,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Reorder inbox rules returns "Successfully reordered the inbox rules" response Given operation "ReorderSecurityFindingsAutomationInboxRules" enabled And there is a valid "valid_inbox_rule" in the system @@ -3608,7 +3622,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled And new "UpdateSecurityFindingsAutomationDueDateRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "due_date_rules"}} When the request is sent Then the response status is 400 Bad Request @@ -3617,7 +3631,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled And new "UpdateSecurityFindingsAutomationDueDateRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "due_date_rules"}} When the request is sent Then the response status is 404 Not Found @@ -3627,7 +3641,7 @@ Feature: Security Monitoring And there is a valid "valid_due_date_rule" in the system And new "UpdateSecurityFindingsAutomationDueDateRule" request And request contains "rule_id" parameter from "valid_due_date_rule.data.id" - And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 14, "severity": "critical"}], "due_from": "first_seen"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "due_date_rules"}} + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 14, "severity": "critical"}], "due_from": "first_seen"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "id": "{{ valid_due_date_rule.data.id }}", "type": "due_date_rules"}} When the request is sent Then the response status is 200 Successfully updated the due date rule And the response "data.id" is equal to "{{ valid_due_date_rule.data.id }}" @@ -3638,7 +3652,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationDueDateRule" enabled And new "UpdateSecurityFindingsAutomationDueDateRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "due_date_rules"}} + And body with value {"data": {"attributes": {"action": {"due_days_per_severity": [{"due_in_days": 7, "severity": "critical"}], "due_from": "first_seen", "reason_description": "Applied for production findings only"}, "enabled": true, "name": "Critical findings due in 7 days", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "due_date_rules"}} When the request is sent Then the response status is 422 Unprocessable Entity @@ -3647,7 +3661,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled And new "UpdateSecurityFindingsAutomationMuteRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}} When the request is sent Then the response status is 400 Bad Request @@ -3656,7 +3670,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled And new "UpdateSecurityFindingsAutomationMuteRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}} When the request is sent Then the response status is 404 Not Found @@ -3666,7 +3680,7 @@ Feature: Security Monitoring And there is a valid "valid_mute_rule" in the system And new "UpdateSecurityFindingsAutomationMuteRule" request And request contains "rule_id" parameter from "valid_mute_rule.data.id" - And body with value {"data": {"attributes": {"action": {"reason": "false_positive"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "mute_rules"}} + And body with value {"data": {"attributes": {"action": {"reason": "false_positive"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "id": "{{ valid_mute_rule.data.id }}", "type": "mute_rules"}} When the request is sent Then the response status is 200 Successfully updated the mute rule And the response "data.id" is equal to "{{ valid_mute_rule.data.id }}" @@ -3677,7 +3691,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationMuteRule" enabled And new "UpdateSecurityFindingsAutomationMuteRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "mute_rules"}} + And body with value {"data": {"attributes": {"action": {"expire_at": 4070908800000, "reason": "risk_accepted", "reason_description": "Accepted for dev environments only"}, "enabled": true, "name": "Mute accepted risks in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "mute_rules"}} When the request is sent Then the response status is 422 Unprocessable Entity @@ -3722,7 +3736,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationSeverityModifierRule" enabled And new "UpdateSecurityFindingsAutomationSeverityModifierRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "severity_modifier_rules"}} + And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "severity_modifier_rules"}} When the request is sent Then the response status is 400 Bad Request @@ -3731,7 +3745,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationSeverityModifierRule" enabled And new "UpdateSecurityFindingsAutomationSeverityModifierRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "severity_modifier_rules"}} + And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "severity_modifier_rules"}} When the request is sent Then the response status is 404 Not Found @@ -3741,7 +3755,7 @@ Feature: Security Monitoring And there is a valid "valid_severity_modifier_rule" in the system And new "UpdateSecurityFindingsAutomationSeverityModifierRule" request And request contains "rule_id" parameter from "valid_severity_modifier_rule.data.id" - And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "severity_modifier_rules"}} + And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "{{ valid_severity_modifier_rule.data.id }}", "type": "severity_modifier_rules"}} When the request is sent Then the response status is 200 Successfully updated the severity modifier rule @@ -3750,7 +3764,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationSeverityModifierRule" enabled And new "UpdateSecurityFindingsAutomationSeverityModifierRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "severity_modifier_rules"}} + And body with value {"data": {"attributes": {"action": {"description": "Lower severity for dev environment noise", "severity": "low", "type": "set"}, "enabled": true, "name": "Downgrade misconfigurations in dev", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "severity_modifier_rules"}} When the request is sent Then the response status is 422 Unprocessable Entity @@ -3795,7 +3809,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled And new "UpdateSecurityFindingsAutomationTicketCreationRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "ticket_creation_rules"}} When the request is sent Then the response status is 400 Bad Request @@ -3804,7 +3818,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled And new "UpdateSecurityFindingsAutomationTicketCreationRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "ticket_creation_rules"}} When the request is sent Then the response status is 404 Not Found @@ -3814,7 +3828,7 @@ Feature: Security Monitoring And there is a valid "valid_ticket_creation_rule" in the system And new "UpdateSecurityFindingsAutomationTicketCreationRule" request And request contains "rule_id" parameter from "valid_ticket_creation_rule.data.id" - And body with value {"data": {"attributes": {"action": {"max_tickets_per_day": 5, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "type": "ticket_creation_rules"}} + And body with value {"data": {"attributes": {"action": {"max_tickets_per_day": 5, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": false, "name": "{{ unique }}", "rule": {"finding_types": ["misconfiguration"], "query": "env:staging"}}, "id": "{{ valid_ticket_creation_rule.data.id }}", "type": "ticket_creation_rules"}} When the request is sent Then the response status is 200 Successfully updated the ticket creation rule And the response "data.id" is equal to "{{ valid_ticket_creation_rule.data.id }}" @@ -3825,7 +3839,7 @@ Feature: Security Monitoring Given operation "UpdateSecurityFindingsAutomationTicketCreationRule" enabled And new "UpdateSecurityFindingsAutomationTicketCreationRule" request And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "type": "ticket_creation_rules"}} + And body with value {"data": {"attributes": {"action": {"assignee_id": "22222222-2222-2222-2222-222222222222", "fields": {"labels": ["security"]}, "max_tickets_per_day": 100, "project_id": "11111111-1111-1111-1111-111111111111", "target": "jira"}, "enabled": true, "name": "Auto-create Jira tickets for critical findings", "rule": {"finding_types": ["misconfiguration"], "query": "env:prod team:platform"}}, "id": "00000000-0000-0000-0000-000000000000", "type": "ticket_creation_rules"}} When the request is sent Then the response status is 422 Unprocessable Entity @@ -3902,7 +3916,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found - @skip @team:DataDog/k9-automation + @team:DataDog/k9-automation Scenario: Update an inbox rule returns "Successfully updated the inbox rule" response Given operation "UpdateSecurityFindingsAutomationInboxRule" enabled And there is a valid "valid_inbox_rule" in the system diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index cbecf69cfc2..a3ee9d72c99 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -8776,6 +8776,12 @@ "type": "safe" } }, + "GetEntityContextRecentlyUpdated": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, "GetSingleEntityContext": { "tag": "Security Monitoring", "undo": { diff --git a/src/test/resources/generated-test/test-runner-data/manifest.json b/src/test/resources/generated-test/test-runner-data/manifest.json index e17a377c310..c072f479e28 100644 --- a/src/test/resources/generated-test/test-runner-data/manifest.json +++ b/src/test/resources/generated-test/test-runner-data/manifest.json @@ -9534,6 +9534,13 @@ "scenario": "Create a ticket creation rule returns \"Successfully created the ticket creation rule\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/create-an-inbox-rule-returns-successfully-created-the-inbox-rule-response.json", + "scenario": "Create an inbox rule returns \"Successfully created the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9702,6 +9709,13 @@ "scenario": "Delete an existing rule returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/delete-an-inbox-rule-returns-successfully-deleted-the-inbox-rule-response.json", + "scenario": "Delete an inbox rule returns \"Successfully deleted the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9723,6 +9737,20 @@ "scenario": "Detach security findings from their case returns \"Not Found\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/disable-a-default-inbox-rule-returns-successfully-disabled-the-default-inbox-rule-response.json", + "scenario": "Disable a default inbox rule returns \"Successfully disabled the default inbox rule\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/enable-a-default-inbox-rule-returns-successfully-enabled-the-default-inbox-rule-response.json", + "scenario": "Enable a default inbox rule returns \"Successfully enabled the default inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9779,6 +9807,13 @@ "scenario": "Get a custom framework returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/get-a-default-inbox-rule-returns-successfully-retrieved-the-default-inbox-rule-response.json", + "scenario": "Get a default inbox rule returns \"Successfully retrieved the default inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9926,6 +9961,13 @@ "scenario": "Get all critical assets returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/get-all-default-inbox-rules-returns-successfully-retrieved-the-list-of-default-inbox-rules-response.json", + "scenario": "Get all default inbox rules returns \"Successfully retrieved the list of default inbox rules\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9933,6 +9975,13 @@ "scenario": "Get all due date rules returns \"Successfully retrieved the list of due date rules\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/get-all-inbox-rules-returns-successfully-retrieved-the-list-of-inbox-rules-response.json", + "scenario": "Get all inbox rules returns \"Successfully retrieved the list of inbox rules\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -9982,6 +10031,13 @@ "scenario": "Get all ticket creation rules returns \"Successfully retrieved the list of ticket creation rules\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/get-an-inbox-rule-returns-successfully-retrieved-the-inbox-rule-response.json", + "scenario": "Get an inbox rule returns \"Successfully retrieved the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -10290,6 +10346,13 @@ "scenario": "Reorder due date rules returns \"Successfully reordered the due date rules\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/reorder-inbox-rules-returns-successfully-reordered-the-inbox-rules-response.json", + "scenario": "Reorder inbox rules returns \"Successfully reordered the inbox rules\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", @@ -10507,6 +10570,13 @@ "scenario": "Update an existing rule returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", + "file": "v2/security-monitoring/update-an-inbox-rule-returns-successfully-updated-the-inbox-rule-response.json", + "scenario": "Update an inbox rule returns \"Successfully updated the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "feature_file": "../../com/datadog/api/client/v2/api/security_monitoring.feature", diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-an-inbox-rule-returns-successfully-created-the-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-an-inbox-rule-returns-successfully-created-the-inbox-rule-response.json new file mode 100644 index 00000000000..032647e423d --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/create-an-inbox-rule-returns-successfully-created-the-inbox-rule-response.json @@ -0,0 +1,43 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 201, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Create an inbox rule returns \"Successfully created the inbox rule\" response", + "operation_id": "CreateSecurityFindingsAutomationInboxRule", + "request": { + "body": { + "schema": { + "format": null, + "ref": "InboxRuleCreateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": true, + "name": "{{ unique }}", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/security/findings/automation/inbox_rules" + }, + "scenario": "Create an inbox rule returns \"Successfully created the inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-an-inbox-rule-returns-successfully-deleted-the-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-an-inbox-rule-returns-successfully-deleted-the-inbox-rule-response.json new file mode 100644 index 00000000000..c00c2842a4a --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/delete-an-inbox-rule-returns-successfully-deleted-the-inbox-rule-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 204, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Delete an inbox rule returns \"Successfully deleted the inbox rule\" response", + "operation_id": "DeleteSecurityFindingsAutomationInboxRule", + "request": { + "body": null, + "content_type": null, + "method": "DELETE", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "valid_inbox_rule.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + }, + "scenario": "Delete an inbox rule returns \"Successfully deleted the inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/disable-a-default-inbox-rule-returns-successfully-disabled-the-default-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/disable-a-default-inbox-rule-returns-successfully-disabled-the-default-inbox-rule-response.json new file mode 100644 index 00000000000..9e1ab4378f7 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/disable-a-default-inbox-rule-returns-successfully-disabled-the-default-inbox-rule-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Disable a default inbox rule returns \"Successfully disabled the default inbox rule\" response", + "operation_id": "DisableSecurityFindingsAutomationDefaultInboxRule", + "request": { + "body": null, + "content_type": null, + "method": "POST", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "secret_default_rule" + }, + "style": null + } + ], + "path": "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/disable" + }, + "scenario": "Disable a default inbox rule returns \"Successfully disabled the default inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/enable-a-default-inbox-rule-returns-successfully-enabled-the-default-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/enable-a-default-inbox-rule-returns-successfully-enabled-the-default-inbox-rule-response.json new file mode 100644 index 00000000000..5626359ceab --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/enable-a-default-inbox-rule-returns-successfully-enabled-the-default-inbox-rule-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Enable a default inbox rule returns \"Successfully enabled the default inbox rule\" response", + "operation_id": "EnableSecurityFindingsAutomationDefaultInboxRule", + "request": { + "body": null, + "content_type": null, + "method": "POST", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "secret_default_rule" + }, + "style": null + } + ], + "path": "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}/enable" + }, + "scenario": "Enable a default inbox rule returns \"Successfully enabled the default inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-a-default-inbox-rule-returns-successfully-retrieved-the-default-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-a-default-inbox-rule-returns-successfully-retrieved-the-default-inbox-rule-response.json new file mode 100644 index 00000000000..c99cd903c4c --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-a-default-inbox-rule-returns-successfully-retrieved-the-default-inbox-rule-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Get a default inbox rule returns \"Successfully retrieved the default inbox rule\" response", + "operation_id": "GetSecurityFindingsAutomationDefaultInboxRule", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "secret_default_rule" + }, + "style": null + } + ], + "path": "/api/v2/security/findings/automation/default_inbox_rules/{rule_id}" + }, + "scenario": "Get a default inbox rule returns \"Successfully retrieved the default inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-all-default-inbox-rules-returns-successfully-retrieved-the-list-of-default-inbox-rules-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-all-default-inbox-rules-returns-successfully-retrieved-the-list-of-default-inbox-rules-response.json new file mode 100644 index 00000000000..5f8a1d802b0 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-all-default-inbox-rules-returns-successfully-retrieved-the-list-of-default-inbox-rules-response.json @@ -0,0 +1,18 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Get all default inbox rules returns \"Successfully retrieved the list of default inbox rules\" response", + "operation_id": "ListSecurityFindingsAutomationDefaultInboxRules", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/security/findings/automation/default_inbox_rules" + }, + "scenario": "Get all default inbox rules returns \"Successfully retrieved the list of default inbox rules\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-all-inbox-rules-returns-successfully-retrieved-the-list-of-inbox-rules-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-all-inbox-rules-returns-successfully-retrieved-the-list-of-inbox-rules-response.json new file mode 100644 index 00000000000..b44008ee6ef --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-all-inbox-rules-returns-successfully-retrieved-the-list-of-inbox-rules-response.json @@ -0,0 +1,18 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Get all inbox rules returns \"Successfully retrieved the list of inbox rules\" response", + "operation_id": "ListSecurityFindingsAutomationInboxRules", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [], + "path": "/api/v2/security/findings/automation/inbox_rules" + }, + "scenario": "Get all inbox rules returns \"Successfully retrieved the list of inbox rules\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-an-inbox-rule-returns-successfully-retrieved-the-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-an-inbox-rule-returns-successfully-retrieved-the-inbox-rule-response.json new file mode 100644 index 00000000000..dd03b20aa86 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/get-an-inbox-rule-returns-successfully-retrieved-the-inbox-rule-response.json @@ -0,0 +1,35 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Get an inbox rule returns \"Successfully retrieved the inbox rule\" response", + "operation_id": "GetSecurityFindingsAutomationInboxRule", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "valid_inbox_rule.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + }, + "scenario": "Get an inbox rule returns \"Successfully retrieved the inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/reorder-inbox-rules-returns-successfully-reordered-the-inbox-rules-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/reorder-inbox-rules-returns-successfully-reordered-the-inbox-rules-response.json new file mode 100644 index 00000000000..f6c22d3558f --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/reorder-inbox-rules-returns-successfully-reordered-the-inbox-rules-response.json @@ -0,0 +1,33 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Reorder inbox rules returns \"Successfully reordered the inbox rules\" response", + "operation_id": "ReorderSecurityFindingsAutomationInboxRules", + "request": { + "body": { + "schema": { + "format": null, + "ref": "InboxRuleReorderRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": [ + { + "id": "{{ valid_inbox_rule.data.id }}", + "type": "inbox_rules" + } + ] + } + }, + "content_type": "application/json", + "method": "POST", + "pagination": false, + "parameters": [], + "path": "/api/v2/security/findings/automation/inbox_rules/reorder" + }, + "scenario": "Reorder inbox rules returns \"Successfully reordered the inbox rules\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-due-date-rule-returns-successfully-updated-the-due-date-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-due-date-rule-returns-successfully-updated-the-due-date-rule-response.json index 46ce5b101a4..cfd691fbc91 100644 --- a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-due-date-rule-returns-successfully-updated-the-due-date-rule-response.json +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-due-date-rule-returns-successfully-updated-the-due-date-rule-response.json @@ -33,6 +33,7 @@ "query": "env:staging" } }, + "id": "{{ valid_due_date_rule.data.id }}", "type": "due_date_rules" } } diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-mute-rule-returns-successfully-updated-the-mute-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-mute-rule-returns-successfully-updated-the-mute-rule-response.json index 3c363125e9b..1d892dd7afe 100644 --- a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-mute-rule-returns-successfully-updated-the-mute-rule-response.json +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-mute-rule-returns-successfully-updated-the-mute-rule-response.json @@ -27,6 +27,7 @@ "query": "env:staging" } }, + "id": "{{ valid_mute_rule.data.id }}", "type": "mute_rules" } } diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-severity-modifier-rule-returns-successfully-updated-the-severity-modifier-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-severity-modifier-rule-returns-successfully-updated-the-severity-modifier-rule-response.json index 755f467322f..2ccc8d6881a 100644 --- a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-severity-modifier-rule-returns-successfully-updated-the-severity-modifier-rule-response.json +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-severity-modifier-rule-returns-successfully-updated-the-severity-modifier-rule-response.json @@ -29,6 +29,7 @@ "query": "env:prod team:platform" } }, + "id": "{{ valid_severity_modifier_rule.data.id }}", "type": "severity_modifier_rules" } } diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-ticket-creation-rule-returns-successfully-updated-the-ticket-creation-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-ticket-creation-rule-returns-successfully-updated-the-ticket-creation-rule-response.json index e5ab343959c..0cc29f75d3f 100644 --- a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-ticket-creation-rule-returns-successfully-updated-the-ticket-creation-rule-response.json +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-a-ticket-creation-rule-returns-successfully-updated-the-ticket-creation-rule-response.json @@ -29,6 +29,7 @@ "query": "env:staging" } }, + "id": "{{ valid_ticket_creation_rule.data.id }}", "type": "ticket_creation_rules" } } diff --git a/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-an-inbox-rule-returns-successfully-updated-the-inbox-rule-response.json b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-an-inbox-rule-returns-successfully-updated-the-inbox-rule-response.json new file mode 100644 index 00000000000..9e72e2db004 --- /dev/null +++ b/src/test/resources/generated-test/test-runner-data/v2/security-monitoring/update-an-inbox-rule-returns-successfully-updated-the-inbox-rule-response.json @@ -0,0 +1,61 @@ +{ + "api": "SecurityMonitoring", + "expected_status": 200, + "feature": "Security Monitoring", + "id": "v2/Security Monitoring/Update an inbox rule returns \"Successfully updated the inbox rule\" response", + "operation_id": "UpdateSecurityFindingsAutomationInboxRule", + "request": { + "body": { + "schema": { + "format": null, + "ref": "InboxRuleUpdateRequest", + "type": "object" + }, + "source": "inline", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": false, + "name": "{{ unique }}", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "id": "{{ valid_inbox_rule.data.id }}", + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "PUT", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "rule_id", + "required": true, + "schema": { + "format": "uuid", + "ref": null, + "type": "string" + }, + "source": { + "path": "valid_inbox_rule.data.id", + "type": "fixture" + }, + "style": null + } + ], + "path": "/api/v2/security/findings/automation/inbox_rules/{rule_id}" + }, + "scenario": "Update an inbox rule returns \"Successfully updated the inbox rule\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json b/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json index d73c2d96ce3..4aaa1af1cf5 100644 --- a/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json +++ b/src/test/resources/generated-test/test-server-data/v2/security-monitoring.json @@ -3572,6 +3572,75 @@ "scenario": "Create a ticket creation rule returns \"Successfully created the ticket creation rule\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:27.938Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": true, + "name": "Test-Create_an_inbox_rule_returns_Successfully_created_the_inbox_rule_response-1790612067", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security/findings/automation/inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"dc57dc85-6aca-47bf-b8b3-28898cb0b855\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612069795,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612069795,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Create_an_inbox_rule_returns_Successfully_created_the_inbox_rule_response-1790612067\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security/findings/automation/inbox_rules/dc57dc85-6aca-47bf-b8b3-28898cb0b855", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Create an inbox rule returns \"Successfully created the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2025-12-12T14:46:23.960Z", @@ -5287,6 +5356,98 @@ "scenario": "Delete an existing rule returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:30.420Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": true, + "name": "Test-Delete_an_inbox_rule_returns_Successfully_deleted_the_inbox_rule_response-1790612070", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security/findings/automation/inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"4801a0e2-68ad-4a78-a19c-1ed461044144\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612070593,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612070593,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Delete_an_inbox_rule_returns_Successfully_deleted_the_inbox_rule_response-1790612070\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security/findings/automation/inbox_rules/4801a0e2-68ad-4a78-a19c-1ed461044144", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security/findings/automation/inbox_rules/4801a0e2-68ad-4a78-a19c-1ed461044144", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"rule does not exist\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Delete an inbox rule returns \"Successfully deleted the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2025-11-20T16:07:27.292Z", @@ -5415,6 +5576,68 @@ "scenario": "Detach security findings from their case returns \"Not Found\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:31.398Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "POST", + "path": "/api/v2/security/findings/automation/default_inbox_rules/secret_default_rule/disable", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"secret_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":false,\"modified_at\":1790612071580,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Secrets\",\"rule\":{\"finding_types\":[\"secret\"],\"query\":\"@git.repository_visibility:public OR @secret.validation_status:valid\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Disable a default inbox rule returns \"Successfully disabled the default inbox rule\" response", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:31.756Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "POST", + "path": "/api/v2/security/findings/automation/default_inbox_rules/secret_default_rule/enable", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"secret_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1790612071928,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Secrets\",\"rule\":{\"finding_types\":[\"secret\"],\"query\":\"@git.repository_visibility:public OR @secret.validation_status:valid\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Enable a default inbox rule returns \"Successfully enabled the default inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-04-10T08:56:17.310Z", @@ -6034,6 +6257,37 @@ "scenario": "Get a custom framework returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:32.107Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security/findings/automation/default_inbox_rules/secret_default_rule", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"secret_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1790612071928,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Secrets\",\"rule\":{\"finding_types\":[\"secret\"],\"query\":\"@git.repository_visibility:public OR @secret.validation_status:valid\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get a default inbox rule returns \"Successfully retrieved the default inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-06-16T15:41:07.946Z", @@ -7407,6 +7661,37 @@ "scenario": "Get all critical assets returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:32.340Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security/findings/automation/default_inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"attack_path_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1788857644518,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"Attack Paths\",\"rule\":{\"finding_types\":[\"attack_path\"],\"query\":\"@severity:(high OR critical)\"}}},{\"id\":\"host_and_container_vulnerability_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1787094752823,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"Host \\u0026 Container Vulnerabilities\",\"rule\":{\"finding_types\":[\"host_and_container_vulnerability\"],\"query\":\"-@risk.is_image_running:false @risk.has_exploit_available:true @remediation.is_available:true @risk.has_high_exploitability_chance:true @risk_details.has_exploit_available.evidence.exploit_sources:CISA @risk.is_publicly_accessible:true @severity:(high OR critical)\"}}},{\"id\":\"iac_misconfiguration_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1787094752823,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"IaC Misconfigurations\",\"rule\":{\"finding_types\":[\"iac_misconfiguration\"],\"query\":\"@vulnerability.confidence:high @iac_resource.platform:cicd @rule.type:(insecure_configurations OR insecure_defaults) @git.repository_visibility:public @severity:(critical OR high)\"}}},{\"id\":\"identity_risk_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1788468727122,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1788468727122,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"Identity Risks\",\"rule\":{\"finding_types\":[\"identity_risk\"],\"query\":\"@rule.default_rule_id:(def-000-65w OR def-000-k6r)\"}}},{\"id\":\"library_vulnerability_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1787094752823,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"Library Vulnerabilities\",\"rule\":{\"finding_types\":[\"library_vulnerability\"],\"query\":\"@risk.is_emerging:true OR ((@risk.is_function_reachable:true OR (@risk.is_exposed_to_attacks:true @risk.is_production:true)) @risk.has_exploit_available:true @severity:critical)\"}}},{\"id\":\"misconfiguration_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1788468727122,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1788468727122,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"Misconfigurations\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"@rule.default_rule_id:(542-ddc-8ba OR 5yq-fi1-8pn OR 7hk-tff-0fv OR 8yh-cqk-qbn OR a7e-e88-302 OR def-000-0f1 OR def-000-1u4 OR def-000-5g7 OR def-000-5zq OR def-000-6vi OR def-000-7qa OR def-000-8nn OR def-000-8zx OR def-000-936 OR def-000-9vv OR def-000-ag8 OR def-000-ag9 OR def-000-ee1 OR def-000-fdu OR def-000-glk OR def-000-hrv OR def-000-imu OR def-000-m2r OR def-000-ma8 OR def-000-mcz OR def-000-mwf OR def-000-ny3 OR def-000-ocr OR def-000-ont OR def-000-oru OR def-000-p1v OR def-000-pgo OR def-000-ph2 OR def-000-pp0 OR def-000-q4w OR def-000-qk5 OR def-000-rdc OR def-000-rtu OR def-000-u48 OR def-000-ua9 OR def-000-vcf OR def-000-xog OR def-000-y7k OR dsk-1y0-pv3 OR ee4-ngx-bwr OR exe-9ow-gwv OR fcc-nsq-vkn OR fo0-6re-l0f OR fu0-rtv-2rb OR g1t-jj4-k8k OR rl5-ki5-ja8 OR tzw-4b4-bz5 OR w95-9o2-mw0)\"}}},{\"id\":\"runtime_code_vulnerability_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1787094752823,\"modified_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"name\":\"Runtime Code Vulnerabilities\",\"rule\":{\"finding_types\":[\"runtime_code_vulnerability\"],\"query\":\"@risk.is_production:true @risk.is_exposed_to_attacks:true @severity:(critical OR high)\"}}},{\"id\":\"secret_default_rule\",\"type\":\"default_inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Maintained by Datadog Security Research. Customize your inbox by adding your own rules, cloning this rule, or disabling it.\"},\"created_at\":1787094752823,\"created_by\":{\"type\":\"system\",\"id\":\"datadog.security_research\",\"name\":\"Datadog Security Research\"},\"enabled\":true,\"modified_at\":1790612071928,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Secrets\",\"rule\":{\"finding_types\":[\"secret\"],\"query\":\"@git.repository_visibility:public OR @secret.validation_status:valid\"}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get all default inbox rules returns \"Successfully retrieved the list of default inbox rules\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-06-16T15:41:11.482Z", @@ -7505,6 +7790,98 @@ "scenario": "Get all due date rules returns \"Successfully retrieved the list of due date rules\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:32.563Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": true, + "name": "Test-Get_all_inbox_rules_returns_Successfully_retrieved_the_list_of_inbox_rules_response-1790612072", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security/findings/automation/inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"619001a4-e643-4b0c-a984-2f8823a408c3\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612072728,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612072728,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_inbox_rules_returns_Successfully_retrieved_the_list_of_inbox_rules_response-1790612072\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security/findings/automation/inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"619001a4-e643-4b0c-a984-2f8823a408c3\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612072728,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612072728,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_inbox_rules_returns_Successfully_retrieved_the_list_of_inbox_rules_response-1790612072\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}],\"meta\":{\"page\":{\"total_filtered_count\":1}},\"links\":{\"first\":\"/api/v2/security/findings/automation/inbox_rules?page[size]=1000\\u0026page[number]=0\",\"last\":\"/api/v2/security/findings/automation/inbox_rules?page[size]=1000\\u0026page[number]=0\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security/findings/automation/inbox_rules/619001a4-e643-4b0c-a984-2f8823a408c3", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get all inbox rules returns \"Successfully retrieved the list of inbox rules\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-06-16T15:41:12.599Z", @@ -8100,25 +8477,149 @@ "source:cloudtrail" ] }, - "type": "suppressions" + "type": "suppressions" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security_monitoring/configuration/suppressions", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"qjl-xxu-vlo\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1769009707163,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707\",\"editable\":true,\"enabled\":true,\"name\":\"suppression2 4668d111f32d9934\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1769009707163,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/security_monitoring/configuration/suppressions", + "query": [ + [ + "query", + "id:mru-avx-npf OR id:qjl-xxu-vlo" + ], + [ + "sort", + "-name" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"qjl-xxu-vlo\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1769009707163,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707\",\"editable\":true,\"enabled\":true,\"name\":\"suppression2 4668d111f32d9934\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1769009707163,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}},{\"id\":\"mru-avx-npf\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1769009707069,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707\",\"editable\":true,\"enabled\":true,\"name\":\"suppression 4668d111f32d9934\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1769009707069,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}}],\"meta\":{\"page\":{\"totalCount\":2,\"pageSize\":2,\"pageNumber\":0}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/configuration/suppressions/qjl-xxu-vlo", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security_monitoring/configuration/suppressions/mru-avx-npf", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get all suppression rules returns \"OK\" response with sort descending", + "version": "v2" + }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-06-16T15:41:13.714Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "max_tickets_per_day": 10, + "project_id": "11111111-1111-1111-1111-111111111111", + "target": "jira" + }, + "enabled": true, + "name": "Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "ticket_creation_rules" } } }, "content_type": "application/json", "method": "POST", - "path": "/api/v2/security_monitoring/configuration/suppressions", + "path": "/api/v2/security/findings/automation/ticket_creation_rules", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"qjl-xxu-vlo\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1769009707163,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707\",\"editable\":true,\"enabled\":true,\"name\":\"suppression2 4668d111f32d9934\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1769009707163,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}}}" + "value": "{\"data\":{\"id\":\"399d69c3-6fcd-4538-b0cc-05e6db5aac38\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624473944,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624473944,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" }, - "reason": "OK", - "status": 200 + "reason": "Created", + "status": 201 } }, { @@ -8129,22 +8630,13 @@ }, "content_type": "", "method": "GET", - "path": "/api/v2/security_monitoring/configuration/suppressions", - "query": [ - [ - "query", - "id:mru-avx-npf OR id:qjl-xxu-vlo" - ], - [ - "sort", - "-name" - ] - ] + "path": "/api/v2/security/findings/automation/ticket_creation_rules", + "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":[{\"id\":\"qjl-xxu-vlo\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1769009707163,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707\",\"editable\":true,\"enabled\":true,\"name\":\"suppression2 4668d111f32d9934\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1769009707163,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}},{\"id\":\"mru-avx-npf\",\"type\":\"suppressions\",\"attributes\":{\"creation_date\":1769009707069,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"data_exclusion_query\":\"\",\"description\":\"Test-Get_all_suppression_rules_returns_OK_response_with_sort_descending-1769009707\",\"editable\":true,\"enabled\":true,\"name\":\"suppression 4668d111f32d9934\",\"rule_query\":\"source:cloudtrail\",\"suppression_query\":\"env:test\",\"tags\":[\"source:cloudtrail\",\"technique:T1110-brute-force\"],\"update_date\":1769009707069,\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"version\":1}}],\"meta\":{\"page\":{\"totalCount\":2,\"pageSize\":2,\"pageNumber\":0}}}" + "value": "{\"data\":[{\"id\":\"399d69c3-6fcd-4538-b0cc-05e6db5aac38\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624473944,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624473944,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}],\"meta\":{\"page\":{\"total_filtered_count\":1}},\"links\":{\"first\":\"/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000\\u0026page[number]=0\",\"last\":\"/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000\\u0026page[number]=0\"}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -8161,28 +8653,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/qjl-xxu-vlo", - "query": [] - }, - "response": { - "body": { - "encoding": "text", - "value": "" - }, - "headers": {}, - "reason": "No Content", - "status": 204 - } - }, - { - "request": { - "body": { - "type": "empty", - "value": null - }, - "content_type": "", - "method": "DELETE", - "path": "/api/v2/security_monitoring/configuration/suppressions/mru-avx-npf", + "path": "/api/v2/security/findings/automation/ticket_creation_rules/399d69c3-6fcd-4538-b0cc-05e6db5aac38", "query": [] }, "response": { @@ -8196,12 +8667,12 @@ } } ], - "scenario": "Get all suppression rules returns \"OK\" response with sort descending", + "scenario": "Get all ticket creation rules returns \"Successfully retrieved the list of ticket creation rules\" response", "version": "v2" }, { "feature": "Security Monitoring", - "frozen_at": "2026-06-16T15:41:13.714Z", + "frozen_at": "2026-09-28T16:14:33.495Z", "interactions": [ { "request": { @@ -8211,12 +8682,10 @@ "data": { "attributes": { "action": { - "max_tickets_per_day": 10, - "project_id": "11111111-1111-1111-1111-111111111111", - "target": "jira" + "description": "Needs triage" }, "enabled": true, - "name": "Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473", + "name": "Test-Get_an_inbox_rule_returns_Successfully_retrieved_the_inbox_rule_response-1790612073", "rule": { "finding_types": [ "misconfiguration" @@ -8224,19 +8693,19 @@ "query": "env:staging" } }, - "type": "ticket_creation_rules" + "type": "inbox_rules" } } }, "content_type": "application/json", "method": "POST", - "path": "/api/v2/security/findings/automation/ticket_creation_rules", + "path": "/api/v2/security/findings/automation/inbox_rules", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"399d69c3-6fcd-4538-b0cc-05e6db5aac38\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624473944,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624473944,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"32688e34-1328-4675-923a-e80d74041e62\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612073668,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612073668,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_an_inbox_rule_returns_Successfully_retrieved_the_inbox_rule_response-1790612073\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -8253,13 +8722,13 @@ }, "content_type": "", "method": "GET", - "path": "/api/v2/security/findings/automation/ticket_creation_rules", + "path": "/api/v2/security/findings/automation/inbox_rules/32688e34-1328-4675-923a-e80d74041e62", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":[{\"id\":\"399d69c3-6fcd-4538-b0cc-05e6db5aac38\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624473944,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624473944,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_all_ticket_creation_rules_returns_Successfully_retrieved_the_list_of_ticket_creation_rules_respo-1781624473\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}],\"meta\":{\"page\":{\"total_filtered_count\":1}},\"links\":{\"first\":\"/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000\\u0026page[number]=0\",\"last\":\"/api/v2/security/findings/automation/ticket_creation_rules?page[size]=1000\\u0026page[number]=0\"}}" + "value": "{\"data\":{\"id\":\"32688e34-1328-4675-923a-e80d74041e62\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612073668,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612073668,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Get_an_inbox_rule_returns_Successfully_retrieved_the_inbox_rule_response-1790612073\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -8276,7 +8745,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/security/findings/automation/ticket_creation_rules/399d69c3-6fcd-4538-b0cc-05e6db5aac38", + "path": "/api/v2/security/findings/automation/inbox_rules/32688e34-1328-4675-923a-e80d74041e62", "query": [] }, "response": { @@ -8290,7 +8759,7 @@ } } ], - "scenario": "Get all ticket creation rules returns \"Successfully retrieved the list of ticket creation rules\" response", + "scenario": "Get an inbox rule returns \"Successfully retrieved the inbox rule\" response", "version": "v2" }, { @@ -10990,6 +11459,105 @@ "scenario": "Reorder due date rules returns \"Successfully reordered the due date rules\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:34.474Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": true, + "name": "Test-Reorder_inbox_rules_returns_Successfully_reordered_the_inbox_rules_response-1790612074", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security/findings/automation/inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"600fac73-3dc3-4f7e-81ad-bb841ab820e6\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612074649,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612074649,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Reorder_inbox_rules_returns_Successfully_reordered_the_inbox_rules_response-1790612074\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": [ + { + "id": "600fac73-3dc3-4f7e-81ad-bb841ab820e6", + "type": "inbox_rules" + } + ] + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security/findings/automation/inbox_rules/reorder", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"type\":\"inbox_rules\",\"id\":\"600fac73-3dc3-4f7e-81ad-bb841ab820e6\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security/findings/automation/inbox_rules/600fac73-3dc3-4f7e-81ad-bb841ab820e6", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Reorder inbox rules returns \"Successfully reordered the inbox rules\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2026-06-16T15:41:16.028Z", @@ -12777,7 +13345,7 @@ }, { "feature": "Security Monitoring", - "frozen_at": "2026-06-16T15:41:18.417Z", + "frozen_at": "2026-09-28T16:14:35.560Z", "interactions": [ { "request": { @@ -12796,7 +13364,7 @@ "due_from": "first_seen" }, "enabled": true, - "name": "Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478", + "name": "Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1790612075", "rule": { "finding_types": [ "misconfiguration" @@ -12816,7 +13384,7 @@ "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"22df6980-9710-496d-bf46-85e0ac181dc0\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1781624478629,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624478629,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"d1c57af8-441e-40ad-861c-8f72e0590d1e\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":7}],\"due_from\":\"first_seen\"},\"created_at\":1790612075728,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612075728,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1790612075\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -12842,7 +13410,7 @@ "due_from": "first_seen" }, "enabled": false, - "name": "Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478", + "name": "Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1790612075", "rule": { "finding_types": [ "misconfiguration" @@ -12850,19 +13418,20 @@ "query": "env:staging" } }, + "id": "d1c57af8-441e-40ad-861c-8f72e0590d1e", "type": "due_date_rules" } } }, "content_type": "application/json", "method": "PUT", - "path": "/api/v2/security/findings/automation/due_date_rules/22df6980-9710-496d-bf46-85e0ac181dc0", + "path": "/api/v2/security/findings/automation/due_date_rules/d1c57af8-441e-40ad-861c-8f72e0590d1e", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"22df6980-9710-496d-bf46-85e0ac181dc0\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":14}],\"due_from\":\"first_seen\"},\"created_at\":1781624478629,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1781624479036,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1781624478\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"d1c57af8-441e-40ad-861c-8f72e0590d1e\",\"type\":\"due_date_rules\",\"attributes\":{\"action\":{\"due_days_per_severity\":[{\"severity\":\"critical\",\"due_in_days\":14}],\"due_from\":\"first_seen\"},\"created_at\":1790612075728,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1790612076079,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_due_date_rule_returns_Successfully_updated_the_due_date_rule_response-1790612075\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -12879,7 +13448,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/security/findings/automation/due_date_rules/22df6980-9710-496d-bf46-85e0ac181dc0", + "path": "/api/v2/security/findings/automation/due_date_rules/d1c57af8-441e-40ad-861c-8f72e0590d1e", "query": [] }, "response": { @@ -12898,7 +13467,7 @@ }, { "feature": "Security Monitoring", - "frozen_at": "2026-06-16T15:41:19.612Z", + "frozen_at": "2026-09-28T16:14:36.693Z", "interactions": [ { "request": { @@ -12911,7 +13480,7 @@ "reason": "risk_accepted" }, "enabled": true, - "name": "Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479", + "name": "Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1790612076", "rule": { "finding_types": [ "misconfiguration" @@ -12931,7 +13500,7 @@ "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1781624479894,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624479894,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"47ebb4d1-b4f1-4519-b864-a977c307f7ae\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"risk_accepted\"},\"created_at\":1790612076862,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612076862,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1790612076\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -12951,7 +13520,7 @@ "reason": "false_positive" }, "enabled": false, - "name": "Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479", + "name": "Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1790612076", "rule": { "finding_types": [ "misconfiguration" @@ -12959,19 +13528,20 @@ "query": "env:staging" } }, + "id": "47ebb4d1-b4f1-4519-b864-a977c307f7ae", "type": "mute_rules" } } }, "content_type": "application/json", "method": "PUT", - "path": "/api/v2/security/findings/automation/mute_rules/9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9", + "path": "/api/v2/security/findings/automation/mute_rules/47ebb4d1-b4f1-4519-b864-a977c307f7ae", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"false_positive\"},\"created_at\":1781624479894,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1781624480318,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1781624479\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"47ebb4d1-b4f1-4519-b864-a977c307f7ae\",\"type\":\"mute_rules\",\"attributes\":{\"action\":{\"reason\":\"false_positive\"},\"created_at\":1790612076862,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1790612077230,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_mute_rule_returns_Successfully_updated_the_mute_rule_response-1790612076\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -12988,7 +13558,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/security/findings/automation/mute_rules/9a1d22ad-558c-4c4e-bdf5-72cd264cf7a9", + "path": "/api/v2/security/findings/automation/mute_rules/47ebb4d1-b4f1-4519-b864-a977c307f7ae", "query": [] }, "response": { @@ -13112,7 +13682,7 @@ }, { "feature": "Security Monitoring", - "frozen_at": "2026-08-18T07:21:01.200Z", + "frozen_at": "2026-09-28T16:14:37.824Z", "interactions": [ { "request": { @@ -13126,7 +13696,7 @@ "type": "set" }, "enabled": true, - "name": "Test-Update_a_severity_modifier_rule_returns_Successfully_updated_the_severity_modifier_rule_response-1787037661", + "name": "Test-Update_a_severity_modifier_rule_returns_Successfully_updated_the_severity_modifier_rule_response-1790612077", "rule": { "finding_types": [ "misconfiguration" @@ -13146,7 +13716,7 @@ "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"c58887bd-5c87-497c-adb8-db08a3593bbb\",\"type\":\"severity_modifier_rules\",\"attributes\":{\"action\":{\"type\":\"set\",\"severity\":\"low\"},\"created_at\":1787037661319,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1787037661319,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_severity_modifier_rule_returns_Successfully_updated_the_severity_modifier_rule_response-1787037661\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"ee58047b-5859-4ebc-9b21-55ff99109f13\",\"type\":\"severity_modifier_rules\",\"attributes\":{\"action\":{\"type\":\"set\",\"severity\":\"low\"},\"created_at\":1790612078013,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612078013,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_severity_modifier_rule_returns_Successfully_updated_the_severity_modifier_rule_response-1790612077\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -13176,19 +13746,20 @@ "query": "env:prod team:platform" } }, + "id": "ee58047b-5859-4ebc-9b21-55ff99109f13", "type": "severity_modifier_rules" } } }, "content_type": "application/json", "method": "PUT", - "path": "/api/v2/security/findings/automation/severity_modifier_rules/c58887bd-5c87-497c-adb8-db08a3593bbb", + "path": "/api/v2/security/findings/automation/severity_modifier_rules/ee58047b-5859-4ebc-9b21-55ff99109f13", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"c58887bd-5c87-497c-adb8-db08a3593bbb\",\"type\":\"severity_modifier_rules\",\"attributes\":{\"action\":{\"type\":\"set\",\"severity\":\"low\",\"description\":\"Lower severity for dev environment noise\"},\"created_at\":1787037661319,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1787037661614,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Downgrade misconfigurations in dev\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:prod team:platform\"}}}}" + "value": "{\"data\":{\"id\":\"ee58047b-5859-4ebc-9b21-55ff99109f13\",\"type\":\"severity_modifier_rules\",\"attributes\":{\"action\":{\"type\":\"set\",\"severity\":\"low\",\"description\":\"Lower severity for dev environment noise\"},\"created_at\":1790612078013,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612078376,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Downgrade misconfigurations in dev\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:prod team:platform\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -13205,7 +13776,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/security/findings/automation/severity_modifier_rules/c58887bd-5c87-497c-adb8-db08a3593bbb", + "path": "/api/v2/security/findings/automation/severity_modifier_rules/ee58047b-5859-4ebc-9b21-55ff99109f13", "query": [] }, "response": { @@ -13321,7 +13892,7 @@ }, { "feature": "Security Monitoring", - "frozen_at": "2026-06-16T15:41:20.880Z", + "frozen_at": "2026-09-28T16:14:38.945Z", "interactions": [ { "request": { @@ -13336,7 +13907,7 @@ "target": "jira" }, "enabled": true, - "name": "Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480", + "name": "Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1790612078", "rule": { "finding_types": [ "misconfiguration" @@ -13356,7 +13927,7 @@ "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"d3fcec39-567f-4450-967e-ca83bb29dbe4\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1781624481109,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1781624481109,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"ce00a58f-5bfd-4325-9cb7-0ce1fc3c632b\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":10},\"created_at\":1790612079182,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612079182,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1790612078\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -13378,7 +13949,7 @@ "target": "jira" }, "enabled": false, - "name": "Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480", + "name": "Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1790612078", "rule": { "finding_types": [ "misconfiguration" @@ -13386,19 +13957,20 @@ "query": "env:staging" } }, + "id": "ce00a58f-5bfd-4325-9cb7-0ce1fc3c632b", "type": "ticket_creation_rules" } } }, "content_type": "application/json", "method": "PUT", - "path": "/api/v2/security/findings/automation/ticket_creation_rules/d3fcec39-567f-4450-967e-ca83bb29dbe4", + "path": "/api/v2/security/findings/automation/ticket_creation_rules/ce00a58f-5bfd-4325-9cb7-0ce1fc3c632b", "query": [] }, "response": { "body": { "encoding": "text", - "value": "{\"data\":{\"id\":\"d3fcec39-567f-4450-967e-ca83bb29dbe4\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":5},\"created_at\":1781624481109,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1781624481511,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1781624480\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + "value": "{\"data\":{\"id\":\"ce00a58f-5bfd-4325-9cb7-0ce1fc3c632b\",\"type\":\"ticket_creation_rules\",\"attributes\":{\"action\":{\"project_id\":\"11111111-1111-1111-1111-111111111111\",\"target\":\"jira\",\"max_tickets_per_day\":5},\"created_at\":1790612079182,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1790612079544,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_a_ticket_creation_rule_returns_Successfully_updated_the_ticket_creation_rule_response-1790612078\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" }, "headers": { "content-type": "application/vnd.api+json" @@ -13415,7 +13987,7 @@ }, "content_type": "", "method": "DELETE", - "path": "/api/v2/security/findings/automation/ticket_creation_rules/d3fcec39-567f-4450-967e-ca83bb29dbe4", + "path": "/api/v2/security/findings/automation/ticket_creation_rules/ce00a58f-5bfd-4325-9cb7-0ce1fc3c632b", "query": [] }, "response": { @@ -13743,6 +14315,116 @@ "scenario": "Update an existing rule returns \"OK\" response", "version": "v2" }, + { + "feature": "Security Monitoring", + "frozen_at": "2026-09-28T16:14:40.089Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": true, + "name": "Test-Update_an_inbox_rule_returns_Successfully_updated_the_inbox_rule_response-1790612080", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/security/findings/automation/inbox_rules", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"9c1e6995-7c04-403a-9cb0-62f8cc94e25a\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612080262,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":true,\"modified_at\":1790612080262,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_an_inbox_rule_returns_Successfully_updated_the_inbox_rule_response-1790612080\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "action": { + "description": "Needs triage" + }, + "enabled": false, + "name": "Test-Update_an_inbox_rule_returns_Successfully_updated_the_inbox_rule_response-1790612080", + "rule": { + "finding_types": [ + "misconfiguration" + ], + "query": "env:staging" + } + }, + "id": "9c1e6995-7c04-403a-9cb0-62f8cc94e25a", + "type": "inbox_rules" + } + } + }, + "content_type": "application/json", + "method": "PUT", + "path": "/api/v2/security/findings/automation/inbox_rules/9c1e6995-7c04-403a-9cb0-62f8cc94e25a", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"9c1e6995-7c04-403a-9cb0-62f8cc94e25a\",\"type\":\"inbox_rules\",\"attributes\":{\"action\":{\"description\":\"Needs triage\"},\"created_at\":1790612080262,\"created_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"enabled\":false,\"modified_at\":1790612080636,\"modified_by\":{\"type\":\"user\",\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"name\":\"Test-Update_an_inbox_rule_returns_Successfully_updated_the_inbox_rule_response-1790612080\",\"rule\":{\"finding_types\":[\"misconfiguration\"],\"query\":\"env:staging\"}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/security/findings/automation/inbox_rules/9c1e6995-7c04-403a-9cb0-62f8cc94e25a", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Update an inbox rule returns \"Successfully updated the inbox rule\" response", + "version": "v2" + }, { "feature": "Security Monitoring", "frozen_at": "2025-05-15T09:52:48.266Z",