diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0ec4a8f39d9..0bf5e783b1d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5295,7 +5295,7 @@ components: description: Data of the case to attach security findings to. properties: id: - description: The unique identifier of the case. + description: Unique identifier of the case. example: c1234567-89ab-cdef-0123-456789abcdef type: string relationships: @@ -5326,10 +5326,6 @@ components: properties: attributes: $ref: '#/components/schemas/AttachJiraIssueRequestDataAttributes' - id: - description: The unique identifier of the Jira issue attachment request. - example: j1234567-89ab-cdef-0123-456789abcdef - type: string relationships: $ref: '#/components/schemas/AttachJiraIssueRequestDataRelationships' type: @@ -5341,7 +5337,7 @@ components: description: Attributes of the Jira issue to attach security findings to. properties: jira_issue_url: - description: The URL of the Jira issue to attach security findings to. + description: URL of the Jira issue to attach security findings to. example: https://domain.atlassian.net/browse/PROJ-123 type: string required: @@ -5352,8 +5348,12 @@ components: properties: findings: $ref: '#/components/schemas/Findings' + description: Security findings to attach to the Jira issue. project: $ref: '#/components/schemas/CaseManagementProject' + description: Case management project with Jira integration configured. It + is used to attach security findings to the Jira issue. To configure the + integration, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). required: - findings - project @@ -9125,17 +9125,17 @@ components: description: An insight of the case. properties: ref: - description: The reference of the insight. + description: Reference of the insight. example: /security/appsec/vm/library/vulnerability/dfa027f7c037b2f77159adc027fecb56?detection=static type: string resource_id: - description: The unique identifier of the resource. For example, the unique + description: Unique identifier of the resource. For example, the unique identifier of a security finding. example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== type: string type: - description: The type of the resource. For example, the type of a security - finding is "SECURITY_FINDING". + description: Type of the resource. For example, the type of a security finding + is "SECURITY_FINDING". example: SECURITY_FINDING type: string type: object @@ -9150,7 +9150,7 @@ components: CaseManagementProjectData: properties: id: - description: The unique identifier of the case management project. + description: Unique identifier of the case management project. example: aeadc05e-98a8-11ec-ac2c-da7ad0900001 type: string type: @@ -12897,10 +12897,6 @@ components: properties: attributes: $ref: '#/components/schemas/CreateCaseRequestDataAttributes' - id: - description: The unique identifier of the case. - example: c1234567-89ab-cdef-0123-456789abcdef - type: string relationships: $ref: '#/components/schemas/CreateCaseRequestDataRelationships' type: @@ -12912,21 +12908,21 @@ components: description: Attributes of the case to create. properties: assignee_id: - description: The unique identifier of the user assigned to the case. + description: Unique identifier of the user assigned to the case. example: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0 type: string description: - description: The description of the case. If not provided, the description - will be automatically generated. + description: Description of the case. If not provided, the description will + be automatically generated. example: A description of the case. type: string priority: $ref: '#/components/schemas/CasePriority' - description: The priority of the case. If not provided, the priority will - be automatically set to "NOT_DEFINED". + description: Priority of the case. If not provided, the priority will be + automatically set to "NOT_DEFINED". example: P4 title: - description: The title of the case. If not provided, the title will be automatically + description: Title of the case. If not provided, the title will be automatically generated. example: A title for the case. type: string @@ -12936,10 +12932,10 @@ components: properties: findings: $ref: '#/components/schemas/Findings' - description: Security findings of the case to create. + description: Security findings to create a case for. project: $ref: '#/components/schemas/CaseManagementProject' - description: Project of the case to create. + description: Case management project in which the case will be created. required: - findings - project @@ -13222,29 +13218,14 @@ components: items: $ref: '#/components/schemas/CreateJiraIssueRequestData' type: array - included: - items: - $ref: '#/components/schemas/CreateJiraIssueRequestArrayIncluded' - type: array required: - data type: object - CreateJiraIssueRequestArrayIncluded: - description: 'Attributes and relationships of the case linked to the Jira issue. - Should contain all of the following: case, project, and security findings.' - oneOf: - - $ref: '#/components/schemas/CreateCaseRequestData' - - $ref: '#/components/schemas/CaseManagementProjectData' - - $ref: '#/components/schemas/FindingData' CreateJiraIssueRequestData: description: Data of the Jira issue to create. properties: attributes: $ref: '#/components/schemas/CreateJiraIssueRequestDataAttributes' - id: - description: The unique identifier of the Jira issue creation request. - example: j1234567-89ab-cdef-0123-456789abcdef - type: string relationships: $ref: '#/components/schemas/CreateJiraIssueRequestDataRelationships' type: @@ -13255,48 +13236,51 @@ components: CreateJiraIssueRequestDataAttributes: description: Attributes of the Jira issue to create. properties: + assignee_id: + description: Unique identifier of the user assigned to the Jira issue. + example: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0 + type: string + description: + description: Description of the Jira issue. If not provided, the description + will be automatically generated. + example: A description of the Jira issue. + type: string fields: - $ref: '#/components/schemas/CreateJiraIssueRequestDataAttributesFields' - type: object - CreateJiraIssueRequestDataAttributesFields: - description: Custom fields of the Jira issue to create. For the list of available - fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get). - properties: - fields: + additionalProperties: {} + description: Custom fields of the Jira issue to create. For the list of + available fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get). example: - customfield_10001: Value 1 - customfield_10002: - - Value 2 - - Value 3 + key1: value + key2: + - value + key3: + key4: value type: object + priority: + $ref: '#/components/schemas/CasePriority' + description: Priority of the Jira issue. If not provided, the priority will + be automatically set to "NOT_DEFINED". + example: P4 + title: + description: Title of the Jira issue. If not provided, the title will be + automatically generated. + example: A title for the Jira issue. + type: string type: object CreateJiraIssueRequestDataRelationships: description: Relationships of the Jira issue to create. properties: - case: - $ref: '#/components/schemas/CreateJiraIssueRequestDataRelationshipsCase' - required: - - case - type: object - CreateJiraIssueRequestDataRelationshipsCase: - description: Case linked to the Jira issue. - properties: - data: - $ref: '#/components/schemas/CreateJiraIssueRequestDataRelationshipsCaseData' - required: - - data - type: object - CreateJiraIssueRequestDataRelationshipsCaseData: - description: Case linked to the Jira issue. - properties: - id: - example: c1234567-89ab-cdef-0123-456789abcdef - type: string - type: - $ref: '#/components/schemas/CaseDataType' + findings: + $ref: '#/components/schemas/Findings' + description: Security findings to create a Jira issue for. + project: + $ref: '#/components/schemas/CaseManagementProject' + description: Case management project configured with the Jira integration. + It is used to create the Jira issue. To configure the Jira integration, + see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). required: - - type - - id + - findings + - project type: object CreateNotificationRuleParameters: description: Body of the notification rule create request. @@ -17407,10 +17391,6 @@ components: DetachCaseRequestData: description: Data for detaching security findings from their case. properties: - id: - description: The unique identifier of the detachment request. - example: f8b9e3b1-24ec-4413-8be5-1b12b98533c6 - type: string relationships: $ref: '#/components/schemas/DetachCaseRequestDataRelationships' type: @@ -21353,7 +21333,7 @@ components: attributes: $ref: '#/components/schemas/FindingCaseResponseDataAttributes' id: - description: The unique identifier of the case. + description: Unique identifier of the case. example: c1234567-89ab-cdef-0123-456789abcdef type: string relationships: @@ -21460,7 +21440,7 @@ components: FindingData: properties: id: - description: The unique identifier of the security finding. + description: Unique identifier of the security finding. example: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== type: string type: @@ -21523,15 +21503,15 @@ components: description: Jira issue associated with the case. properties: error_message: - description: The error message if the Jira issue creation failed. + description: Error message if the Jira issue creation failed. example: '{"errorMessages":["An error occured."],"errors":{}}' type: string result: $ref: '#/components/schemas/FindingJiraIssueResult' status: - description: The status of the Jira issue creation. Can be "COMPLETED" if - the Jira issue was created successfully, or "FAILED" if the Jira issue - creation failed. + description: Status of the Jira issue creation. Can be "COMPLETED" if the + Jira issue was created successfully, or "FAILED" if the Jira issue creation + failed. example: COMPLETED type: string type: object @@ -21539,19 +21519,19 @@ components: description: Result of the Jira issue creation. properties: account_id: - description: The account ID of the Jira issue. + description: Account ID of the Jira issue. example: 463a8631-680e-455c-bfd3-3ed04d326eb7 type: string issue_id: - description: The unique identifier of the Jira issue. + description: Unique identifier of the Jira issue. example: '2871276' type: string issue_key: - description: The key of the Jira issue. + description: Key of the Jira issue. example: PROJ-123 type: string issue_url: - description: The URL of the Jira issue. + description: URL of the Jira issue. example: https://domain.atlassian.net/browse/PROJ-123 type: string type: object @@ -79985,11 +79965,13 @@ paths: - security_monitoring_cws_agent_rules_read /api/v2/security/findings/cases: delete: - description: Detach security findings from their case. This operation dissociates - security findings from their associated cases without deleting the cases themselves. - You can detach security findings from multiple different cases in a single - request, with a limit of 50 security findings per request. Security findings - that are not currently attached to any case will be ignored. + description: 'Detach security findings from their case. + + This operation dissociates security findings from their associated cases without + deleting the cases themselves. You can detach security findings from multiple + different cases in a single request, with a limit of 50 security findings + per request. Security findings that are not currently attached to any case + will be ignored.' operationId: DetachCase requestBody: content: @@ -80020,10 +80002,12 @@ paths: - security_monitoring_findings_write - appsec_vm_write post: - description: Create cases for security findings. You can create up to 50 cases - per request and associate up to 50 security findings per case. Security findings - that are already attached to another case will be detached from their previous - case and attached to the newly created case. + description: 'Create cases for security findings. + + You can create up to 50 cases per request and associate up to 50 security + findings per case. Security findings that are already attached to another + case will be detached from their previous case and attached to the newly created + case.' operationId: CreateCases requestBody: content: @@ -80059,14 +80043,14 @@ paths: - appsec_vm_write /api/v2/security/findings/cases/{case_id}: patch: - description: Attach security findings to a case. You can attach up to 50 security - findings per case. Security findings that are already attached to another - case will be detached from their previous case and attached to the specified - case. + description: 'Attach security findings to a case. + + You can attach up to 50 security findings per case. Security findings that + are already attached to another case will be detached from their previous + case and attached to the specified case.' operationId: AttachCase parameters: - - description: The unique identifier of the case to attach security findings - to + - description: Unique identifier of the case to attach security findings to in: path name: case_id required: true @@ -80106,12 +80090,16 @@ paths: - appsec_vm_write /api/v2/security/findings/jira_issues: patch: - description: Attach security findings to a Jira issue by providing the Jira - issue URL. You can attach up to 50 security findings per Jira issue. If the - Jira issue is not linked to any case, this operation will create a case for - the security findings and link the Jira issue to the newly created case. Security - findings that are already attached to another Jira issue will be detached - from their previous Jira issue and attached to the specified Jira issue. + description: 'Attach security findings to a Jira issue by providing the Jira + issue URL. + + You can attach up to 50 security findings per Jira issue. If the Jira issue + is not linked to any case, this operation will create a case for the security + findings and link the Jira issue to the newly created case. To configure the + Jira integration, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). + Security findings that are already attached to another Jira issue will be + detached from their previous Jira issue and attached to the specified Jira + issue.' operationId: AttachJiraIssue requestBody: content: @@ -80149,12 +80137,15 @@ paths: Please check the documentation regularly for updates.' post: - description: Create Jira issues for security findings. This operation creates - a case in Datadog and a Jira issue linked to that case for bidirectional sync - between Datadog and Jira. You can create up to 50 Jira issues per request - and associate up to 50 security findings per Jira issue. Security findings - that are already attached to another Jira issue will be detached from their - previous Jira issue and attached to the newly created Jira issue. + description: 'Create Jira issues for security findings. + + This operation creates a case in Datadog and a Jira issue linked to that case + for bidirectional sync between Datadog and Jira. To configure the Jira integration, + see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). + You can create up to 50 Jira issues per request and associate up to 50 security + findings per Jira issue. Security findings that are already attached to another + Jira issue will be detached from their previous Jira issue and attached to + the newly created Jira issue.' operationId: CreateJiraIssues requestBody: content: diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.frozen b/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.frozen deleted file mode 100644 index 6c188712b92..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-11-19T17:01:11.179Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.yml b/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.yml deleted file mode 100644 index 778a2ce2369..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.yml +++ /dev/null @@ -1,47 +0,0 @@ -http_interactions: -- recorded_at: Wed, 19 Nov 2025 17:01:11 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"case":{"data":{"id":"6a773295-8729-4034-aada-53b64cbe02e7","type":"cases"}}},"type":"jira_issues"}],"included":[{"attributes":{"description":"A - description","title":"A title"},"id":"6a773295-8729-4034-aada-53b64cbe02e7","relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"},{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security/findings/jira_issues - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"6a773295-8729-4034-aada-53b64cbe02e7","type":"cases","attributes":{"created_at":"2025-11-19T17:01:15.21452Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/dfa027f7c037b2f77159adc027fecb56?detection=static","resource_id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2402037","issue_key":"CSMSEC-105473","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105473","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-461","modified_at":"2025-11-19T17:01:16.621974Z","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A - title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 19 Nov 2025 17:01:11 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"id":"6a773295-8729-4034-aada-53b64cbe02e7","relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]}},"type":"cases"}}' - headers: - Accept: - - '*/*' - Content-Type: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v2/security/findings/cases - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.frozen b/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.frozen deleted file mode 100644 index 8bb7a59bf99..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-11-21T14:49:30.001Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.yml b/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.yml deleted file mode 100644 index 3f20ab01173..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.yml +++ /dev/null @@ -1,47 +0,0 @@ -http_interactions: -- recorded_at: Fri, 21 Nov 2025 14:49:30 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"case":{"data":{"id":"e469ceda-957a-4557-a607-9ff25032e9ca","type":"cases"}}},"type":"jira_issues"}],"included":[{"attributes":{"description":"A - description","title":"A title"},"id":"e469ceda-957a-4557-a607-9ff25032e9ca","relationships":{"findings":{"data":[{"id":"MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=","type":"findings"},{"id":"ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"},{"id":"MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=","type":"findings"},{"id":"ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=","type":"findings"}]}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security/findings/jira_issues - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"e469ceda-957a-4557-a607-9ff25032e9ca","type":"cases","attributes":{"created_at":"2025-11-21T14:49:32.034826Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/f16db9b7fa42c8a047777b354d6ccfe7?detection=static","resource_id":"ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="},{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/3510289f2aa284ab44f86b66e1f64cc7?detection=static","resource_id":"MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2407744","issue_key":"CSMSEC-105481","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105481","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-468","modified_at":"2025-11-21T14:49:33.306003Z","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A - title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Fri, 21 Nov 2025 14:49:30 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"id":"e469ceda-957a-4557-a607-9ff25032e9ca","relationships":{"findings":{"data":[{"id":"ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=","type":"findings"}]}},"type":"cases"}}' - headers: - Accept: - - '*/*' - Content-Type: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v2/security/findings/cases - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.frozen b/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.frozen deleted file mode 100644 index ff98ffb1a13..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-11-20T12:01:47.295Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.yml b/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.yml deleted file mode 100644 index 2a68f07664e..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.yml +++ /dev/null @@ -1,25 +0,0 @@ -http_interactions: -- recorded_at: Thu, 20 Nov 2025 12:01:47 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"case":{"data":{"id":"a7c38bab-ae98-4113-878c-c98799f914c2","type":"cases"}}},"type":"jira_issues"}],"included":[{"id":"a7c38bab-ae98-4113-878c-c98799f914c2","relationships":{"findings":{"data":[]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}]}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security/findings/jira_issues - response: - body: - encoding: UTF-8 - string: '{"errors":[{"status":"400","title":"Bad Request","detail":"no finding - provided"}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 400 - message: Bad Request -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.frozen b/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.frozen deleted file mode 100644 index e5b6d0d76b3..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-11-20T15:32:21.828Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.yml b/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.yml deleted file mode 100644 index 010a8f7eba6..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Thu, 20 Nov 2025 15:32:21 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"case":{"data":{"id":"53e242c6-a7d6-46ad-9680-b8d14753f716","type":"cases"}}},"type":"jira_issues"},{"attributes":{},"relationships":{"case":{"data":{"id":"195772b2-1f53-41d2-b81e-48c8e6c21d33","type":"cases"}}},"type":"jira_issues"}],"included":[{"attributes":{"description":"A - description","title":"A title"},"id":"53e242c6-a7d6-46ad-9680-b8d14753f716","relationships":{"findings":{"data":[{"id":"OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"attributes":{"description":"A - description","title":"A title"},"id":"195772b2-1f53-41d2-b81e-48c8e6c21d33","relationships":{"findings":{"data":[{"id":"MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"},{"id":"OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=","type":"findings"},{"id":"MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=","type":"findings"}]}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security/findings/jira_issues - response: - body: - encoding: UTF-8 - string: '{"data":[{"id":"53e242c6-a7d6-46ad-9680-b8d14753f716","type":"cases","attributes":{"created_at":"2025-11-20T15:32:23.777159Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/94762d2f0123331575cd81095e450f09?detection=static","resource_id":"OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2404837","issue_key":"CSMSEC-105480","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105480","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-467","modified_at":"2025-11-20T15:32:25.088199Z","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A - title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}},{"id":"195772b2-1f53-41d2-b81e-48c8e6c21d33","type":"cases","attributes":{"created_at":"2025-11-20T15:32:23.776904Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/13c7ffac3021be5d1bd4c5e07b575fca?detection=static","resource_id":"MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2404836","issue_key":"CSMSEC-105479","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105479","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-466","modified_at":"2025-11-20T15:32:24.96456Z","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A - title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Thu, 20 Nov 2025 15:32:21 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"id":"53e242c6-a7d6-46ad-9680-b8d14753f716","relationships":{"findings":{"data":[{"id":"OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=","type":"findings"}]}},"type":"cases"}}' - headers: - Accept: - - '*/*' - Content-Type: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v2/security/findings/cases - response: - body: - encoding: UTF-8 - string: '' - headers: {} - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.frozen b/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.frozen deleted file mode 100644 index f0ed0dd3f18..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2025-11-20T15:42:51.100Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.yml b/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.yml deleted file mode 100644 index 5595d0faa09..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.yml +++ /dev/null @@ -1,26 +0,0 @@ -http_interactions: -- recorded_at: Thu, 20 Nov 2025 15:42:51 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"case":{"data":{"id":"6ed1d7c2-e1a3-4369-b92b-a38d3cc75cf3","type":"cases"}}},"type":"jira_issues"}],"included":[{"attributes":{"description":"A - description","title":"A title"},"id":"6ed1d7c2-e1a3-4369-b92b-a38d3cc75cf3","relationships":{"findings":{"data":[{"id":"YzM2MTFjYzcyNmY0Zjg4MTAxZmRlNjQ1MWU1ZGQwYzR-YzI5NzE5Y2Y4MzU4ZjliNzhkNjYxNTY0ODIzZDQ2YTM=","type":"findings"}]},"project":{"data":{"id":"00000000-0000-0000-0000-000000000000","type":"projects"}}},"type":"cases"},{"id":"00000000-0000-0000-0000-000000000000","type":"projects"},{"id":"YzM2MTFjYzcyNmY0Zjg4MTAxZmRlNjQ1MWU1ZGQwYzR-YzI5NzE5Y2Y4MzU4ZjliNzhkNjYxNTY0ODIzZDQ2YTM=","type":"findings"}]}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security/findings/jira_issues - response: - body: - encoding: UTF-8 - string: '{"errors":[{"status":"404","title":"Not Found","detail":"project not - found"}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 404 - message: Not Found -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.frozen b/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.frozen index a6ccca66ab5..d2ad4b4dd73 100644 --- a/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.frozen +++ b/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.frozen @@ -1 +1 @@ -2025-11-19T13:45:48.321Z \ No newline at end of file +2025-12-12T14:46:23.960Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.yml b/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.yml index 5faeadee24a..0533f4aa7a8 100644 --- a/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.yml +++ b/cassettes/features/v2/security_monitoring/Create-case-for-security-finding-returns-Created-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 19 Nov 2025 13:45:48 GMT +- recorded_at: Fri, 12 Dec 2025 14:46:23 GMT request: body: encoding: UTF-8 - string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"}]}' + string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"}]}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"id":"639c5df7-2352-4fc6-9d39-7dc8bdb8af14","type":"cases","attributes":{"created_at":"2025-11-19T13:45:50.295906Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/dfa027f7c037b2f77159adc027fecb56?detection=static","resource_id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="}],"key":"CSMINV-454","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A + string: '{"data":[{"id":"42905bad-351b-4c81-94c1-f3374e861f23","type":"cases","attributes":{"created_at":"2025-12-12T14:46:27.55028Z","creation_source":"CS_SECURITY_FINDING","description":"A + description","insights":[{"type":"SECURITY_FINDING","ref":"/security/csm/vm?vulnerability=b7a4377d251cbe0a6747a184a96b8909","resource_id":"YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE="}],"key":"CSMINV-506","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}' headers: Content-Type: @@ -23,11 +23,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Wed, 19 Nov 2025 13:45:48 GMT +- recorded_at: Fri, 12 Dec 2025 14:46:23 GMT request: body: encoding: UTF-8 - string: '{"data":{"id":"639c5df7-2352-4fc6-9d39-7dc8bdb8af14","relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]}},"type":"cases"}}' + string: '{"data":{"relationships":{"findings":{"data":[{"id":"YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=","type":"findings"}]}},"type":"cases"}}' headers: Accept: - '*/*' diff --git a/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.frozen b/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.frozen index 11d711428d3..5f043761a30 100644 --- a/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.frozen +++ b/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.frozen @@ -1 +1 @@ -2025-11-19T13:46:07.661Z \ No newline at end of file +2025-12-12T14:49:04.977Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.yml b/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.yml index 76df2324d89..624576839f4 100644 --- a/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.yml +++ b/cassettes/features/v2/security_monitoring/Create-case-for-security-findings-returns-Created-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 19 Nov 2025 13:46:07 GMT +- recorded_at: Fri, 12 Dec 2025 14:49:04 GMT request: body: encoding: UTF-8 - string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"},{"id":"MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"}]}' + string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"ZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg==","type":"findings"},{"id":"c2FuLXhyaS1kZnN-aS0wODM3MjVhMTM2MDExNzNkOQ==","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"}]}' headers: Accept: - application/json @@ -14,8 +14,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"id":"2c1ac0c4-e8cf-4699-8781-09077b10d2a0","type":"cases","attributes":{"created_at":"2025-11-19T13:46:09.874194Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/36d53183f8fefbbc2208878f3d2011f0?detection=static","resource_id":"MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU="},{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/dfa027f7c037b2f77159adc027fecb56?detection=static","resource_id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="}],"key":"CSMINV-455","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A + string: '{"data":[{"id":"6e5599c0-181f-4066-a44d-056bedafd639","type":"cases","attributes":{"created_at":"2025-12-12T14:49:06.574693Z","creation_source":"CS_SECURITY_FINDING","description":"A + description","insights":[{"type":"SECURITY_FINDING","ref":"/security/compliance?panels=cpfinding%7Cevent%7CruleId%3Ae7y-cnb-lye%7CresourceId%3Ai-02264fcf4fed98322\u0026query=%40finding_id%3AZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg%3D%3D","resource_id":"ZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg=="},{"type":"SECURITY_FINDING","ref":"/security/compliance?panels=cpfinding%7Cevent%7CruleId%3Asan-xri-dfs%7CresourceId%3Ai-083725a13601173d9\u0026query=%40finding_id%3Ac2FuLXhyaS1kZnN-aS0wODM3MjVhMTM2MDExNzNkOQ%3D%3D","resource_id":"c2FuLXhyaS1kZnN-aS0wODM3MjVhMTM2MDExNzNkOQ=="}],"key":"CSMINV-509","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}' headers: Content-Type: @@ -23,11 +23,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Wed, 19 Nov 2025 13:46:07 GMT +- recorded_at: Fri, 12 Dec 2025 14:49:04 GMT request: body: encoding: UTF-8 - string: '{"data":{"id":"2c1ac0c4-e8cf-4699-8781-09077b10d2a0","relationships":{"findings":{"data":[{"id":"MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=","type":"findings"}]}},"type":"cases"}}' + string: '{"data":{"relationships":{"findings":{"data":[{"id":"ZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg==","type":"findings"}]}},"type":"cases"}}' headers: Accept: - '*/*' diff --git a/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.frozen b/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.frozen index d1e05ac25c0..19c30957a6a 100644 --- a/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.frozen +++ b/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.frozen @@ -1 +1 @@ -2025-11-19T13:54:20.603Z \ No newline at end of file +2025-12-12T14:47:03.612Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.yml b/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.yml index a9d014a2713..091b9d7ef2d 100644 --- a/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.yml +++ b/cassettes/features/v2/security_monitoring/Create-cases-for-security-findings-returns-Created-response.yml @@ -1,10 +1,10 @@ http_interactions: -- recorded_at: Wed, 19 Nov 2025 13:54:20 GMT +- recorded_at: Fri, 12 Dec 2025 14:47:03 GMT request: body: encoding: UTF-8 - string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"attributes":{"description":"A - description","title":"A title"},"relationships":{"findings":{"data":[{"id":"MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"}]}' + string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"},{"attributes":{"description":"A + description","title":"A title"},"relationships":{"findings":{"data":[{"id":"OGRlMDIwYzk4MjFmZTZiNTQwMzk2ZjUxNzg0MDc0NjR-MTk3Yjk4MDI4ZDQ4YzI2ZGZiMWJmMTNhNDEwZGZkYWI=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"cases"}]}' headers: Accept: - application/json @@ -15,10 +15,10 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"id":"7d16945b-baf8-411e-ab2a-20fe43af1ea3","type":"cases","attributes":{"created_at":"2025-11-19T13:54:23.634063Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/dfa027f7c037b2f77159adc027fecb56?detection=static","resource_id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="}],"key":"CSMINV-459","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A - title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}},{"id":"601cab78-ef04-4bdf-901a-55533afbde0b","type":"cases","attributes":{"created_at":"2025-11-19T13:54:23.634552Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/appsec/vm/library/vulnerability/36d53183f8fefbbc2208878f3d2011f0?detection=static","resource_id":"MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU="}],"key":"CSMINV-458","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A + string: '{"data":[{"id":"a12c9894-ba42-408e-b4bf-b8944ca203c1","type":"cases","attributes":{"created_at":"2025-12-12T14:47:06.96093Z","creation_source":"CS_SECURITY_FINDING","description":"A + description","insights":[{"type":"SECURITY_FINDING","ref":"/security/csm/vm?vulnerability=b7a4377d251cbe0a6747a184a96b8909","resource_id":"YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE="}],"key":"CSMINV-508","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A + title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}},{"id":"72589c11-2e4c-4592-8ab6-dcdddd176236","type":"cases","attributes":{"created_at":"2025-12-12T14:47:06.960652Z","creation_source":"CS_SECURITY_FINDING","description":"A + description","insights":[{"type":"SECURITY_FINDING","ref":"/security/csm/vm?vulnerability=8de020c9821fe6b540396f5178407464","resource_id":"OGRlMDIwYzk4MjFmZTZiNTQwMzk2ZjUxNzg0MDc0NjR-MTk3Yjk4MDI4ZDQ4YzI2ZGZiMWJmMTNhNDEwZGZkYWI="}],"key":"CSMINV-507","priority":"NOT_DEFINED","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"A title","type":"SECURITY"},"relationships":{"created_by":{"data":{"id":"dc09afab-6ae7-11ef-92b1-828dac1b0195","type":"users"}},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}}}]}' headers: Content-Type: @@ -26,11 +26,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Wed, 19 Nov 2025 13:54:20 GMT +- recorded_at: Fri, 12 Dec 2025 14:47:03 GMT request: body: encoding: UTF-8 - string: '{"data":{"id":"7d16945b-baf8-411e-ab2a-20fe43af1ea3","relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]}},"type":"cases"}}' + string: '{"data":{"relationships":{"findings":{"data":[{"id":"YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=","type":"findings"}]}},"type":"cases"}}' headers: Accept: - '*/*' diff --git a/examples/v2/security-monitoring/CreateCases.rb b/examples/v2/security-monitoring/CreateCases.rb index dd27ba42195..0f2cf57d3d8 100644 --- a/examples/v2/security-monitoring/CreateCases.rb +++ b/examples/v2/security-monitoring/CreateCases.rb @@ -14,7 +14,7 @@ findings: DatadogAPIClient::V2::Findings.new({ data: [ DatadogAPIClient::V2::FindingData.new({ - id: "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", + id: "YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, }), ], @@ -37,7 +37,7 @@ findings: DatadogAPIClient::V2::Findings.new({ data: [ DatadogAPIClient::V2::FindingData.new({ - id: "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=", + id: "OGRlMDIwYzk4MjFmZTZiNTQwMzk2ZjUxNzg0MDc0NjR-MTk3Yjk4MDI4ZDQ4YzI2ZGZiMWJmMTNhNDEwZGZkYWI=", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, }), ], diff --git a/examples/v2/security-monitoring/CreateCases_2385516013.rb b/examples/v2/security-monitoring/CreateCases_2385516013.rb index eed17aefff9..853d8d2cd72 100644 --- a/examples/v2/security-monitoring/CreateCases_2385516013.rb +++ b/examples/v2/security-monitoring/CreateCases_2385516013.rb @@ -14,7 +14,7 @@ findings: DatadogAPIClient::V2::Findings.new({ data: [ DatadogAPIClient::V2::FindingData.new({ - id: "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", + id: "YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, }), ], diff --git a/examples/v2/security-monitoring/CreateCases_2798851680.rb b/examples/v2/security-monitoring/CreateCases_2798851680.rb index 4e15675d31e..a828a0fc3d9 100644 --- a/examples/v2/security-monitoring/CreateCases_2798851680.rb +++ b/examples/v2/security-monitoring/CreateCases_2798851680.rb @@ -14,11 +14,11 @@ findings: DatadogAPIClient::V2::Findings.new({ data: [ DatadogAPIClient::V2::FindingData.new({ - id: "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", + id: "ZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg==", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, }), DatadogAPIClient::V2::FindingData.new({ - id: "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=", + id: "c2FuLXhyaS1kZnN-aS0wODM3MjVhMTM2MDExNzNkOQ==", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, }), ], diff --git a/examples/v2/security-monitoring/CreateJiraIssues.rb b/examples/v2/security-monitoring/CreateJiraIssues.rb index eb5188b1f5d..18c2650be1a 100644 --- a/examples/v2/security-monitoring/CreateJiraIssues.rb +++ b/examples/v2/security-monitoring/CreateJiraIssues.rb @@ -1,95 +1,40 @@ # Create Jira issues for security findings returns "Created" response require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_jira_issues".to_sym] = true +end api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new body = DatadogAPIClient::V2::CreateJiraIssueRequestArray.new({ data: [ DatadogAPIClient::V2::CreateJiraIssueRequestData.new({ - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({}), - relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - _case: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCase.new({ - data: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCaseData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - id: "53e242c6-a7d6-46ad-9680-b8d14753f716", - }), - }), + attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({ + assignee_id: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", + description: "A description of the Jira issue.", + fields: { + "key1": "value", "key2": "['value']", "key3": "{'key4': 'value'}", + }, + priority: DatadogAPIClient::V2::CasePriority::NOT_DEFINED, + title: "A title for the Jira issue.", }), - }), - DatadogAPIClient::V2::CreateJiraIssueRequestData.new({ - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({}), relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - _case: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCase.new({ - data: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCaseData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - id: "195772b2-1f53-41d2-b81e-48c8e6c21d33", - }), - }), - }), - }), - ], - included: [ - DatadogAPIClient::V2::CreateCaseRequestData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - attributes: DatadogAPIClient::V2::CreateCaseRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateCaseRequestDataRelationships.new({ - project: DatadogAPIClient::V2::CaseManagementProject.new({ - data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - }), - }), findings: DatadogAPIClient::V2::Findings.new({ data: [ DatadogAPIClient::V2::FindingData.new({ + id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=", }), ], }), - }), - id: "53e242c6-a7d6-46ad-9680-b8d14753f716", - }), - DatadogAPIClient::V2::CreateCaseRequestData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - attributes: DatadogAPIClient::V2::CreateCaseRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateCaseRequestDataRelationships.new({ project: DatadogAPIClient::V2::CaseManagementProject.new({ data: DatadogAPIClient::V2::CaseManagementProjectData.new({ + id: "aeadc05e-98a8-11ec-ac2c-da7ad0900001", type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", }), }), - findings: DatadogAPIClient::V2::Findings.new({ - data: [ - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=", - }), - ], - }), }), - id: "195772b2-1f53-41d2-b81e-48c8e6c21d33", - }), - DatadogAPIClient::V2::CaseManagementProjectData.new({ - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - }), - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=", - }), - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=", + type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, }), ], }) diff --git a/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb b/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb deleted file mode 100644 index fd584f4c763..00000000000 --- a/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb +++ /dev/null @@ -1,56 +0,0 @@ -# Create Jira issue for security finding returns "Created" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -body = DatadogAPIClient::V2::CreateJiraIssueRequestArray.new({ - data: [ - DatadogAPIClient::V2::CreateJiraIssueRequestData.new({ - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({}), - relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - _case: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCase.new({ - data: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCaseData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - id: "6a773295-8729-4034-aada-53b64cbe02e7", - }), - }), - }), - }), - ], - included: [ - DatadogAPIClient::V2::CreateCaseRequestData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - attributes: DatadogAPIClient::V2::CreateCaseRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateCaseRequestDataRelationships.new({ - project: DatadogAPIClient::V2::CaseManagementProject.new({ - data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - }), - }), - findings: DatadogAPIClient::V2::Findings.new({ - data: [ - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", - }), - ], - }), - }), - id: "6a773295-8729-4034-aada-53b64cbe02e7", - }), - DatadogAPIClient::V2::CaseManagementProjectData.new({ - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - }), - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", - }), - ], -}) -p api_instance.create_jira_issues(body) diff --git a/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb b/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb deleted file mode 100644 index 174c004a087..00000000000 --- a/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb +++ /dev/null @@ -1,64 +0,0 @@ -# Create Jira issue for security findings returns "Created" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -body = DatadogAPIClient::V2::CreateJiraIssueRequestArray.new({ - data: [ - DatadogAPIClient::V2::CreateJiraIssueRequestData.new({ - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({}), - relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - _case: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCase.new({ - data: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCaseData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - id: "e469ceda-957a-4557-a607-9ff25032e9ca", - }), - }), - }), - }), - ], - included: [ - DatadogAPIClient::V2::CreateCaseRequestData.new({ - type: DatadogAPIClient::V2::CaseDataType::CASES, - attributes: DatadogAPIClient::V2::CreateCaseRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateCaseRequestDataRelationships.new({ - project: DatadogAPIClient::V2::CaseManagementProject.new({ - data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - }), - }), - findings: DatadogAPIClient::V2::Findings.new({ - data: [ - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=", - }), - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=", - }), - ], - }), - }), - id: "e469ceda-957a-4557-a607-9ff25032e9ca", - }), - DatadogAPIClient::V2::CaseManagementProjectData.new({ - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - }), - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=", - }), - DatadogAPIClient::V2::FindingData.new({ - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - id: "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=", - }), - ], -}) -p api_instance.create_jira_issues(body) diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 7dc352a7a4e..b6d8bf921cb 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -258,75 +258,27 @@ Feature: Security Monitoring Then the response status is 200 OK And the response "terraformContent" is equal to "resource \"datadog_security_monitoring_rule\" \"_{{ unique_hash }}\" {\n\tname = \"_{{ unique_hash }}\"\n\tenabled = true\n\tquery {\n\t\tquery = \"@test:true\"\n\t\tgroup_by_fields = []\n\t\thas_optional_group_by_fields = false\n\t\tdistinct_fields = []\n\t\taggregation = \"count\"\n\t\tname = \"\"\n\t\tdata_source = \"logs\"\n\t}\n\toptions {\n\t\tkeep_alive = 3600\n\t\tmax_signal_duration = 86400\n\t\tdetection_method = \"threshold\"\n\t\tevaluation_window = 900\n\t}\n\tcase {\n\t\tname = \"\"\n\t\tstatus = \"info\"\n\t\tnotifications = []\n\t\tcondition = \"a > 0\"\n\t}\n\tmessage = \"Test rule\"\n\ttags = []\n\thas_extended_title = false\n\ttype = \"log_detection\"\n}\n" - @skip @team:DataDog/k9-investigation - Scenario: Create Jira issue for security finding returns "Created" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"type": "jira_issues", "attributes": {}, "relationships": {"case": {"data": {"type": "cases", "id": "6a773295-8729-4034-aada-53b64cbe02e7"}}}}], "included": [{"type": "cases", "attributes": {"title": "A title", "description": "A description"}, "relationships": {"project": {"data": {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}}, "findings": {"data": [{"type": "findings", "id": "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="}]}}, "id": "6a773295-8729-4034-aada-53b64cbe02e7"}, {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}, {"type": "findings", "id": "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y="}]} - When the request is sent - Then the response status is 201 Created - And the response "data" has length 1 - And the response "data[0]" has field "id" - And the response "data[0].attributes.title" is equal to "A title" - And the response "data[0].attributes.description" is equal to "A description" - And the response "data[0].attributes.type" is equal to "SECURITY" - And the response "data[0].attributes.insights" has length 1 - And the response "data[0].attributes.insights[0].resource_id" is equal to "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=" - And the response "data[0].attributes.insights[0].type" is equal to "SECURITY_FINDING" - And the response "data[0].attributes.jira_issue.status" is equal to "COMPLETED" - - @skip @team:DataDog/k9-investigation - Scenario: Create Jira issue for security findings returns "Created" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"type": "jira_issues", "attributes": {}, "relationships": {"case": {"data": {"type": "cases", "id": "e469ceda-957a-4557-a607-9ff25032e9ca"}}}}], "included": [{"type": "cases", "attributes": {"title": "A title", "description": "A description"}, "relationships": {"project": {"data": {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}}, "findings": {"data": [{"type": "findings", "id": "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="}, {"type": "findings", "id": "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="}]}}, "id": "e469ceda-957a-4557-a607-9ff25032e9ca"}, {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}, {"type": "findings", "id": "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="}, {"type": "findings", "id": "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY="}]} - When the request is sent - Then the response status is 201 Created - And the response "data" has length 1 - And the response "data[0]" has field "id" - And the response "data[0].attributes.title" is equal to "A title" - And the response "data[0].attributes.description" is equal to "A description" - And the response "data[0].attributes.type" is equal to "SECURITY" - And the response "data[0].attributes.insights" has length 2 - And the response "data[0].attributes.insights[1].resource_id" is equal to "MzUxMDI4OWYyYWEyODRhYjQ0Zjg2YjY2ZTFmNjRjYzd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=" - And the response "data[0].attributes.insights[1].type" is equal to "SECURITY_FINDING" - And the response "data[0].attributes.insights[0].resource_id" is equal to "ZjE2ZGI5YjdmYTQyYzhhMDQ3Nzc3YjM1NGQ2Y2NmZTd-NDU2OWQyNTk1MjM5OGI2NzJjMTVhYjhiODY1ZDcwZWY=" - And the response "data[0].attributes.insights[0].type" is equal to "SECURITY_FINDING" - And the response "data[0].attributes.jira_issue.status" is equal to "COMPLETED" - - @skip @team:DataDog/k9-investigation + @generated @skip @team:DataDog/k9-investigation Scenario: Create Jira issues for security findings returns "Bad Request" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"type": "jira_issues", "attributes": {}, "relationships": {"case": {"data": {"type": "cases", "id": "a7c38bab-ae98-4113-878c-c98799f914c2"}}}}], "included": [{"type": "cases", "relationships": {"project": {"data": {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}}, "findings": {"data": []}}, "id": "a7c38bab-ae98-4113-878c-c98799f914c2"}, {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}]} + Given operation "CreateJiraIssues" enabled + And new "CreateJiraIssues" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Jira issue.", "fields": {"key1": "value", "key2": ["value"], "key3": {"key4": "value"}}, "priority": "NOT_DEFINED", "title": "A title for the Jira issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "jira_issues"}]} When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/k9-investigation + @generated @skip @team:DataDog/k9-investigation Scenario: Create Jira issues for security findings returns "Created" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"type": "jira_issues", "attributes":{}, "relationships": {"case": {"data": {"type": "cases", "id":"53e242c6-a7d6-46ad-9680-b8d14753f716"}}}}, {"type": "jira_issues", "attributes": {}, "relationships": {"case": {"data": {"type": "cases", "id": "195772b2-1f53-41d2-b81e-48c8e6c21d33"}}}}], "included":[{"type":"cases", "attributes":{"title":"A title", "description":"A description"}, "relationships":{"project":{"data":{"type":"projects", "id":"959a6f71-bac8-4027-b1d3-2264f569296f"}}, "findings": {"data": [{"type": "findings", "id": "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI="}]}}, "id": "53e242c6-a7d6-46ad-9680-b8d14753f716"}, {"type": "cases", "attributes": {"title": "A title", "description": "A description"}, "relationships": {"project": {"data": {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}}, "findings": {"data":[{"type": "findings", "id": "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM="}]}}, "id": "195772b2-1f53-41d2-b81e-48c8e6c21d33"}, {"type": "projects", "id": "959a6f71-bac8-4027-b1d3-2264f569296f"}, {"type": "findings", "id": "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI="}, {"type": "findings", "id": "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM="}]} + Given operation "CreateJiraIssues" enabled + And new "CreateJiraIssues" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Jira issue.", "fields": {"key1": "value", "key2": ["value"], "key3": {"key4": "value"}}, "priority": "NOT_DEFINED", "title": "A title for the Jira issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "jira_issues"}]} When the request is sent Then the response status is 201 Created - And the response "data" has length 2 - And the response "data[0]" has field "id" - And the response "data[0].attributes.title" is equal to "A title" - And the response "data[0].attributes.description" is equal to "A description" - And the response "data[0].attributes.type" is equal to "SECURITY" - And the response "data[0].attributes.insights" has length 1 - And the response "data[0].attributes.insights[0].resource_id" is equal to "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=" - And the response "data[0].attributes.insights[0].type" is equal to "SECURITY_FINDING" - And the response "data[0].attributes.jira_issue.status" is equal to "COMPLETED" - And the response "data[1]" has field "id" - And the response "data[1].attributes.title" is equal to "A title" - And the response "data[1].attributes.description" is equal to "A description" - And the response "data[1].attributes.type" is equal to "SECURITY" - And the response "data[1].attributes.insights" has length 1 - And the response "data[1].attributes.insights[0].resource_id" is equal to "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=" - And the response "data[1].attributes.insights[0].type" is equal to "SECURITY_FINDING" - And the response "data[1].attributes.jira_issue.status" is equal to "COMPLETED" - @skip @team:DataDog/k9-investigation + @generated @skip @team:DataDog/k9-investigation Scenario: Create Jira issues for security findings returns "Not Found" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"type": "jira_issues", "attributes": {}, "relationships": {"case": {"data": {"type": "cases", "id": "6ed1d7c2-e1a3-4369-b92b-a38d3cc75cf3"}}}}], "included": [{"type": "cases", "attributes": {"title": "A title", "description": "A description"}, "relationships": {"project": {"data": {"type": "projects", "id": "00000000-0000-0000-0000-000000000000"}}, "findings": {"data": [{"type": "findings", "id": "YzM2MTFjYzcyNmY0Zjg4MTAxZmRlNjQ1MWU1ZGQwYzR-YzI5NzE5Y2Y4MzU4ZjliNzhkNjYxNTY0ODIzZDQ2YTM="}]}}, "id": "6ed1d7c2-e1a3-4369-b92b-a38d3cc75cf3"}, {"type": "projects", "id": "00000000-0000-0000-0000-000000000000"}, {"type": "findings", "id": "YzM2MTFjYzcyNmY0Zjg4MTAxZmRlNjQ1MWU1ZGQwYzR-YzI5NzE5Y2Y4MzU4ZjliNzhkNjYxNTY0ODIzZDQ2YTM="}]} + Given operation "CreateJiraIssues" enabled + And new "CreateJiraIssues" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Jira issue.", "fields": {"key1": "value", "key2": ["value"], "key3": {"key4": "value"}}, "priority": "NOT_DEFINED", "title": "A title for the Jira issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "jira_issues"}]} When the request is sent Then the response status is 404 Not Found @@ -557,7 +509,7 @@ Feature: Security Monitoring @team:DataDog/k9-investigation Scenario: Create case for security finding returns "Created" response Given new "CreateCases" request - And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}]} + And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}]} When the request is sent Then the response status is 201 Created And the response "data" has length 1 @@ -566,13 +518,13 @@ Feature: Security Monitoring And the response "data[0].attributes.description" is equal to "A description" And the response "data[0].attributes.type" is equal to "SECURITY" And the response "data[0].attributes.insights" has length 1 - And the response "data[0].attributes.insights[0].resource_id" is equal to "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=" + And the response "data[0].attributes.insights[0].resource_id" is equal to "YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=" And the response "data[0].attributes.insights[0].type" is equal to "SECURITY_FINDING" @team:DataDog/k9-investigation Scenario: Create case for security findings returns "Created" response Given new "CreateCases" request - And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", "type": "findings"}, {"id": "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}]} + And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "ZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg==", "type": "findings"}, {"id": "c2FuLXhyaS1kZnN-aS0wODM3MjVhMTM2MDExNzNkOQ==", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}]} When the request is sent Then the response status is 201 Created And the response "data" has length 1 @@ -581,9 +533,9 @@ Feature: Security Monitoring And the response "data[0].attributes.description" is equal to "A description" And the response "data[0].attributes.type" is equal to "SECURITY" And the response "data[0].attributes.insights" has length 2 - And the response "data[0].attributes.insights[1].resource_id" is equal to "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=" + And the response "data[0].attributes.insights[1].resource_id" is equal to "c2FuLXhyaS1kZnN-aS0wODM3MjVhMTM2MDExNzNkOQ==" And the response "data[0].attributes.insights[1].type" is equal to "SECURITY_FINDING" - And the response "data[0].attributes.insights[0].resource_id" is equal to "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=" + And the response "data[0].attributes.insights[0].resource_id" is equal to "ZTd5LWNuYi1seWV-aS0wMjI2NGZjZjRmZWQ5ODMyMg==" And the response "data[0].attributes.insights[0].type" is equal to "SECURITY_FINDING" @team:DataDog/k9-investigation @@ -596,7 +548,7 @@ Feature: Security Monitoring @team:DataDog/k9-investigation Scenario: Create cases for security findings returns "Created" response Given new "CreateCases" request - And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}, {"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}]} + And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}, {"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "OGRlMDIwYzk4MjFmZTZiNTQwMzk2ZjUxNzg0MDc0NjR-MTk3Yjk4MDI4ZDQ4YzI2ZGZiMWJmMTNhNDEwZGZkYWI=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "cases"}]} When the request is sent Then the response status is 201 Created And the response "data" has length 2 @@ -605,14 +557,14 @@ Feature: Security Monitoring And the response "data[0].attributes.description" is equal to "A description" And the response "data[0].attributes.type" is equal to "SECURITY" And the response "data[0].attributes.insights" has length 1 - And the response "data[0].attributes.insights[0].resource_id" is equal to "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=" + And the response "data[0].attributes.insights[0].resource_id" is equal to "YjdhNDM3N2QyNTFjYmUwYTY3NDdhMTg0YTk2Yjg5MDl-ZjNmMzAwOTFkZDNhNGQzYzI0MzgxNTk4MjRjZmE2NzE=" And the response "data[0].attributes.insights[0].type" is equal to "SECURITY_FINDING" And the response "data[1]" has field "id" And the response "data[1].attributes.title" is equal to "A title" And the response "data[1].attributes.description" is equal to "A description" And the response "data[1].attributes.type" is equal to "SECURITY" And the response "data[1].attributes.insights" has length 1 - And the response "data[1].attributes.insights[0].resource_id" is equal to "MzZkNTMxODNmOGZlZmJiYzIyMDg4NzhmM2QyMDExZjB-ZmY5NzUwNDQzYTE0MGIyNDM1MTg4YjkxZDNmMDU4OGU=" + And the response "data[1].attributes.insights[0].resource_id" is equal to "OGRlMDIwYzk4MjFmZTZiNTQwMzk2ZjUxNzg0MDc0NjR-MTk3Yjk4MDI4ZDQ4YzI2ZGZiMWJmMTNhNDEwZGZkYWI=" And the response "data[1].attributes.insights[0].type" is equal to "SECURITY_FINDING" @team:DataDog/k9-investigation diff --git a/features/v2/undo.json b/features/v2/undo.json index 396d5238362..4d590026bd7 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3715,7 +3715,7 @@ "parameters": [ { "name": "body", - "template": "{\n \"data\": {\n \"type\": \"cases\",\n \"id\": \"{{data[0].id}}\",\n \"relationships\": {\n \"findings\": {\n \"data\": [\n {\n \"type\": \"findings\",\n \"id\": \"{{data[0].attributes.insights[0].resource_id}}\"\n }\n ]\n }\n }\n }\n}" + "template": "{\n \"data\": {\n \"type\": \"cases\",\n \"relationships\": {\n \"findings\": {\n \"data\": [\n {\n \"type\": \"findings\",\n \"id\": \"{{data[0].attributes.insights[0].resource_id}}\"\n }\n ]\n }\n }\n }\n}" } ], "type": "unsafe" @@ -3740,7 +3740,7 @@ "parameters": [ { "name": "body", - "template": "{\n \"data\": {\n \"type\": \"cases\",\n \"id\": \"{{data[0].id}}\",\n \"relationships\": {\n \"findings\": {\n \"data\": [\n {\n \"type\": \"findings\",\n \"id\": \"{{data[0].attributes.insights[0].resource_id}}\"\n }\n ]\n }\n }\n }\n}" + "template": "{\n \"data\": {\n \"type\": \"cases\",\n \"relationships\": {\n \"findings\": {\n \"data\": [\n {\n \"type\": \"findings\",\n \"id\": \"{{data[0].attributes.insights[0].resource_id}}\"\n }\n ]\n }\n }\n }\n}" } ], "type": "unsafe" diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c4403aa3103..7563ce9aaa7 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1709,13 +1709,9 @@ def overrides "v2.create_incident_notification_rule_request" => "CreateIncidentNotificationRuleRequest", "v2.create_incident_notification_template_request" => "CreateIncidentNotificationTemplateRequest", "v2.create_jira_issue_request_array" => "CreateJiraIssueRequestArray", - "v2.create_jira_issue_request_array_included" => "CreateJiraIssueRequestArrayIncluded", "v2.create_jira_issue_request_data" => "CreateJiraIssueRequestData", "v2.create_jira_issue_request_data_attributes" => "CreateJiraIssueRequestDataAttributes", - "v2.create_jira_issue_request_data_attributes_fields" => "CreateJiraIssueRequestDataAttributesFields", "v2.create_jira_issue_request_data_relationships" => "CreateJiraIssueRequestDataRelationships", - "v2.create_jira_issue_request_data_relationships_case" => "CreateJiraIssueRequestDataRelationshipsCase", - "v2.create_jira_issue_request_data_relationships_case_data" => "CreateJiraIssueRequestDataRelationshipsCaseData", "v2.create_notification_rule_parameters" => "CreateNotificationRuleParameters", "v2.create_notification_rule_parameters_data" => "CreateNotificationRuleParametersData", "v2.create_notification_rule_parameters_data_attributes" => "CreateNotificationRuleParametersDataAttributes", diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index b0c6a3267a3..279c9473db1 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -33,9 +33,10 @@ def attach_case(case_id, body, opts = {}) # Attach security findings to a case. # - # Attach security findings to a case. You can attach up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the specified case. + # Attach security findings to a case. + # You can attach up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the specified case. # - # @param case_id [String] The unique identifier of the case to attach security findings to + # @param case_id [String] Unique identifier of the case to attach security findings to # @param body [AttachCaseRequest] # @param opts [Hash] the optional parameters # @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers @@ -105,7 +106,8 @@ def attach_jira_issue(body, opts = {}) # Attach security findings to a Jira issue. # - # Attach security findings to a Jira issue by providing the Jira issue URL. You can attach up to 50 security findings per Jira issue. If the Jira issue is not linked to any case, this operation will create a case for the security findings and link the Jira issue to the newly created case. Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the specified Jira issue. + # Attach security findings to a Jira issue by providing the Jira issue URL. + # You can attach up to 50 security findings per Jira issue. If the Jira issue is not linked to any case, this operation will create a case for the security findings and link the Jira issue to the newly created case. To configure the Jira integration, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the specified Jira issue. # # @param body [AttachJiraIssueRequest] # @param opts [Hash] the optional parameters @@ -466,7 +468,8 @@ def create_cases(body, opts = {}) # Create cases for security findings. # - # Create cases for security findings. You can create up to 50 cases per request and associate up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the newly created case. + # Create cases for security findings. + # You can create up to 50 cases per request and associate up to 50 security findings per case. Security findings that are already attached to another case will be detached from their previous case and attached to the newly created case. # # @param body [CreateCaseRequestArray] # @param opts [Hash] the optional parameters @@ -600,7 +603,8 @@ def create_jira_issues(body, opts = {}) # Create Jira issues for security findings. # - # Create Jira issues for security findings. This operation creates a case in Datadog and a Jira issue linked to that case for bidirectional sync between Datadog and Jira. You can create up to 50 Jira issues per request and associate up to 50 security findings per Jira issue. Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the newly created Jira issue. + # Create Jira issues for security findings. + # This operation creates a case in Datadog and a Jira issue linked to that case for bidirectional sync between Datadog and Jira. To configure the Jira integration, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). You can create up to 50 Jira issues per request and associate up to 50 security findings per Jira issue. Security findings that are already attached to another Jira issue will be detached from their previous Jira issue and attached to the newly created Jira issue. # # @param body [CreateJiraIssueRequestArray] # @param opts [Hash] the optional parameters @@ -1477,7 +1481,8 @@ def detach_case(body, opts = {}) # Detach security findings from their case. # - # Detach security findings from their case. This operation dissociates security findings from their associated cases without deleting the cases themselves. You can detach security findings from multiple different cases in a single request, with a limit of 50 security findings per request. Security findings that are not currently attached to any case will be ignored. + # Detach security findings from their case. + # This operation dissociates security findings from their associated cases without deleting the cases themselves. You can detach security findings from multiple different cases in a single request, with a limit of 50 security findings per request. Security findings that are not currently attached to any case will be ignored. # # @param body [DetachCaseRequest] # @param opts [Hash] the optional parameters diff --git a/lib/datadog_api_client/v2/models/attach_case_request_data.rb b/lib/datadog_api_client/v2/models/attach_case_request_data.rb index bea13b72a2e..e04e14db202 100644 --- a/lib/datadog_api_client/v2/models/attach_case_request_data.rb +++ b/lib/datadog_api_client/v2/models/attach_case_request_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class AttachCaseRequestData include BaseGenericModel - # The unique identifier of the case. + # Unique identifier of the case. attr_reader :id # Relationships of the case to attach security findings to. diff --git a/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb b/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb index 0ab8a9d76e5..cf1e3e973af 100644 --- a/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb +++ b/lib/datadog_api_client/v2/models/attach_jira_issue_request_data.rb @@ -24,9 +24,6 @@ class AttachJiraIssueRequestData # Attributes of the Jira issue to attach security findings to. attr_accessor :attributes - # The unique identifier of the Jira issue attachment request. - attr_accessor :id - # Relationships of the Jira issue to attach security findings to. attr_accessor :relationships @@ -40,7 +37,6 @@ class AttachJiraIssueRequestData def self.attribute_map { :'attributes' => :'attributes', - :'id' => :'id', :'relationships' => :'relationships', :'type' => :'type' } @@ -51,7 +47,6 @@ def self.attribute_map def self.openapi_types { :'attributes' => :'AttachJiraIssueRequestDataAttributes', - :'id' => :'String', :'relationships' => :'AttachJiraIssueRequestDataRelationships', :'type' => :'JiraIssuesDataType' } @@ -79,10 +74,6 @@ def initialize(attributes = {}) self.attributes = attributes[:'attributes'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'relationships') self.relationships = attributes[:'relationships'] end @@ -137,7 +128,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes && - id == o.id && relationships == o.relationships && type == o.type && additional_properties == o.additional_properties @@ -147,7 +137,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, relationships, type, additional_properties].hash + [attributes, relationships, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb b/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb index e2536e5f50b..b0d3116e986 100644 --- a/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/attach_jira_issue_request_data_attributes.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class AttachJiraIssueRequestDataAttributes include BaseGenericModel - # The URL of the Jira issue to attach security findings to. + # URL of the Jira issue to attach security findings to. attr_reader :jira_issue_url attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_insights_items.rb b/lib/datadog_api_client/v2/models/case_insights_items.rb index e5a4560e510..34fb5f99024 100644 --- a/lib/datadog_api_client/v2/models/case_insights_items.rb +++ b/lib/datadog_api_client/v2/models/case_insights_items.rb @@ -21,13 +21,13 @@ module DatadogAPIClient::V2 class CaseInsightsItems include BaseGenericModel - # The reference of the insight. + # Reference of the insight. attr_accessor :ref - # The unique identifier of the resource. For example, the unique identifier of a security finding. + # Unique identifier of the resource. For example, the unique identifier of a security finding. attr_accessor :resource_id - # The type of the resource. For example, the type of a security finding is "SECURITY_FINDING". + # Type of the resource. For example, the type of a security finding is "SECURITY_FINDING". attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_management_project_data.rb b/lib/datadog_api_client/v2/models/case_management_project_data.rb index c5b053664ac..f045f3a9416 100644 --- a/lib/datadog_api_client/v2/models/case_management_project_data.rb +++ b/lib/datadog_api_client/v2/models/case_management_project_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class CaseManagementProjectData include BaseGenericModel - # The unique identifier of the case management project. + # Unique identifier of the case management project. attr_reader :id # Projects resource type. diff --git a/lib/datadog_api_client/v2/models/create_case_request_data.rb b/lib/datadog_api_client/v2/models/create_case_request_data.rb index 9e1d63288ee..3a1a0a135b4 100644 --- a/lib/datadog_api_client/v2/models/create_case_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_case_request_data.rb @@ -24,9 +24,6 @@ class CreateCaseRequestData # Attributes of the case to create. attr_accessor :attributes - # The unique identifier of the case. - attr_accessor :id - # Relationships of the case to create. attr_accessor :relationships @@ -40,7 +37,6 @@ class CreateCaseRequestData def self.attribute_map { :'attributes' => :'attributes', - :'id' => :'id', :'relationships' => :'relationships', :'type' => :'type' } @@ -51,7 +47,6 @@ def self.attribute_map def self.openapi_types { :'attributes' => :'CreateCaseRequestDataAttributes', - :'id' => :'String', :'relationships' => :'CreateCaseRequestDataRelationships', :'type' => :'CaseDataType' } @@ -79,10 +74,6 @@ def initialize(attributes = {}) self.attributes = attributes[:'attributes'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'relationships') self.relationships = attributes[:'relationships'] end @@ -137,7 +128,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes && - id == o.id && relationships == o.relationships && type == o.type && additional_properties == o.additional_properties @@ -147,7 +137,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, relationships, type, additional_properties].hash + [attributes, relationships, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb index f5a8e41c39a..0aa7717bbd9 100644 --- a/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/create_case_request_data_attributes.rb @@ -21,16 +21,16 @@ module DatadogAPIClient::V2 class CreateCaseRequestDataAttributes include BaseGenericModel - # The unique identifier of the user assigned to the case. + # Unique identifier of the user assigned to the case. attr_accessor :assignee_id - # The description of the case. If not provided, the description will be automatically generated. + # Description of the case. If not provided, the description will be automatically generated. attr_accessor :description # Case priority attr_accessor :priority - # The title of the case. If not provided, the title will be automatically generated. + # Title of the case. If not provided, the title will be automatically generated. attr_accessor :title attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb index c8b60c69ca4..cfddc53d476 100644 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb +++ b/lib/datadog_api_client/v2/models/create_jira_issue_request_array.rb @@ -24,17 +24,13 @@ class CreateJiraIssueRequestArray # attr_reader :data - # - attr_accessor :included - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'data' => :'data', - :'included' => :'included' + :'data' => :'data' } end @@ -42,8 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array', - :'included' => :'Array' + :'data' => :'Array' } end @@ -70,12 +65,6 @@ def initialize(attributes = {}) self.data = value end end - - if attributes.key?(:'included') - if (value = attributes[:'included']).is_a?(Array) - self.included = value - end - end end # Check to see if the all the properties in the model are valid @@ -123,7 +112,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data && - included == o.included && additional_properties == o.additional_properties end @@ -131,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, included, additional_properties].hash + [data, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_array_included.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_array_included.rb deleted file mode 100644 index 91c485b3fca..00000000000 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_array_included.rb +++ /dev/null @@ -1,64 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes and relationships of the case linked to the Jira issue. Should contain all of the following: case, project, and security findings. - module CreateJiraIssueRequestArrayIncluded - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'CreateCaseRequestData', - :'CaseManagementProjectData', - :'FindingData' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb index 489f97d6d3e..cf2a0aa26f0 100644 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_jira_issue_request_data.rb @@ -24,9 +24,6 @@ class CreateJiraIssueRequestData # Attributes of the Jira issue to create. attr_accessor :attributes - # The unique identifier of the Jira issue creation request. - attr_accessor :id - # Relationships of the Jira issue to create. attr_accessor :relationships @@ -40,7 +37,6 @@ class CreateJiraIssueRequestData def self.attribute_map { :'attributes' => :'attributes', - :'id' => :'id', :'relationships' => :'relationships', :'type' => :'type' } @@ -51,7 +47,6 @@ def self.attribute_map def self.openapi_types { :'attributes' => :'CreateJiraIssueRequestDataAttributes', - :'id' => :'String', :'relationships' => :'CreateJiraIssueRequestDataRelationships', :'type' => :'JiraIssuesDataType' } @@ -79,10 +74,6 @@ def initialize(attributes = {}) self.attributes = attributes[:'attributes'] end - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'relationships') self.relationships = attributes[:'relationships'] end @@ -137,7 +128,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && attributes == o.attributes && - id == o.id && relationships == o.relationships && type == o.type && additional_properties == o.additional_properties @@ -147,7 +137,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, relationships, type, additional_properties].hash + [attributes, relationships, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb index 37a0be54e25..4539523f15d 100644 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes.rb @@ -21,16 +21,32 @@ module DatadogAPIClient::V2 class CreateJiraIssueRequestDataAttributes include BaseGenericModel + # Unique identifier of the user assigned to the Jira issue. + attr_accessor :assignee_id + + # Description of the Jira issue. If not provided, the description will be automatically generated. + attr_accessor :description + # Custom fields of the Jira issue to create. For the list of available fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get). attr_accessor :fields + # Case priority + attr_accessor :priority + + # Title of the Jira issue. If not provided, the title will be automatically generated. + attr_accessor :title + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'fields' => :'fields' + :'assignee_id' => :'assignee_id', + :'description' => :'description', + :'fields' => :'fields', + :'priority' => :'priority', + :'title' => :'title' } end @@ -38,7 +54,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'fields' => :'CreateJiraIssueRequestDataAttributesFields' + :'assignee_id' => :'String', + :'description' => :'String', + :'fields' => :'Hash', + :'priority' => :'CasePriority', + :'title' => :'String' } end @@ -60,9 +80,25 @@ def initialize(attributes = {}) end } + if attributes.key?(:'assignee_id') + self.assignee_id = attributes[:'assignee_id'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + if attributes.key?(:'fields') self.fields = attributes[:'fields'] end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -91,7 +127,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + assignee_id == o.assignee_id && + description == o.description && fields == o.fields && + priority == o.priority && + title == o.title && additional_properties == o.additional_properties end @@ -99,7 +139,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [fields, additional_properties].hash + [assignee_id, description, fields, priority, title, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes_fields.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes_fields.rb deleted file mode 100644 index 22bd1a63655..00000000000 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_attributes_fields.rb +++ /dev/null @@ -1,105 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Custom fields of the Jira issue to create. For the list of available fields, see [Jira documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get). - class CreateJiraIssueRequestDataAttributesFields - include BaseGenericModel - - # - attr_accessor :fields - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'fields' => :'fields' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'fields' => :'Object' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributesFields` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'fields') - self.fields = attributes[:'fields'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - fields == o.fields && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [fields, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb index f00cceb992c..902b4886b12 100644 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb +++ b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships.rb @@ -21,8 +21,11 @@ module DatadogAPIClient::V2 class CreateJiraIssueRequestDataRelationships include BaseGenericModel - # Case linked to the Jira issue. - attr_reader :_case + # A list of security findings. + attr_reader :findings + + # Case management project. + attr_reader :project attr_accessor :additional_properties @@ -30,7 +33,8 @@ class CreateJiraIssueRequestDataRelationships # @!visibility private def self.attribute_map { - :'_case' => :'case' + :'findings' => :'findings', + :'project' => :'project' } end @@ -38,7 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'_case' => :'CreateJiraIssueRequestDataRelationshipsCase' + :'findings' => :'Findings', + :'project' => :'CaseManagementProject' } end @@ -60,8 +65,12 @@ def initialize(attributes = {}) end } - if attributes.key?(:'_case') - self._case = attributes[:'_case'] + if attributes.key?(:'findings') + self.findings = attributes[:'findings'] + end + + if attributes.key?(:'project') + self.project = attributes[:'project'] end end @@ -69,18 +78,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @_case.nil? + return false if @findings.nil? + return false if @project.nil? true end # Custom attribute writer method with validation - # @param _case [Object] Object to be assigned + # @param findings [Object] Object to be assigned + # @!visibility private + def findings=(findings) + if findings.nil? + fail ArgumentError, 'invalid value for "findings", findings cannot be nil.' + end + @findings = findings + end + + # Custom attribute writer method with validation + # @param project [Object] Object to be assigned # @!visibility private - def _case=(_case) - if _case.nil? - fail ArgumentError, 'invalid value for "_case", _case cannot be nil.' + def project=(project) + if project.nil? + fail ArgumentError, 'invalid value for "project", project cannot be nil.' end - @_case = _case + @project = project end # Returns the object in the form of hash, with additionalProperties support. @@ -109,7 +129,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - _case == o._case && + findings == o.findings && + project == o.project && additional_properties == o.additional_properties end @@ -117,7 +138,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [_case, additional_properties].hash + [findings, project, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case.rb deleted file mode 100644 index 9e138df5908..00000000000 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Case linked to the Jira issue. - class CreateJiraIssueRequestDataRelationshipsCase - include BaseGenericModel - - # Case linked to the Jira issue. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CreateJiraIssueRequestDataRelationshipsCaseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCase` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case_data.rb b/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case_data.rb deleted file mode 100644 index 23323ec510b..00000000000 --- a/lib/datadog_api_client/v2/models/create_jira_issue_request_data_relationships_case_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Case linked to the Jira issue. - class CreateJiraIssueRequestDataRelationshipsCaseData - include BaseGenericModel - - # - attr_reader :id - - # Cases resource type. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'String', - :'type' => :'CaseDataType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationshipsCaseData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/detach_case_request_data.rb b/lib/datadog_api_client/v2/models/detach_case_request_data.rb index 9533236e76a..ac35aac96e4 100644 --- a/lib/datadog_api_client/v2/models/detach_case_request_data.rb +++ b/lib/datadog_api_client/v2/models/detach_case_request_data.rb @@ -21,9 +21,6 @@ module DatadogAPIClient::V2 class DetachCaseRequestData include BaseGenericModel - # The unique identifier of the detachment request. - attr_accessor :id - # Relationships detaching security findings from their case. attr_accessor :relationships @@ -36,7 +33,6 @@ class DetachCaseRequestData # @!visibility private def self.attribute_map { - :'id' => :'id', :'relationships' => :'relationships', :'type' => :'type' } @@ -46,7 +42,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'id' => :'String', :'relationships' => :'DetachCaseRequestDataRelationships', :'type' => :'CaseDataType' } @@ -70,10 +65,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'relationships') self.relationships = attributes[:'relationships'] end @@ -127,7 +118,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - id == o.id && relationships == o.relationships && type == o.type && additional_properties == o.additional_properties @@ -137,7 +127,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, relationships, type, additional_properties].hash + [relationships, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/finding_case_response_data.rb b/lib/datadog_api_client/v2/models/finding_case_response_data.rb index b1693b8449c..2507e2ece51 100644 --- a/lib/datadog_api_client/v2/models/finding_case_response_data.rb +++ b/lib/datadog_api_client/v2/models/finding_case_response_data.rb @@ -24,7 +24,7 @@ class FindingCaseResponseData # Attributes of the case. attr_accessor :attributes - # The unique identifier of the case. + # Unique identifier of the case. attr_accessor :id # Relationships of the case. diff --git a/lib/datadog_api_client/v2/models/finding_data.rb b/lib/datadog_api_client/v2/models/finding_data.rb index 8f2b42346ce..972eda7a7ba 100644 --- a/lib/datadog_api_client/v2/models/finding_data.rb +++ b/lib/datadog_api_client/v2/models/finding_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class FindingData include BaseGenericModel - # The unique identifier of the security finding. + # Unique identifier of the security finding. attr_reader :id # Security findings resource type. diff --git a/lib/datadog_api_client/v2/models/finding_jira_issue.rb b/lib/datadog_api_client/v2/models/finding_jira_issue.rb index 44d8ae77709..d9fcae0c57d 100644 --- a/lib/datadog_api_client/v2/models/finding_jira_issue.rb +++ b/lib/datadog_api_client/v2/models/finding_jira_issue.rb @@ -21,13 +21,13 @@ module DatadogAPIClient::V2 class FindingJiraIssue include BaseGenericModel - # The error message if the Jira issue creation failed. + # Error message if the Jira issue creation failed. attr_accessor :error_message # Result of the Jira issue creation. attr_accessor :result - # The status of the Jira issue creation. Can be "COMPLETED" if the Jira issue was created successfully, or "FAILED" if the Jira issue creation failed. + # Status of the Jira issue creation. Can be "COMPLETED" if the Jira issue was created successfully, or "FAILED" if the Jira issue creation failed. attr_accessor :status attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb b/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb index 2eacfe86542..8b1bd197d2e 100644 --- a/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb +++ b/lib/datadog_api_client/v2/models/finding_jira_issue_result.rb @@ -21,16 +21,16 @@ module DatadogAPIClient::V2 class FindingJiraIssueResult include BaseGenericModel - # The account ID of the Jira issue. + # Account ID of the Jira issue. attr_accessor :account_id - # The unique identifier of the Jira issue. + # Unique identifier of the Jira issue. attr_accessor :issue_id - # The key of the Jira issue. + # Key of the Jira issue. attr_accessor :issue_key - # The URL of the Jira issue. + # URL of the Jira issue. attr_accessor :issue_url attr_accessor :additional_properties