diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index de9b3ca4f4d..97703ea74f2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -13778,8 +13778,7 @@ components: description: Attributes of the Jira issue to create. properties: assignee_id: - description: Unique identifier of the Datadog user assigned to the Jira - issue. + description: Unique identifier of the user assigned to the Jira issue. example: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0 type: string description: @@ -13800,9 +13799,8 @@ components: type: object priority: $ref: '#/components/schemas/CasePriority' - description: Datadog case priority mapped to the Jira issue priority. If - not provided, the priority will be automatically set to "NOT_DEFINED". - To configure the mapping, see [Bidirectional ticket syncing with Jira](https://docs.datadoghq.com/security/ticketing_integrations/#bidirectional-ticket-syncing-with-jira). + 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 @@ -87821,6 +87819,9 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write + x-unstable: '**Note**: This endpoint is in beta and is subject to change. + + Please check the documentation regularly for updates.' post: description: 'Create Jira issues for security findings. @@ -87864,6 +87865,9 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write + x-unstable: '**Note**: This endpoint is in beta and is subject to change. + + Please check the documentation regularly for updates.' /api/v2/security/findings/search: post: description: 'Get a list of security findings that match a search query. [See 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 a96661d790d..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T17:04:07.979Z \ 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 e29218456da..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-finding-returns-Created-response.yml +++ /dev/null @@ -1,46 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 17:04:07 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"jira_issues"}]}' - 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":"b5b9ee39-29f8-4b84-a878-28e597e2a33f","type":"cases","attributes":{"created_at":"2026-01-02T17:04:10.514692Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/csm/vm?query=%40workflow.integrations.cases.id%3A%2A\u0026vulnerability=bcefbaa72059d94d8b64f4b449807b73","resource_id":"YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2523546","issue_key":"CSMSEC-105847","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105847","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-521","modified_at":"2026-01-02T17:04:11.504549Z","priority":"P4","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, 02 Jan 2026 17:04:07 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"relationships":{"findings":{"data":[{"id":"YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=","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 536270faa5a..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T17:21:33.080Z \ 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 5493f07ab78..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issue-for-security-findings-returns-Created-response.yml +++ /dev/null @@ -1,46 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 17:21:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==","type":"findings"},{"id":"eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"jira_issues"}]}' - 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":"527aa591-d40e-4445-be80-9d012ba8397e","type":"cases","attributes":{"created_at":"2026-01-02T17:21:34.65318Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/compliance?panels=cpfinding%7Cevent%7CruleId%3Akvh-scm-xyu%7CresourceId%3Ai-05f90f00a848687e8\u0026query=%40finding_id%3Aa3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA%3D%3D","resource_id":"a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA=="},{"type":"SECURITY_FINDING","ref":"/security/compliance?panels=cpfinding%7Cevent%7CruleId%3Ayk0-blt-afn%7CresourceId%3Ai-024ea8035de550b0a\u0026query=%40finding_id%3AeWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ%3D%3D","resource_id":"eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ=="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2523579","issue_key":"CSMSEC-105849","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105849","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-523","modified_at":"2026-01-02T17:21:35.836445Z","priority":"P3","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, 02 Jan 2026 17:21:33 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"relationships":{"findings":{"data":[{"id":"a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==","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 6b40b01ad63..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T16:54:04.434Z \ 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 804dd61be08..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: Fri, 02 Jan 2026 16:54:04 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"findings":{"data":[]},"project":{"data":{"id":"7f198869-c7ef-4afc-97cf-da5cdc13b5c3","type":"projects"}}},"type":"jira_issues"}]}' - 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 0a903f8222a..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T17:23:28.665Z \ 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 e297741f9ad..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Created-response.yml +++ /dev/null @@ -1,49 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 17:23:28 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{"description":"A description","title":"A title"},"relationships":{"findings":{"data":[{"id":"eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"jira_issues"},{"attributes":{"description":"A - description","title":"A title"},"relationships":{"findings":{"data":[{"id":"a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==","type":"findings"}]},"project":{"data":{"id":"959a6f71-bac8-4027-b1d3-2264f569296f","type":"projects"}}},"type":"jira_issues"}]}' - 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":"3f234879-c155-4104-8605-a956c6157fa2","type":"cases","attributes":{"created_at":"2026-01-02T17:23:30.862128Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/compliance?panels=cpfinding%7Cevent%7CruleId%3Ayk0-blt-afn%7CresourceId%3Ai-024ea8035de550b0a\u0026query=%40finding_id%3AeWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ%3D%3D","resource_id":"eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ=="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2523584","issue_key":"CSMSEC-105851","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105851","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-524","modified_at":"2026-01-02T17:23:32.188706Z","priority":"P3","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":"55b8c3c1-7080-4e13-b5fc-6bb658609fb7","type":"cases","attributes":{"created_at":"2026-01-02T17:23:30.862076Z","creation_source":"CS_SECURITY_FINDING","description":"A - description","insights":[{"type":"SECURITY_FINDING","ref":"/security/compliance?panels=cpfinding%7Cevent%7CruleId%3Akvh-scm-xyu%7CresourceId%3Ai-05f90f00a848687e8\u0026query=%40finding_id%3Aa3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA%3D%3D","resource_id":"a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA=="}],"jira_issue":{"status":"COMPLETED","result":{"issue_id":"2523583","issue_key":"CSMSEC-105850","issue_url":"https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105850","account_id":"fdcffa62-24ab-4914-a195-a22bdc607030"}},"key":"CSMINV-525","modified_at":"2026-01-02T17:23:31.898339Z","priority":"P3","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, 02 Jan 2026 17:23:28 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"relationships":{"findings":{"data":[{"id":"eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==","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 9fd2d2504eb..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T16:58:53.646Z \ 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 9cf9a796a65..00000000000 --- a/cassettes/features/v2/security_monitoring/Create-Jira-issues-for-security-findings-returns-Not-Found-response.yml +++ /dev/null @@ -1,25 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 16:58:53 GMT - request: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{},"relationships":{"findings":{"data":[{"id":"ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=","type":"findings"}]},"project":{"data":{"id":"00000000-0000-0000-0000-000000000000","type":"projects"}}},"type":"jira_issues"}]}' - 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":"finding 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/teams/Create-a-team-link-returns-OK-response.frozen b/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.frozen index 5e31001e436..631b268503a 100644 --- a/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.frozen +++ b/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.frozen @@ -1 +1 @@ -2023-08-21T19:44:43.622Z \ No newline at end of file +2026-01-23T11:00:10.582Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.yml b/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.yml index 20ad700a56a..16356b32d34 100644 --- a/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.yml +++ b/cassettes/features/v2/teams/Create-a-team-link-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Mon, 21 Aug 2023 19:44:43 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:10 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-95c34d7fe6d963ff","name":"test-name-95c34d7fe6d963ff"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-5e6a036c358c6bff","name":"test-name-5e6a036c358c6bff"},"type":"team"}}' headers: Accept: - application/json @@ -14,16 +14,14 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"2d0e6d4e-405b-11ee-84bc-da7ad0900002","attributes":{"name":"test-name-95c34d7fe6d963ff","handle":"test-handle-95c34d7fe6d963ff","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:43.718259+00:00","modified_at":"2023-08-21T19:44:43.718264+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/permission-settings"}}}}} - - ' + string: '{"data":{"id":"66d6e3d2-f7ea-4946-bc93-b11db5b9bed4","type":"team","attributes":{"avatar":null,"banner":12,"created_at":"2026-01-23T11:00:12.132142+00:00","description":null,"handle":"test-handle-5e6a036c358c6bff","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-01-23T11:00:12.132142+00:00","name":"test-name-5e6a036c358c6bff","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/66d6e3d2-f7ea-4946-bc93-b11db5b9bed4/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/66d6e3d2-f7ea-4946-bc93-b11db5b9bed4/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Mon, 21 Aug 2023 19:44:43 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:10 GMT request: body: encoding: UTF-8 @@ -34,11 +32,11 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/links + uri: https://api.datadoghq.com/api/v2/team/66d6e3d2-f7ea-4946-bc93-b11db5b9bed4/links response: body: encoding: UTF-8 - string: '{"data":{"type":"team_links","id":"2d348dee-405b-11ee-b5db-da7ad0900002","attributes":{"team_id":"2d0e6d4e-405b-11ee-84bc-da7ad0900002","label":"Link + string: '{"data":{"type":"team_links","id":"b0c50a40-f84a-11f0-a7c6-da7ad0900002","attributes":{"team_id":"66d6e3d2-f7ea-4946-bc93-b11db5b9bed4","label":"Link label","url":"https://example.com","position":0}}} ' @@ -48,14 +46,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Aug 2023 19:44:43 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:10 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/links/2d348dee-405b-11ee-b5db-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/66d6e3d2-f7ea-4946-bc93-b11db5b9bed4/links/b0c50a40-f84a-11f0-a7c6-da7ad0900002 response: body: encoding: UTF-8 @@ -64,14 +62,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Mon, 21 Aug 2023 19:44:43 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:10 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/66d6e3d2-f7ea-4946-bc93-b11db5b9bed4 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.frozen b/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.frozen index 9bd719325e2..4a7b92f84ed 100644 --- a/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.frozen +++ b/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.frozen @@ -1 +1 @@ -2023-08-21T19:44:45.969Z \ No newline at end of file +2026-01-23T11:00:13.515Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.yml b/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.yml index b5f88f45218..a22abdda7d9 100644 --- a/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.yml +++ b/cassettes/features/v2/teams/Get-a-team-link-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Mon, 21 Aug 2023 19:44:45 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:13 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-17f710cc6491a98e","name":"test-name-17f710cc6491a98e"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-94cf752f98fda23c","name":"test-name-94cf752f98fda23c"},"type":"team"}}' headers: Accept: - application/json @@ -14,31 +14,29 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"2e757196-405b-11ee-bc70-da7ad0900002","attributes":{"name":"test-name-17f710cc6491a98e","handle":"test-handle-17f710cc6491a98e","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:46.071074+00:00","modified_at":"2023-08-21T19:44:46.071080+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/2e757196-405b-11ee-bc70-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/2e757196-405b-11ee-bc70-da7ad0900002/permission-settings"}}}}} - - ' + string: '{"data":{"id":"35d819d9-918b-4d29-838d-ed8507398b21","type":"team","attributes":{"avatar":null,"banner":10,"created_at":"2026-01-23T11:00:13.808835+00:00","description":null,"handle":"test-handle-94cf752f98fda23c","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-01-23T11:00:13.808835+00:00","name":"test-name-94cf752f98fda23c","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/35d819d9-918b-4d29-838d-ed8507398b21/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/35d819d9-918b-4d29-838d-ed8507398b21/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Mon, 21 Aug 2023 19:44:45 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:13 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"label":"Test-Get_a_team_link_returns_OK_response-1692647085","position":0,"url":"https://example.com"},"type":"team_links"}}' + string: '{"data":{"attributes":{"label":"Test-Get_a_team_link_returns_OK_response-1769166013","position":0,"url":"https://example.com"},"type":"team_links"}}' headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/team/2e757196-405b-11ee-bc70-da7ad0900002/links + uri: https://api.datadoghq.com/api/v2/team/35d819d9-918b-4d29-838d-ed8507398b21/links response: body: encoding: UTF-8 - string: '{"data":{"type":"team_links","id":"2e91164e-405b-11ee-9f5b-da7ad0900002","attributes":{"team_id":"2e757196-405b-11ee-bc70-da7ad0900002","label":"Test-Get_a_team_link_returns_OK_response-1692647085","url":"https://example.com","position":0}}} + string: '{"data":{"type":"team_links","id":"b1c355f0-f84a-11f0-8d16-da7ad0900002","attributes":{"team_id":"35d819d9-918b-4d29-838d-ed8507398b21","label":"Test-Get_a_team_link_returns_OK_response-1769166013","url":"https://example.com","position":0}}} ' headers: @@ -47,34 +45,32 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Aug 2023 19:44:45 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:13 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/team/2e757196-405b-11ee-bc70-da7ad0900002/links/2e91164e-405b-11ee-9f5b-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/35d819d9-918b-4d29-838d-ed8507398b21/links/b1c355f0-f84a-11f0-8d16-da7ad0900002 response: body: encoding: UTF-8 - string: '{"data":{"type":"team_links","id":"2e91164e-405b-11ee-9f5b-da7ad0900002","attributes":{"team_id":"2e757196-405b-11ee-bc70-da7ad0900002","label":"Test-Get_a_team_link_returns_OK_response-1692647085","url":"https://example.com","position":0}}} - - ' + string: '{"data":{"id":"b1c355f0-f84a-11f0-8d16-da7ad0900002","type":"team_links","attributes":{"label":"Test-Get_a_team_link_returns_OK_response-1769166013","position":0,"team_id":"35d819d9-918b-4d29-838d-ed8507398b21","url":"https://example.com"}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Mon, 21 Aug 2023 19:44:45 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:13 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/2e757196-405b-11ee-bc70-da7ad0900002/links/2e91164e-405b-11ee-9f5b-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/35d819d9-918b-4d29-838d-ed8507398b21/links/b1c355f0-f84a-11f0-8d16-da7ad0900002 response: body: encoding: UTF-8 @@ -83,14 +79,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Mon, 21 Aug 2023 19:44:45 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:13 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/2e757196-405b-11ee-bc70-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/35d819d9-918b-4d29-838d-ed8507398b21 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.frozen b/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.frozen index d6c4862f1f5..e97109a744f 100644 --- a/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.frozen +++ b/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.frozen @@ -1 +1 @@ -2023-08-21T19:44:50.990Z \ No newline at end of file +2026-01-23T11:00:15.520Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.yml b/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.yml index 8822e624914..001bdde44db 100644 --- a/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.yml +++ b/cassettes/features/v2/teams/Remove-a-team-link-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Mon, 21 Aug 2023 19:44:50 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:15 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-174fbe08316e4419","name":"test-name-174fbe08316e4419"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-5e7e3d924d3cf03e","name":"test-name-5e7e3d924d3cf03e"},"type":"team"}}' headers: Accept: - application/json @@ -14,31 +14,29 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"3174aa4c-405b-11ee-9d78-da7ad0900002","attributes":{"name":"test-name-174fbe08316e4419","handle":"test-handle-174fbe08316e4419","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:51.098613+00:00","modified_at":"2023-08-21T19:44:51.098619+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/3174aa4c-405b-11ee-9d78-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/3174aa4c-405b-11ee-9d78-da7ad0900002/permission-settings"}}}}} - - ' + string: '{"data":{"id":"59e1efcf-eb13-4a2b-8fcf-64590d56007f","type":"team","attributes":{"avatar":null,"banner":7,"created_at":"2026-01-23T11:00:15.837894+00:00","description":null,"handle":"test-handle-5e7e3d924d3cf03e","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-01-23T11:00:15.837894+00:00","name":"test-name-5e7e3d924d3cf03e","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/59e1efcf-eb13-4a2b-8fcf-64590d56007f/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/59e1efcf-eb13-4a2b-8fcf-64590d56007f/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Mon, 21 Aug 2023 19:44:50 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:15 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"label":"Test-Remove_a_team_link_returns_No_Content_response-1692647090","position":0,"url":"https://example.com"},"type":"team_links"}}' + string: '{"data":{"attributes":{"label":"Test-Remove_a_team_link_returns_No_Content_response-1769166015","position":0,"url":"https://example.com"},"type":"team_links"}}' headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/team/3174aa4c-405b-11ee-9d78-da7ad0900002/links + uri: https://api.datadoghq.com/api/v2/team/59e1efcf-eb13-4a2b-8fcf-64590d56007f/links response: body: encoding: UTF-8 - string: '{"data":{"type":"team_links","id":"3194a5c2-405b-11ee-b009-da7ad0900002","attributes":{"team_id":"3174aa4c-405b-11ee-9d78-da7ad0900002","label":"Test-Remove_a_team_link_returns_No_Content_response-1692647090","url":"https://example.com","position":0}}} + string: '{"data":{"type":"team_links","id":"b2fba45e-f84a-11f0-9d5d-da7ad0900002","attributes":{"team_id":"59e1efcf-eb13-4a2b-8fcf-64590d56007f","label":"Test-Remove_a_team_link_returns_No_Content_response-1769166015","url":"https://example.com","position":0}}} ' headers: @@ -47,14 +45,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Aug 2023 19:44:50 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/3174aa4c-405b-11ee-9d78-da7ad0900002/links/3194a5c2-405b-11ee-b009-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/59e1efcf-eb13-4a2b-8fcf-64590d56007f/links/b2fba45e-f84a-11f0-9d5d-da7ad0900002 response: body: encoding: UTF-8 @@ -63,32 +61,32 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Mon, 21 Aug 2023 19:44:50 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/3174aa4c-405b-11ee-9d78-da7ad0900002/links/3194a5c2-405b-11ee-b009-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/59e1efcf-eb13-4a2b-8fcf-64590d56007f/links/b2fba45e-f84a-11f0-9d5d-da7ad0900002 response: body: encoding: UTF-8 - string: '{"errors":["Link for ID 3194a5c2-405b-11ee-b009-da7ad0900002 not found"]}' + string: '{"errors":["Link for ID b2fba45e-f84a-11f0-9d5d-da7ad0900002 not found"]}' headers: Content-Type: - application/json status: code: 404 message: Not Found -- recorded_at: Mon, 21 Aug 2023 19:44:50 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/3174aa4c-405b-11ee-9d78-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/59e1efcf-eb13-4a2b-8fcf-64590d56007f response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.frozen b/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.frozen index 272098258dc..050e95d3408 100644 --- a/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.frozen +++ b/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.frozen @@ -1 +1 @@ -2023-08-21T19:44:53.594Z \ No newline at end of file +2026-01-23T11:00:17.594Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.yml b/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.yml index abe9c8de461..6a65ec1a9ac 100644 --- a/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.yml +++ b/cassettes/features/v2/teams/Update-a-team-link-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Mon, 21 Aug 2023 19:44:53 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:17 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-9503f929e485f83e","name":"test-name-9503f929e485f83e"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-98fa6b5d3df15a52","name":"test-name-98fa6b5d3df15a52"},"type":"team"}}' headers: Accept: - application/json @@ -14,31 +14,29 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"3301859c-405b-11ee-aedf-da7ad0900002","attributes":{"name":"test-name-9503f929e485f83e","handle":"test-handle-9503f929e485f83e","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:53.699451+00:00","modified_at":"2023-08-21T19:44:53.699457+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/3301859c-405b-11ee-aedf-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/3301859c-405b-11ee-aedf-da7ad0900002/permission-settings"}}}}} - - ' + string: '{"data":{"id":"ec95ccd2-5cf4-494a-971c-84a604f7dde5","type":"team","attributes":{"avatar":null,"banner":0,"created_at":"2026-01-23T11:00:17.893904+00:00","description":null,"handle":"test-handle-98fa6b5d3df15a52","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-01-23T11:00:17.893904+00:00","name":"test-name-98fa6b5d3df15a52","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/ec95ccd2-5cf4-494a-971c-84a604f7dde5/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/ec95ccd2-5cf4-494a-971c-84a604f7dde5/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Mon, 21 Aug 2023 19:44:53 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:17 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"label":"Test-Update_a_team_link_returns_OK_response-1692647093","position":0,"url":"https://example.com"},"type":"team_links"}}' + string: '{"data":{"attributes":{"label":"Test-Update_a_team_link_returns_OK_response-1769166017","position":0,"url":"https://example.com"},"type":"team_links"}}' headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/team/3301859c-405b-11ee-aedf-da7ad0900002/links + uri: https://api.datadoghq.com/api/v2/team/ec95ccd2-5cf4-494a-971c-84a604f7dde5/links response: body: encoding: UTF-8 - string: '{"data":{"type":"team_links","id":"331f8b00-405b-11ee-bdcc-da7ad0900002","attributes":{"team_id":"3301859c-405b-11ee-aedf-da7ad0900002","label":"Test-Update_a_team_link_returns_OK_response-1692647093","url":"https://example.com","position":0}}} + string: '{"data":{"type":"team_links","id":"b433501a-f84a-11f0-9cd8-da7ad0900002","attributes":{"team_id":"ec95ccd2-5cf4-494a-971c-84a604f7dde5","label":"Test-Update_a_team_link_returns_OK_response-1769166017","url":"https://example.com","position":0}}} ' headers: @@ -47,7 +45,7 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Aug 2023 19:44:53 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:17 GMT request: body: encoding: UTF-8 @@ -58,11 +56,11 @@ http_interactions: Content-Type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/team/3301859c-405b-11ee-aedf-da7ad0900002/links/331f8b00-405b-11ee-bdcc-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/ec95ccd2-5cf4-494a-971c-84a604f7dde5/links/b433501a-f84a-11f0-9cd8-da7ad0900002 response: body: encoding: UTF-8 - string: '{"data":{"type":"team_links","id":"331f8b00-405b-11ee-bdcc-da7ad0900002","attributes":{"team_id":"3301859c-405b-11ee-aedf-da7ad0900002","label":"New + string: '{"data":{"type":"team_links","id":"b433501a-f84a-11f0-9cd8-da7ad0900002","attributes":{"team_id":"ec95ccd2-5cf4-494a-971c-84a604f7dde5","label":"New Label","url":"https://example.com","position":0}}} ' @@ -72,14 +70,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 21 Aug 2023 19:44:53 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:17 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/3301859c-405b-11ee-aedf-da7ad0900002/links/331f8b00-405b-11ee-bdcc-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/ec95ccd2-5cf4-494a-971c-84a604f7dde5/links/b433501a-f84a-11f0-9cd8-da7ad0900002 response: body: encoding: UTF-8 @@ -88,14 +86,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Mon, 21 Aug 2023 19:44:53 GMT +- recorded_at: Fri, 23 Jan 2026 11:00:17 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/3301859c-405b-11ee-aedf-da7ad0900002 + uri: https://api.datadoghq.com/api/v2/team/ec95ccd2-5cf4-494a-971c-84a604f7dde5 response: body: encoding: UTF-8 diff --git a/examples/v2/security-monitoring/CreateJiraIssues.rb b/examples/v2/security-monitoring/CreateJiraIssues.rb index 7bb0e5e7bbd..18c2650be1a 100644 --- a/examples/v2/security-monitoring/CreateJiraIssues.rb +++ b/examples/v2/security-monitoring/CreateJiraIssues.rb @@ -1,50 +1,35 @@ # 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({ attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({ - title: "A title", - description: "A description", + 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.", }), relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ findings: DatadogAPIClient::V2::Findings.new({ data: [ DatadogAPIClient::V2::FindingData.new({ - id: "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==", + id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", type: DatadogAPIClient::V2::FindingDataType::FINDINGS, }), ], }), project: DatadogAPIClient::V2::CaseManagementProject.new({ data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - }), - }), - }), - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - }), - DatadogAPIClient::V2::CreateJiraIssueRequestData.new({ - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - findings: DatadogAPIClient::V2::Findings.new({ - data: [ - DatadogAPIClient::V2::FindingData.new({ - id: "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==", - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - }), - ], - }), - project: DatadogAPIClient::V2::CaseManagementProject.new({ - data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - id: "959a6f71-bac8-4027-b1d3-2264f569296f", + id: "aeadc05e-98a8-11ec-ac2c-da7ad0900001", type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, }), }), diff --git a/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb b/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb deleted file mode 100644 index 37ee9743c93..00000000000 --- a/examples/v2/security-monitoring/CreateJiraIssues_379590688.rb +++ /dev/null @@ -1,33 +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({ - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - findings: DatadogAPIClient::V2::Findings.new({ - data: [ - DatadogAPIClient::V2::FindingData.new({ - id: "YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=", - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - }), - ], - }), - project: DatadogAPIClient::V2::CaseManagementProject.new({ - data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - }), - }), - }), - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - }), - ], -}) -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 f4b543cf2ab..00000000000 --- a/examples/v2/security-monitoring/CreateJiraIssues_829823123.rb +++ /dev/null @@ -1,37 +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({ - attributes: DatadogAPIClient::V2::CreateJiraIssueRequestDataAttributes.new({ - title: "A title", - description: "A description", - }), - relationships: DatadogAPIClient::V2::CreateJiraIssueRequestDataRelationships.new({ - findings: DatadogAPIClient::V2::Findings.new({ - data: [ - DatadogAPIClient::V2::FindingData.new({ - id: "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==", - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - }), - DatadogAPIClient::V2::FindingData.new({ - id: "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==", - type: DatadogAPIClient::V2::FindingDataType::FINDINGS, - }), - ], - }), - project: DatadogAPIClient::V2::CaseManagementProject.new({ - data: DatadogAPIClient::V2::CaseManagementProjectData.new({ - id: "959a6f71-bac8-4027-b1d3-2264f569296f", - type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, - }), - }), - }), - type: DatadogAPIClient::V2::JiraIssuesDataType::JIRA_ISSUES, - }), - ], -}) -p api_instance.create_jira_issues(body) diff --git a/features/step_definitions/request.rb b/features/step_definitions/request.rb index 5e0d64fe4b5..392ea6e56f6 100644 --- a/features/step_definitions/request.rb +++ b/features/step_definitions/request.rb @@ -168,10 +168,13 @@ def build_undo_for(version, operation_id, api_instance = nil) # Extract from path parameters if p["source"] param_name = p["source"] + snake_param = param_name.to_parameter if @path_parameters&.key?(param_name) [p["name"].to_sym, @path_parameters[param_name]] elsif @path_parameters&.key?(param_name.to_sym) [p["name"].to_sym, @path_parameters[param_name.to_sym]] + elsif @path_parameters&.key?(snake_param) + [p["name"].to_sym, @path_parameters[snake_param]] else warn "Path parameter '#{param_name}' not found" nil @@ -235,6 +238,21 @@ def build_given(api_version, operation) result end if operation["parameters"] + # Store path parameters for undo operations + # Path parameters are the required positional parameters + if operation["parameters"] && args + required_params = method.parameters.select { |p| p[0] == :req } + operation["parameters"].each_with_index do |p, index| + if index < required_params.length + # This is a path parameter + param_value = args[index] + @path_parameters[p["name"]] = param_value + @path_parameters[p["name"].to_parameter] = param_value + @path_parameters[p["name"].to_parameter.to_sym] = param_value + end + end + end + result = method.call(*args)[0] # register undo method @@ -297,18 +315,20 @@ def model_builder(param, obj) param_value = model_builder(parameter_name.to_parameter, fixtures.lookup(fixture_path)) param_key = parameter_name.to_parameter.to_sym opts[param_key] = param_value - # Store in path_parameters for undo operations + # Store in path_parameters for undo operations with all naming variants path_parameters[parameter_name] = param_value path_parameters[param_key] = param_value + path_parameters[parameter_name.to_parameter] = param_value end Given(/^request contains "([^"]+)" parameter with value (.+)$/) do |parameter_name, value| param_value = model_builder(parameter_name.to_parameter, JSON.parse(value.templated fixtures)) param_key = parameter_name.to_parameter.to_sym opts[param_key] = param_value - # Store in path_parameters for undo operations + # Store in path_parameters for undo operations with all naming variants path_parameters[parameter_name] = param_value path_parameters[param_key] = param_value + path_parameters[parameter_name.to_parameter] = param_value end Given(/^new "([^"]+)" request$/) do |name| diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index ccc027734e2..1a620afb10f 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -9,7 +9,7 @@ Feature: Security Monitoring And a valid "appKeyAuth" key in the system And an instance of "SecurityMonitoring" API - @team:DataDog/k9-investigation + @skip @team:DataDog/k9-investigation Scenario: Attach security finding to a Jira issue returns "OK" response Given new "AttachJiraIssue" request And body with value {"data": {"attributes": {"jira_issue_url": "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476"}, "relationships": {"findings": {"data": [{"id": "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}} @@ -30,21 +30,21 @@ Feature: Security Monitoring And the response "data.attributes.status_group" is equal to "SG_OPEN" And the response "data.attributes.insights" has item with field "resource_id" with value "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=" - @team:DataDog/k9-investigation + @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Jira issue returns "Bad Request" response Given new "AttachJiraIssue" request And body with value {"data": {"attributes": {"jira_issue_url": "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476"}, "relationships": {"findings": {"data": []}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}} When the request is sent Then the response status is 400 Bad Request - @team:DataDog/k9-investigation + @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Jira issue returns "Not Found" response Given new "AttachJiraIssue" request And body with value {"data": {"attributes": {"jira_issue_url": "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476"}, "relationships": {"findings": {"data": [{"id": "wrong-finding-id", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}} When the request is sent Then the response status is 404 Not Found - @team:DataDog/k9-investigation + @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a Jira issue returns "OK" response Given new "AttachJiraIssue" request And body with value {"data": {"attributes": {"jira_issue_url": "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476"}, "relationships": {"findings": {"data": [{"id": "OTQ3NjJkMmYwMTIzMzMxNTc1Y2Q4MTA5NWU0NTBmMDl-ZjE3NjMxZWVkYzBjZGI1NDY2NWY2OGQxZDk4MDY4MmI=", "type": "findings"}, {"id": "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}} @@ -280,75 +280,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" - @team:DataDog/k9-investigation - Scenario: Create Jira issue for security finding returns "Created" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}]} - 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 "YmNlZmJhYTcyMDU5ZDk0ZDhiNjRmNGI0NDk4MDdiNzN-MDJlMjg0NzNmYzJiODY2MzJkNjU0OTI4NmVhZTUyY2U=" - 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" - - @team:DataDog/k9-investigation - Scenario: Create Jira issue for security findings returns "Created" response - Given new "CreateJiraIssues" request - And body with value {"data": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==", "type": "findings"}, {"id": "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}]} - 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 "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==" - 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 "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==" - 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" - - @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": [{"attributes": {}, "relationships": {"findings": {"data": []}, "project": {"data": {"id": "7f198869-c7ef-4afc-97cf-da5cdc13b5c3", "type": "projects"}}}, "type": "jira_issues"}]} + 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 - @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": [{"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}, {"attributes": {"title": "A title", "description": "A description"}, "relationships": {"findings": {"data": [{"id": "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==", "type": "findings"}]}, "project": {"data": {"id": "959a6f71-bac8-4027-b1d3-2264f569296f", "type": "projects"}}}, "type": "jira_issues"}]} + 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 "eWswLWJsdC1hZm5-aS0wMjRlYTgwMzVkZTU1MGIwYQ==" - 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 "a3ZoLXNjbS14eXV-aS0wNWY5MGYwMGE4NDg2ODdlOA==" - 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" - @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": [{"attributes": {}, "relationships": {"findings": {"data": [{"id": "ZGZhMDI3ZjdjMDM3YjJmNzcxNTlhZGMwMjdmZWNiNTZ-MTVlYTNmYWU3NjNlOTNlYTE2YjM4N2JmZmI4Yjk5N2Y=", "type": "findings"}]}, "project": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "projects"}}}, "type": "jira_issues"}]} + 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 diff --git a/features/v2/undo.json b/features/v2/undo.json index 7619933d2f8..a3000f46bff 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -5081,7 +5081,8 @@ "parameters": [ { "name": "team_id", - "source": "data.attributes.team_id" + "origin": "path", + "source": "team_id" }, { "name": "link_id", diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 362812c942a..40a327d3ecc 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -208,8 +208,10 @@ def initialize "v2.get_open_api": false, "v2.list_apis": false, "v2.update_open_api": false, + "v2.attach_jira_issue": false, "v2.cancel_threat_hunting_job": false, "v2.convert_job_result_to_signal": false, + "v2.create_jira_issues": false, "v2.delete_threat_hunting_job": false, "v2.get_finding": false, "v2.get_rule_version_history": false, 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 442daffdb1e..69ad106e641 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -113,6 +113,12 @@ def attach_jira_issue(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers def attach_jira_issue_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.attach_jira_issue".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.attach_jira_issue") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.attach_jira_issue")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.attach_jira_issue ...' @@ -673,6 +679,12 @@ def create_jira_issues(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(FindingCaseResponseArray, Integer, Hash)>] FindingCaseResponseArray data, response status code and response headers def create_jira_issues_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_jira_issues".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_jira_issues") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_jira_issues")) + end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_jira_issues ...' 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 ef7e3fa800c..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,7 +21,7 @@ module DatadogAPIClient::V2 class CreateJiraIssueRequestDataAttributes include BaseGenericModel - # Unique identifier of the Datadog user assigned to the Jira issue. + # 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.