From 4ed50e61624942c52b493dda0ba1baf8c36a86bc Mon Sep 17 00:00:00 2001 From: Sherzod Karimov Date: Wed, 14 Feb 2024 12:20:26 -0500 Subject: [PATCH 1/2] remove old feature files --- features/v2/cases.feature | 241 ----------------------------- features/v2/cases_projects.feature | 82 ---------- 2 files changed, 323 deletions(-) delete mode 100644 features/v2/cases.feature delete mode 100644 features/v2/cases_projects.feature diff --git a/features/v2/cases.feature b/features/v2/cases.feature deleted file mode 100644 index 5a0eca615554..000000000000 --- a/features/v2/cases.feature +++ /dev/null @@ -1,241 +0,0 @@ -@endpoint(cases) @endpoint(cases-v2) -Feature: Cases - View and manage cases within Datadog - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "Cases" API - - @team:DataDog/case-management - Scenario: Archive case returns "Bad Request" response - Given new "ArchiveCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"type": "project"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Archive case returns "Not Found" response - Given new "ArchiveCase" request - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - And body with value {"data": {"type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Archive case returns "OK" response - Given new "ArchiveCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"type": "case"}} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/case-management - Scenario: Assign case returns "Bad Request" response - Given new "AssignCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"attributes": {"assignee_id": "invalid-uuid"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Assign case returns "Not Found" response - Given new "AssignCase" request - And there is a valid "user" in the system - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Assign case returns "OK" response - Given new "AssignCase" request - And there is a valid "case" in the system - And there is a valid "user" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/case-management - Scenario: Create a case returns "Bad Request" response - Given new "CreateCase" request - And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "userx"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Create a case returns "CREATED" response - Given new "CreateCase" request - And there is a valid "user" in the system - And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation in {{ unique_hash }}", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "{{user.data.id}}", "type": "user"} }, "project": {"data": {"id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e", "type": "project"}}}, "type": "case"}} - When the request is sent - Then the response status is 201 CREATED - And the response "data" has field "id" - And the response "data.attributes.title" is equal to "Security breach investigation in {{ unique_hash }}" - And the response "data.attributes.type" is equal to "STANDARD" - And the response "data.attributes.priority" is equal to "NOT_DEFINED" - - @generated @skip @team:DataDog/case-management - Scenario: Create a case returns "Not Found" response - Given new "CreateCase" request - And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/case-management - Scenario: Get the details of a case returns "Bad Request" response - Given new "GetCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Get the details of a case returns "Not Found" response - Given new "GetCase" request - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Get the details of a case returns "OK" response - Given new "GetCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Search cases returns "Bad Request" response - Given new "SearchCases" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Search cases returns "Not Found" response - Given new "SearchCases" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Search cases returns "OK" response - Given new "SearchCases" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management @with-pagination - Scenario: Search cases returns "OK" response with pagination - Given new "SearchCases" request - When the request with pagination is sent - Then the response status is 200 OK - - @team:DataDog/case-management - Scenario: Unarchive case returns "Bad Request" response - Given new "UnarchiveCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"type": "project"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Unarchive case returns "Not Found" response - Given new "UnarchiveCase" request - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - And body with value {"data": {"type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Unarchive case returns "OK" response - Given new "UnarchiveCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"type": "case"}} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/case-management - Scenario: Unassign case returns "Bad Request" response - Given new "UnassignCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"type": "project"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Unassign case returns "Not Found" response - Given new "UnassignCase" request - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - And body with value {"data": {"type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Unassign case returns "OK" response - Given new "UnassignCase" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"type": "case"}} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/case-management - Scenario: Update case priority returns "Bad Request" response - Given new "UpdatePriority" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"attributes": {"priority": "P1234"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Update case priority returns "Not Found" response - Given new "UpdatePriority" request - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Update case priority returns "OK" response - Given new "UpdatePriority" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - And the response "data.attributes.priority" is equal to "P3" - - @team:DataDog/case-management - Scenario: Update case status returns "Bad Request" response - Given new "UpdateStatus" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"attributes": {"status": "OPENED"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/case-management - Scenario: Update case status returns "Not Found" response - Given new "UpdateStatus" request - And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" - And body with value {"data": {"attributes": {"status": "OPEN"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/case-management - Scenario: Update case status returns "OK" response - Given new "UpdateStatus" request - And there is a valid "case" in the system - And request contains "case_id" parameter from "case.id" - And body with value {"data": {"attributes": {"status": "IN_PROGRESS"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - And the response "data.attributes.status" is equal to "IN_PROGRESS" diff --git a/features/v2/cases_projects.feature b/features/v2/cases_projects.feature deleted file mode 100644 index 1b3fe63e4995..000000000000 --- a/features/v2/cases_projects.feature +++ /dev/null @@ -1,82 +0,0 @@ -@endpoint(cases-projects) @endpoint(cases-projects-v2) -Feature: Cases Projects - View and manage project within Case Management - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "CasesProjects" API - - @generated @skip @team:DataDog/case-management - Scenario: Create a project returns "Bad Request" response - Given new "CreateProject" request - And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a project returns "CREATED" response - Given new "CreateProject" request - And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} - When the request is sent - Then the response status is 201 CREATED - - @generated @skip @team:DataDog/case-management - Scenario: Create a project returns "Not Found" response - Given new "CreateProject" request - And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get all projects returns "Bad Request" response - Given new "GetProjects" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get all projects returns "Not Found" response - Given new "GetProjects" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get all projects returns "OK" response - Given new "GetProjects" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Get the details of a project returns "Bad Request" response - Given new "GetProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get the details of a project returns "Not Found" response - Given new "GetProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get the details of a project returns "OK" response - Given new "GetProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Remove a project returns "API error response" response - Given new "DeleteProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 API error response - - @generated @skip @team:DataDog/case-management - Scenario: Remove a project returns "No Content" response - Given new "DeleteProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content From a3be314cfcfba6685d1ff8edee269f3ee1f735a6 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 20 Feb 2024 19:02:51 +0000 Subject: [PATCH 2/2] Regenerate client from commit 5ef419de of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 32 +- ...e-case-returns-Bad-Request-response.frozen | 1 + ...hive-case-returns-Bad-Request-response.yml | 11 +- ...ive-case-returns-Not-Found-response.frozen | 1 + ...rchive-case-returns-Not-Found-response.yml | 2 +- .../Archive-case-returns-OK-response.frozen | 1 + .../Archive-case-returns-OK-response.yml | 48 +++ ...n-case-returns-Bad-Request-response.frozen | 1 + ...sign-case-returns-Bad-Request-response.yml | 11 +- ...ign-case-returns-Not-Found-response.frozen | 1 + ...Assign-case-returns-Not-Found-response.yml | 14 +- .../Assign-case-returns-OK-response.frozen | 1 + .../Assign-case-returns-OK-response.yml | 90 +++++ ...a-case-returns-Bad-Request-response.frozen | 1 + ...te-a-case-returns-Bad-Request-response.yml | 2 +- ...ate-a-case-returns-CREATED-response.frozen | 1 + ...Create-a-case-returns-CREATED-response.yml | 68 ++++ ...f-a-case-returns-Not-Found-response.frozen | 1 + ...s-of-a-case-returns-Not-Found-response.yml | 2 +- ...tails-of-a-case-returns-OK-response.frozen | 1 + ...-details-of-a-case-returns-OK-response.yml | 44 +++ ...e-case-returns-Bad-Request-response.frozen | 1 + ...hive-case-returns-Bad-Request-response.yml | 11 +- ...ive-case-returns-Not-Found-response.frozen | 1 + ...rchive-case-returns-Not-Found-response.yml | 2 +- .../Unarchive-case-returns-OK-response.frozen | 1 + .../Unarchive-case-returns-OK-response.yml | 48 +++ ...n-case-returns-Bad-Request-response.frozen | 1 + ...sign-case-returns-Bad-Request-response.yml | 11 +- ...ign-case-returns-Not-Found-response.frozen | 1 + ...assign-case-returns-Not-Found-response.yml | 2 +- .../Unassign-case-returns-OK-response.frozen | 1 + .../Unassign-case-returns-OK-response.yml | 48 +++ ...iority-returns-Bad-Request-response.frozen | 1 + ...-priority-returns-Bad-Request-response.yml | 13 +- ...priority-returns-Not-Found-response.frozen | 1 + ...se-priority-returns-Not-Found-response.yml | 2 +- ...e-case-priority-returns-OK-response.frozen | 1 + ...date-case-priority-returns-OK-response.yml | 48 +++ ...status-returns-Bad-Request-response.frozen | 1 + ...se-status-returns-Bad-Request-response.yml | 13 +- ...e-status-returns-Not-Found-response.frozen | 1 + ...case-status-returns-Not-Found-response.yml | 2 +- ...ate-case-status-returns-OK-response.frozen | 1 + ...Update-case-status-returns-OK-response.yml | 48 +++ ...e-case-returns-Bad-Request-response.frozen | 1 - ...ive-case-returns-Not-Found-response.frozen | 1 - .../Archive-case-returns-OK-response.frozen | 1 - .../Archive-case-returns-OK-response.yml | 50 --- ...n-case-returns-Bad-Request-response.frozen | 1 - ...ign-case-returns-Not-Found-response.frozen | 1 - .../Assign-case-returns-OK-response.frozen | 1 - .../cases/Assign-case-returns-OK-response.yml | 92 ----- ...a-case-returns-Bad-Request-response.frozen | 1 - ...ate-a-case-returns-CREATED-response.frozen | 1 - ...Create-a-case-returns-CREATED-response.yml | 69 ---- ...f-a-case-returns-Not-Found-response.frozen | 1 - ...tails-of-a-case-returns-OK-response.frozen | 1 - ...-details-of-a-case-returns-OK-response.yml | 46 --- ...e-case-returns-Bad-Request-response.frozen | 1 - ...ive-case-returns-Not-Found-response.frozen | 1 - .../Unarchive-case-returns-OK-response.frozen | 1 - .../Unarchive-case-returns-OK-response.yml | 50 --- ...n-case-returns-Bad-Request-response.frozen | 1 - ...ign-case-returns-Not-Found-response.frozen | 1 - .../Unassign-case-returns-OK-response.frozen | 1 - .../Unassign-case-returns-OK-response.yml | 50 --- ...iority-returns-Bad-Request-response.frozen | 1 - ...priority-returns-Not-Found-response.frozen | 1 - ...e-case-priority-returns-OK-response.frozen | 1 - ...date-case-priority-returns-OK-response.yml | 50 --- ...status-returns-Bad-Request-response.frozen | 1 - ...e-status-returns-Not-Found-response.frozen | 1 - ...ate-case-status-returns-OK-response.frozen | 1 - ...Update-case-status-returns-OK-response.yml | 50 --- .../{cases => case-management}/ArchiveCase.rb | 2 +- .../{cases => case-management}/AssignCase.rb | 2 +- .../{cases => case-management}/CreateCase.rb | 4 +- .../CreateProject.rb | 2 +- .../DeleteProject.rb | 2 +- .../v2/{cases => case-management}/GetCase.rb | 2 +- .../GetProject.rb | 2 +- .../GetProjects.rb | 2 +- .../{cases => case-management}/SearchCases.rb | 2 +- .../SearchCases_3433960044.rb | 2 +- .../UnarchiveCase.rb | 2 +- .../UnassignCase.rb | 2 +- .../UpdatePriority.rb | 2 +- .../UpdateStatus.rb | 2 +- features/scenarios_model_mapping.rb | 18 +- features/v2/case_management.feature | 315 +++++++++++++++++ features/v2/given.json | 2 +- features/v2/undo.json | 26 +- lib/datadog_api_client/inflector.rb | 3 +- .../{cases_api.rb => case_management_api.rb} | 323 ++++++++++++++++-- .../v2/api/cases_projects_api.rb | 283 --------------- 97 files changed, 1173 insertions(+), 908 deletions(-) create mode 100644 cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Archive-case-returns-Bad-Request-response.yml (59%) create mode 100644 cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Archive-case-returns-Not-Found-response.yml (92%) create mode 100644 cassettes/features/v2/case_management/Archive-case-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Archive-case-returns-OK-response.yml create mode 100644 cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Assign-case-returns-Bad-Request-response.yml (61%) create mode 100644 cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Assign-case-returns-Not-Found-response.yml (63%) create mode 100644 cassettes/features/v2/case_management/Assign-case-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Assign-case-returns-OK-response.yml create mode 100644 cassettes/features/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Create-a-case-returns-Bad-Request-response.yml (95%) create mode 100644 cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.frozen create mode 100644 cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.yml create mode 100644 cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Get-the-details-of-a-case-returns-Not-Found-response.yml (91%) create mode 100644 cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.yml create mode 100644 cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Unarchive-case-returns-Bad-Request-response.yml (59%) create mode 100644 cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Unarchive-case-returns-Not-Found-response.yml (92%) create mode 100644 cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.yml create mode 100644 cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Unassign-case-returns-Bad-Request-response.yml (59%) create mode 100644 cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Unassign-case-returns-Not-Found-response.yml (92%) create mode 100644 cassettes/features/v2/case_management/Unassign-case-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Unassign-case-returns-OK-response.yml create mode 100644 cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Update-case-priority-returns-Bad-Request-response.yml (57%) create mode 100644 cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Update-case-priority-returns-Not-Found-response.yml (93%) create mode 100644 cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.yml create mode 100644 cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen rename cassettes/features/v2/{cases => case_management}/Update-case-status-returns-Bad-Request-response.yml (57%) create mode 100644 cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.frozen rename cassettes/features/v2/{cases => case_management}/Update-case-status-returns-Not-Found-response.yml (93%) create mode 100644 cassettes/features/v2/case_management/Update-case-status-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Update-case-status-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Archive-case-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Archive-case-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Assign-case-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Assign-case-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Create-a-case-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.frozen delete mode 100644 cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.yml delete mode 100644 cassettes/features/v2/cases/Get-the-details-of-a-case-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Unarchive-case-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Unarchive-case-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Unassign-case-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Unassign-case-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Update-case-priority-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Update-case-priority-returns-OK-response.yml delete mode 100644 cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.frozen delete mode 100644 cassettes/features/v2/cases/Update-case-status-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/cases/Update-case-status-returns-OK-response.yml rename examples/v2/{cases => case-management}/ArchiveCase.rb (85%) rename examples/v2/{cases => case-management}/AssignCase.rb (89%) rename examples/v2/{cases => case-management}/CreateCase.rb (90%) rename examples/v2/{cases-projects => case-management}/CreateProject.rb (87%) rename examples/v2/{cases-projects => case-management}/DeleteProject.rb (67%) rename examples/v2/{cases => case-management}/GetCase.rb (75%) rename examples/v2/{cases-projects => case-management}/GetProject.rb (67%) rename examples/v2/{cases-projects => case-management}/GetProjects.rb (63%) rename examples/v2/{cases => case-management}/SearchCases.rb (62%) rename examples/v2/{cases => case-management}/SearchCases_3433960044.rb (71%) rename examples/v2/{cases => case-management}/UnarchiveCase.rb (85%) rename examples/v2/{cases => case-management}/UnassignCase.rb (85%) rename examples/v2/{cases => case-management}/UpdatePriority.rb (89%) rename examples/v2/{cases => case-management}/UpdateStatus.rb (89%) create mode 100644 features/v2/case_management.feature rename lib/datadog_api_client/v2/api/{cases_api.rb => case_management_api.rb} (65%) delete mode 100644 lib/datadog_api_client/v2/api/cases_projects_api.rb diff --git a/.apigentools-info b/.apigentools-info index 439d4637a01c..ca99e86529d0 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-20 12:21:57.987991", - "spec_repo_commit": "7e467650" + "regenerated": "2024-02-20 19:02:24.916695", + "spec_repo_commit": "5ef419de" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-20 12:21:58.007659", - "spec_repo_commit": "7e467650" + "regenerated": "2024-02-20 19:02:24.939264", + "spec_repo_commit": "5ef419de" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5d118d9175cc..f58f161362ac 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22766,7 +22766,7 @@ paths: - cases_read summary: Search cases tags: - - Cases + - Case Management x-pagination: limitParam: page[size] pageOffsetParam: page[offset] @@ -22805,7 +22805,7 @@ paths: - cases_write summary: Create a case tags: - - Cases + - Case Management /api/v2/cases/projects: get: description: Get all projects. @@ -22834,7 +22834,7 @@ paths: - cases_read summary: Get all projects tags: - - Cases Projects + - Case Management post: description: Create a project. operationId: CreateProject @@ -22869,7 +22869,7 @@ paths: - cases_write summary: Create a project tags: - - Cases Projects + - Case Management /api/v2/cases/projects/{project_id}: delete: description: Remove a project using the project's `id`. @@ -22896,7 +22896,7 @@ paths: - cases_write summary: Remove a project tags: - - Cases Projects + - Case Management get: description: Get the details of a project by `project_id`. operationId: GetProject @@ -22926,7 +22926,7 @@ paths: - cases_read summary: Get the details of a project tags: - - Cases Projects + - Case Management /api/v2/cases/{case_id}: get: description: Get the details of case by `case_id` @@ -22957,7 +22957,7 @@ paths: - cases_read summary: Get the details of a case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/archive: post: description: Archive case @@ -22995,7 +22995,7 @@ paths: - cases_write summary: Archive case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/assign: post: description: Assign case to a user @@ -23033,7 +23033,7 @@ paths: - cases_write summary: Assign case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/priority: post: description: Update case priority @@ -23071,7 +23071,7 @@ paths: - cases_write summary: Update case priority tags: - - Cases + - Case Management /api/v2/cases/{case_id}/status: post: description: Update case status @@ -23109,7 +23109,7 @@ paths: - cases_write summary: Update case status tags: - - Cases + - Case Management /api/v2/cases/{case_id}/unarchive: post: description: Unarchive case @@ -23147,7 +23147,7 @@ paths: - cases_write summary: Unarchive case tags: - - Cases + - Case Management /api/v2/cases/{case_id}/unassign: post: description: Unassign case @@ -23185,7 +23185,7 @@ paths: - cases_write summary: Unassign case tags: - - Cases + - Case Management /api/v2/ci/pipeline: post: description: 'Send your pipeline event to your Datadog platform over HTTP. For @@ -34532,10 +34532,8 @@ tags: [Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more information. name: CI Visibility Tests -- description: View and manage cases within Datadog - name: Cases -- description: View and manage project within Case Management - name: Cases Projects +- description: View and manage cases and project within Case Management + name: Case Management - description: The Cloud Cost Management API allows you to set up, edit, and delete Cloud Cost Management accounts for AWS and Azure. See the [Cloud Cost Management page](https://docs.datadoghq.com/cloud_cost_management/) for more information. diff --git a/cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..02ebd0b91060 --- /dev/null +++ b/cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:15.159Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.yml similarity index 59% rename from cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.yml index 1e11df9c1dc1..959bc254a320 100644 --- a/cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Archive-case-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:35 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 @@ -14,16 +14,15 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"1f205230-5ea9-444e-a5f9-48f93d6a2cde","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:36.54518451Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"1f205230-5ea9-444e-a5f9-48f93d6a2cde","key":"DDFC-2","priority":"P4","public_id":"62","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + string: '{"data":{"id":"4e49aede-4c04-42d3-b5bc-f8eb4c1340df","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:15.280494299Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4e49aede-4c04-42d3-b5bc-f8eb4c1340df","key":"DDFC-182","priority":"P4","public_id":"242","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:35 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 @@ -34,7 +33,7 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/1f205230-5ea9-444e-a5f9-48f93d6a2cde/archive + uri: https://api.datadoghq.com/api/v2/cases/4e49aede-4c04-42d3-b5bc-f8eb4c1340df/archive response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..16674248e303 --- /dev/null +++ b/cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:15.378Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.yml similarity index 92% rename from cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.yml index e721b71a86e0..1f492e1cf595 100644 --- a/cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Archive-case-returns-Not-Found-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:07 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Archive-case-returns-OK-response.frozen b/cassettes/features/v2/case_management/Archive-case-returns-OK-response.frozen new file mode 100644 index 000000000000..f8ce6d98bba0 --- /dev/null +++ b/cassettes/features/v2/case_management/Archive-case-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:15.466Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Archive-case-returns-OK-response.yml b/cassettes/features/v2/case_management/Archive-case-returns-OK-response.yml new file mode 100644 index 000000000000..b4d065eee075 --- /dev/null +++ b/cassettes/features/v2/case_management/Archive-case-returns-OK-response.yml @@ -0,0 +1,48 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"3752309b-6a77-4015-845a-02ff88647b4b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:15.546103234Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"3752309b-6a77-4015-845a-02ff88647b4b","key":"DDFC-183","priority":"P4","public_id":"243","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/3752309b-6a77-4015-845a-02ff88647b4b/archive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"3752309b-6a77-4015-845a-02ff88647b4b","type":"case","attributes":{"archived_at":"2024-02-14T18:55:15.641594121Z","attributes":{},"created_at":"2024-02-14T18:55:15.546103Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"3752309b-6a77-4015-845a-02ff88647b4b","key":"DDFC-183","priority":"P4","public_id":"243","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..2749371a9b7e --- /dev/null +++ b/cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:15.651Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.yml similarity index 61% rename from cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.yml index 870b9ad85e24..5763284fc306 100644 --- a/cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Assign-case-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Mon, 12 Feb 2024 13:25:55 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 @@ -14,16 +14,15 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"4039be1a-5f87-4666-b986-a8396c0225c3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-12T13:25:56.280897807Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4039be1a-5f87-4666-b986-a8396c0225c3","key":"DDFC-17","priority":"P4","public_id":"77","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + string: '{"data":{"id":"cf2e3b59-d504-4714-9853-38e4ceddb858","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:15.728783622Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"cf2e3b59-d504-4714-9853-38e4ceddb858","key":"DDFC-184","priority":"P4","public_id":"244","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Mon, 12 Feb 2024 13:25:55 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 @@ -34,7 +33,7 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/4039be1a-5f87-4666-b986-a8396c0225c3/assign + uri: https://api.datadoghq.com/api/v2/cases/cf2e3b59-d504-4714-9853-38e4ceddb858/assign response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..dac002f7f37c --- /dev/null +++ b/cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:15.832Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.yml similarity index 63% rename from cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.yml index 5f99c8f42c06..d5fc44f424a7 100644 --- a/cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Assign-case-returns-Not-Found-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:08 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Assign_case_returns_Not_Found_response-1707311348@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Assign_case_returns_Not_Found_response-1707936915@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"14040f89-c5ba-11ee-87b5-f6892353f87d","attributes":{"name":null,"handle":"test-assign_case_returns_not_found_response-1707311348@datadoghq.com","created_at":"2024-02-07T13:09:08.546371+00:00","modified_at":"2024-02-07T13:09:08.546371+00:00","email":"test-assign_case_returns_not_found_response-1707311348@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e0a6ed9703a1166a2c07bca15e37d0d6?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd","attributes":{"name":null,"handle":"test-assign_case_returns_not_found_response-1707936915@datadoghq.com","created_at":"2024-02-14T18:55:15.963542+00:00","modified_at":"2024-02-14T18:55:15.963542+00:00","email":"test-assign_case_returns_not_found_response-1707936915@datadoghq.com","icon":"https://secure.gravatar.com/avatar/379ecb2d1d9ca2e9ce66fa109609c256?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Wed, 07 Feb 2024 13:09:08 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"assignee_id":"14040f89-c5ba-11ee-87b5-f6892353f87d"},"type":"case"}}' + string: '{"data":{"attributes":{"assignee_id":"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd"},"type":"case"}}' headers: Accept: - application/json @@ -47,14 +47,14 @@ http_interactions: status: code: 404 message: Not Found -- recorded_at: Wed, 07 Feb 2024 13:09:08 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:15 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/14040f89-c5ba-11ee-87b5-f6892353f87d + uri: https://api.datadoghq.com/api/v2/users/9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Assign-case-returns-OK-response.frozen b/cassettes/features/v2/case_management/Assign-case-returns-OK-response.frozen new file mode 100644 index 000000000000..63999fedab29 --- /dev/null +++ b/cassettes/features/v2/case_management/Assign-case-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:16.362Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Assign-case-returns-OK-response.yml b/cassettes/features/v2/case_management/Assign-case-returns-OK-response.yml new file mode 100644 index 000000000000..cb8f7aad5e03 --- /dev/null +++ b/cassettes/features/v2/case_management/Assign-case-returns-OK-response.yml @@ -0,0 +1,90 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:16 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:16.445823452Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","key":"DDFC-185","priority":"P4","public_id":"245","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:16 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"Test-Assign_case_returns_OK_response-1707936916@datadoghq.com","title":"user + title"},"type":"users"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/users + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"users","id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3","attributes":{"name":null,"handle":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","created_at":"2024-02-14T18:55:16.611469+00:00","modified_at":"2024-02-14T18:55:16.611469+00:00","email":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","icon":"https://secure.gravatar.com/avatar/982f69dc821d8ef307cfc8907452899b?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:16 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"assignee_id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3"},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c/assign + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:16.445823Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c","key":"DDFC-185","modified_at":"2024-02-14T18:55:16.737803Z","priority":"P4","public_id":"245","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3","type":"user"}},"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}},{"id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3","type":"user","attributes":{"email":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","handle":"test-assign_case_returns_ok_response-1707936916@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Feb 2024 18:55:16 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/users/97a38d32-cb6a-11ee-9645-0a530ef9b7d3 + 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/case_management/Create-a-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..3d430913723b --- /dev/null +++ b/cassettes/features/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:16.995Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Create-a-case-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Create-a-case-returns-Bad-Request-response.yml similarity index 95% rename from cassettes/features/v2/cases/Create-a-case-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Create-a-case-returns-Bad-Request-response.yml index c357c15f1e94..2077fb2d0ea7 100644 --- a/cassettes/features/v2/cases/Create-a-case-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Create-a-case-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:09 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:16 GMT request: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.frozen b/cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.frozen new file mode 100644 index 000000000000..d0a1a57a4234 --- /dev/null +++ b/cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:17.074Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.yml b/cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.yml new file mode 100644 index 000000000000..147fd119b21d --- /dev/null +++ b/cassettes/features/v2/case_management/Create-a-case-returns-CREATED-response.yml @@ -0,0 +1,68 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"Test-Create_a_case_returns_CREATED_response-1707936917@datadoghq.com","title":"user + title"},"type":"users"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/users + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"users","id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","attributes":{"name":null,"handle":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","created_at":"2024-02-14T18:55:17.186960+00:00","modified_at":"2024-02-14T18:55:17.186960+00:00","email":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","icon":"https://secure.gravatar.com/avatar/04ba872d0c124a11691bb75e2b774d08?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"NOT_DEFINED","title":"Security breach + investigation in 8216c516b64665ce","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"93237ca1-b5ee-4116-9bfc-d94f99cd9629","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:17.301872096Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"93237ca1-b5ee-4116-9bfc-d94f99cd9629","key":"DDFC-186","priority":"NOT_DEFINED","public_id":"246","status":"OPEN","title":"Security + breach investigation in 8216c516b64665ce","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","type":"user"}},"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}},{"id":"97fb5e7f-cb6a-11ee-8de6-d2393b962484","type":"user","attributes":{"email":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","handle":"test-create_a_case_returns_created_response-1707936917@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/users/97fb5e7f-cb6a-11ee-8de6-d2393b962484 + 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/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..1f1e9770dced --- /dev/null +++ b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:17.678Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.yml similarity index 91% rename from cassettes/features/v2/cases/Get-the-details-of-a-case-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.yml index 961f3f5fdf89..181e36b7bed9 100644 --- a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:09 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT request: body: null headers: diff --git a/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen new file mode 100644 index 000000000000..ce3e1d89d5d7 --- /dev/null +++ b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:17.758Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.yml b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.yml new file mode 100644 index 000000000000..4a3e29a574e8 --- /dev/null +++ b/cassettes/features/v2/case_management/Get-the-details-of-a-case-returns-OK-response.yml @@ -0,0 +1,44 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d981cc6f-654e-4528-8451-d3d99259d4d6","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:17.837538892Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d981cc6f-654e-4528-8451-d3d99259d4d6","key":"DDFC-187","priority":"P4","public_id":"247","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/cases/d981cc6f-654e-4528-8451-d3d99259d4d6 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d981cc6f-654e-4528-8451-d3d99259d4d6","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:17.837539Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d981cc6f-654e-4528-8451-d3d99259d4d6","key":"DDFC-187","priority":"P4","public_id":"247","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..5b768a1c8862 --- /dev/null +++ b/cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:17.936Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.yml similarity index 59% rename from cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.yml index f4f7fe934c01..0c292bf2aaf2 100644 --- a/cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Unarchive-case-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:41 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT request: body: encoding: UTF-8 @@ -14,16 +14,15 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"91b52d3b-4d67-4b7f-ba4d-da67d8b46798","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:41.662578539Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"91b52d3b-4d67-4b7f-ba4d-da67d8b46798","key":"DDFC-8","priority":"P4","public_id":"68","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + string: '{"data":{"id":"7c588891-1486-4cf6-992f-f0c3a97f0245","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.021909299Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"7c588891-1486-4cf6-992f-f0c3a97f0245","key":"DDFC-188","priority":"P4","public_id":"248","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:41 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:17 GMT request: body: encoding: UTF-8 @@ -34,7 +33,7 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/91b52d3b-4d67-4b7f-ba4d-da67d8b46798/unarchive + uri: https://api.datadoghq.com/api/v2/cases/7c588891-1486-4cf6-992f-f0c3a97f0245/unarchive response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..034f1d4aa817 --- /dev/null +++ b/cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.130Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.yml similarity index 92% rename from cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.yml index 3267333cd768..4a350024090a 100644 --- a/cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Unarchive-case-returns-Not-Found-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:10 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.frozen b/cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.frozen new file mode 100644 index 000000000000..df7e85e9f41c --- /dev/null +++ b/cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.220Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.yml b/cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.yml new file mode 100644 index 000000000000..c67bca71cb3b --- /dev/null +++ b/cassettes/features/v2/case_management/Unarchive-case-returns-OK-response.yml @@ -0,0 +1,48 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"56b03839-5199-4207-94e6-648f5c363d1d","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.285988591Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"56b03839-5199-4207-94e6-648f5c363d1d","key":"DDFC-189","priority":"P4","public_id":"249","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/56b03839-5199-4207-94e6-648f5c363d1d/unarchive + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"56b03839-5199-4207-94e6-648f5c363d1d","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.285989Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"56b03839-5199-4207-94e6-648f5c363d1d","key":"DDFC-189","priority":"P4","public_id":"249","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..5c53ccfe49e4 --- /dev/null +++ b/cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.364Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.yml similarity index 59% rename from cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.yml index adcf0e7b6c79..53f969642bdf 100644 --- a/cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Unassign-case-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:42 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 @@ -14,16 +14,15 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"8a6e4254-7429-4398-99c2-ba9363fb3f98","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:42.908434394Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8a6e4254-7429-4398-99c2-ba9363fb3f98","key":"DDFC-10","priority":"P4","public_id":"70","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + string: '{"data":{"id":"4c89618c-11cc-40ba-bc6c-000e862910b1","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.434117143Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4c89618c-11cc-40ba-bc6c-000e862910b1","key":"DDFC-190","priority":"P4","public_id":"250","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:42 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 @@ -34,7 +33,7 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/8a6e4254-7429-4398-99c2-ba9363fb3f98/unassign + uri: https://api.datadoghq.com/api/v2/cases/4c89618c-11cc-40ba-bc6c-000e862910b1/unassign response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..6a08f9742dc2 --- /dev/null +++ b/cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.522Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.yml similarity index 92% rename from cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.yml index 5cdf5d846e3e..82392b32ce89 100644 --- a/cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Unassign-case-returns-Not-Found-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:10 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Unassign-case-returns-OK-response.frozen b/cassettes/features/v2/case_management/Unassign-case-returns-OK-response.frozen new file mode 100644 index 000000000000..e57766f0dfbf --- /dev/null +++ b/cassettes/features/v2/case_management/Unassign-case-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.613Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Unassign-case-returns-OK-response.yml b/cassettes/features/v2/case_management/Unassign-case-returns-OK-response.yml new file mode 100644 index 000000000000..ce4c53838ceb --- /dev/null +++ b/cassettes/features/v2/case_management/Unassign-case-returns-OK-response.yml @@ -0,0 +1,48 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fa3c26fc-fada-4308-8888-4067d97acf06","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.689935858Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"fa3c26fc-fada-4308-8888-4067d97acf06","key":"DDFC-191","priority":"P4","public_id":"251","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/fa3c26fc-fada-4308-8888-4067d97acf06/unassign + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"fa3c26fc-fada-4308-8888-4067d97acf06","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.689936Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"fa3c26fc-fada-4308-8888-4067d97acf06","key":"DDFC-191","priority":"P4","public_id":"251","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..b44760c0495f --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.767Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.yml similarity index 57% rename from cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.yml index 73ad87738996..168bd2294248 100644 --- a/cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Update-case-priority-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:43 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 @@ -14,16 +14,15 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"09077090-4370-4539-b9e5-445173f4fced","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:44.06773183Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"09077090-4370-4539-b9e5-445173f4fced","key":"DDFC-12","priority":"P4","public_id":"72","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + string: '{"data":{"id":"683c81be-fa27-42c8-957c-897923a2f660","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:18.846163387Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"683c81be-fa27-42c8-957c-897923a2f660","key":"DDFC-192","priority":"P4","public_id":"252","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:43 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 @@ -34,12 +33,12 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/09077090-4370-4539-b9e5-445173f4fced/priority + uri: https://api.datadoghq.com/api/v2/cases/683c81be-fa27-42c8-957c-897923a2f660/priority response: body: encoding: UTF-8 string: '{"errors":[{"title":"Generic Error","detail":"invalid priority P1234. - Must be one of P3, P4, P5, NOT_DEFINED, P1, P2"}]}' + Must be one of P1, P2, P3, P4, P5, NOT_DEFINED"}]}' headers: Content-Type: - application/vnd.api+json diff --git a/cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..e6fee30e9dc5 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:18.927Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.yml similarity index 93% rename from cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.yml index 53db6339e746..b1fac0165fa3 100644 --- a/cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Update-case-priority-returns-Not-Found-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:11 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:18 GMT request: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.frozen b/cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.frozen new file mode 100644 index 000000000000..42fe59de7b36 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:19.004Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.yml b/cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.yml new file mode 100644 index 000000000000..bbf307f92c8a --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-priority-returns-OK-response.yml @@ -0,0 +1,48 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"c55de906-a08b-4916-ade3-5f1b268379c3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.080339451Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"c55de906-a08b-4916-ade3-5f1b268379c3","key":"DDFC-193","priority":"P4","public_id":"253","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P3"},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/c55de906-a08b-4916-ade3-5f1b268379c3/priority + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"c55de906-a08b-4916-ade3-5f1b268379c3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.080339Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"c55de906-a08b-4916-ade3-5f1b268379c3","key":"DDFC-193","modified_at":"2024-02-14T18:55:19.160763Z","priority":"P3","public_id":"253","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..1c1c338c0f25 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:19.178Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.yml similarity index 57% rename from cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.yml rename to cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.yml index ed41ab362817..2a4c8e4c3909 100644 --- a/cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.yml +++ b/cassettes/features/v2/case_management/Update-case-status-returns-Bad-Request-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:45 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT request: body: encoding: UTF-8 @@ -14,16 +14,15 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"243feddb-69f8-4e22-988a-8ae954b643fa","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:45.265151303Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"243feddb-69f8-4e22-988a-8ae954b643fa","key":"DDFC-14","priority":"P4","public_id":"74","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' + string: '{"data":{"id":"1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.251201316Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0","key":"DDFC-194","priority":"P4","public_id":"254","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:45 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT request: body: encoding: UTF-8 @@ -34,12 +33,12 @@ http_interactions: Content-Type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/243feddb-69f8-4e22-988a-8ae954b643fa/status + uri: https://api.datadoghq.com/api/v2/cases/1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0/status response: body: encoding: UTF-8 string: '{"errors":[{"title":"Generic Error","detail":"invalid status OPENED. - Must be one of CLOSED, SUNKNOWN, OPEN, IN_PROGRESS"}]}' + Must be one of SUNKNOWN, OPEN, IN_PROGRESS, CLOSED"}]}' headers: Content-Type: - application/vnd.api+json diff --git a/cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..3725bea8b611 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:19.338Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.yml similarity index 93% rename from cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.yml rename to cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.yml index edee3ed0578c..c9347555c2c8 100644 --- a/cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.yml +++ b/cassettes/features/v2/case_management/Update-case-status-returns-Not-Found-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Feb 2024 13:09:11 GMT +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT request: body: encoding: UTF-8 diff --git a/cassettes/features/v2/case_management/Update-case-status-returns-OK-response.frozen b/cassettes/features/v2/case_management/Update-case-status-returns-OK-response.frozen new file mode 100644 index 000000000000..a7c1161cdca5 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-status-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-02-14T18:55:19.415Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Update-case-status-returns-OK-response.yml b/cassettes/features/v2/case_management/Update-case-status-returns-OK-response.yml new file mode 100644 index 000000000000..cc8f7dfb898c --- /dev/null +++ b/cassettes/features/v2/case_management/Update-case-status-returns-OK-response.yml @@ -0,0 +1,48 @@ +http_interactions: +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.487094769Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","key":"DDFC-195","priority":"P4","public_id":"255","status":"OPEN","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 14 Feb 2024 18:55:19 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"status":"IN_PROGRESS"},"type":"case"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/d1633979-1770-4e5b-a2d0-2ede9f2a8f43/status + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","type":"case","attributes":{"attributes":{},"created_at":"2024-02-14T18:55:19.487095Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"d1633979-1770-4e5b-a2d0-2ede9f2a8f43","key":"DDFC-195","modified_at":"2024-02-14T18:55:19.559421Z","priority":"P4","public_id":"255","status":"IN_PROGRESS","title":"My + new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":""}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.frozen deleted file mode 100644 index ef6c63cf9ee5..000000000000 --- a/cassettes/features/v2/cases/Archive-case-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:35.988Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.frozen deleted file mode 100644 index 6b42677b0f5b..000000000000 --- a/cassettes/features/v2/cases/Archive-case-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:07.949Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Archive-case-returns-OK-response.frozen b/cassettes/features/v2/cases/Archive-case-returns-OK-response.frozen deleted file mode 100644 index 558899ce6daa..000000000000 --- a/cassettes/features/v2/cases/Archive-case-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:36.901Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Archive-case-returns-OK-response.yml b/cassettes/features/v2/cases/Archive-case-returns-OK-response.yml deleted file mode 100644 index b90df12b6afc..000000000000 --- a/cassettes/features/v2/cases/Archive-case-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:36 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"99e6e8cd-f115-4168-8814-30776007f44c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:37.185776261Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"99e6e8cd-f115-4168-8814-30776007f44c","key":"DDFC-3","priority":"P4","public_id":"63","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:36 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases/99e6e8cd-f115-4168-8814-30776007f44c/archive - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"99e6e8cd-f115-4168-8814-30776007f44c","type":"case","attributes":{"archived_at":"2024-02-07T18:00:37.47125606Z","attributes":{},"created_at":"2024-02-07T18:00:37.185776Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"99e6e8cd-f115-4168-8814-30776007f44c","key":"DDFC-3","priority":"P4","public_id":"63","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.frozen deleted file mode 100644 index 9f1a33f2842e..000000000000 --- a/cassettes/features/v2/cases/Assign-case-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-12T13:25:55.665Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.frozen deleted file mode 100644 index 1f0ce04277c2..000000000000 --- a/cassettes/features/v2/cases/Assign-case-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:08.433Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Assign-case-returns-OK-response.frozen b/cassettes/features/v2/cases/Assign-case-returns-OK-response.frozen deleted file mode 100644 index 5b2d1f17d03a..000000000000 --- a/cassettes/features/v2/cases/Assign-case-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:38.147Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Assign-case-returns-OK-response.yml b/cassettes/features/v2/cases/Assign-case-returns-OK-response.yml deleted file mode 100644 index 3c208b4bd365..000000000000 --- a/cassettes/features/v2/cases/Assign-case-returns-OK-response.yml +++ /dev/null @@ -1,92 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:38 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"a0801fce-a045-4b66-ad78-effcd959fa4f","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:38.353039559Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"a0801fce-a045-4b66-ad78-effcd959fa4f","key":"DDFC-5","priority":"P4","public_id":"65","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:38 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Assign_case_returns_OK_response-1707328838@datadoghq.com","title":"user - title"},"type":"users"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/users - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"users","id":"cced7029-c5e2-11ee-ac63-c24751e8bab0","attributes":{"name":null,"handle":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","created_at":"2024-02-07T18:00:38.645791+00:00","modified_at":"2024-02-07T18:00:38.645791+00:00","email":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","icon":"https://secure.gravatar.com/avatar/dd4005a3eca9e7c6aed30c77d193bc37?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:38 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"assignee_id":"cced7029-c5e2-11ee-ac63-c24751e8bab0"},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases/a0801fce-a045-4b66-ad78-effcd959fa4f/assign - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"a0801fce-a045-4b66-ad78-effcd959fa4f","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:38.35304Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"a0801fce-a045-4b66-ad78-effcd959fa4f","key":"DDFC-5","modified_at":"2024-02-07T18:00:39.010235Z","priority":"P4","public_id":"65","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"cced7029-c5e2-11ee-ac63-c24751e8bab0","type":"user"}},"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}},{"id":"cced7029-c5e2-11ee-ac63-c24751e8bab0","type":"user","attributes":{"email":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","handle":"test-assign_case_returns_ok_response-1707328838@datadoghq.com","name":""}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -- recorded_at: Wed, 07 Feb 2024 18:00:38 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/users/cced7029-c5e2-11ee-ac63-c24751e8bab0 - 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/cases/Create-a-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Create-a-case-returns-Bad-Request-response.frozen deleted file mode 100644 index 14b7cfa0a250..000000000000 --- a/cassettes/features/v2/cases/Create-a-case-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:09.415Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.frozen b/cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.frozen deleted file mode 100644 index 1132edd29cfa..000000000000 --- a/cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:39.566Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.yml b/cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.yml deleted file mode 100644 index 2e2a999fb578..000000000000 --- a/cassettes/features/v2/cases/Create-a-case-returns-CREATED-response.yml +++ /dev/null @@ -1,69 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:39 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Create_a_case_returns_CREATED_response-1707328839@datadoghq.com","title":"user - title"},"type":"users"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/users - response: - body: - encoding: UTF-8 - string: '{"data":{"type":"users","id":"cda929dc-c5e2-11ee-883d-6ad03867f364","attributes":{"name":null,"handle":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","created_at":"2024-02-07T18:00:39.876070+00:00","modified_at":"2024-02-07T18:00:39.876070+00:00","email":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e564f62a22caae2dd8e878a8d73c6328?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' - headers: - Content-Type: - - application/json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:39 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"NOT_DEFINED","title":"Security breach - investigation in 3b9b6a6abdcf0b9b","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"cda929dc-c5e2-11ee-883d-6ad03867f364","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"4045de8b-3808-4bb6-94c9-f55ced4811c7","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:40.197151067Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"4045de8b-3808-4bb6-94c9-f55ced4811c7","key":"DDFC-6","priority":"NOT_DEFINED","public_id":"66","status":"OPEN","title":"Security - breach investigation in 3b9b6a6abdcf0b9b","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"cda929dc-c5e2-11ee-883d-6ad03867f364","type":"user"}},"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}},{"id":"cda929dc-c5e2-11ee-883d-6ad03867f364","type":"user","attributes":{"email":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","handle":"test-create_a_case_returns_created_response-1707328839@datadoghq.com","name":""}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:39 GMT - request: - body: null - headers: - Accept: - - '*/*' - method: DELETE - uri: https://api.datadoghq.com/api/v2/users/cda929dc-c5e2-11ee-883d-6ad03867f364 - 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/cases/Get-the-details-of-a-case-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-Not-Found-response.frozen deleted file mode 100644 index 3601a30777ba..000000000000 --- a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:09.931Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.frozen b/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.frozen deleted file mode 100644 index a12854951361..000000000000 --- a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:40.743Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.yml b/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.yml deleted file mode 100644 index 8ac9b3b999e6..000000000000 --- a/cassettes/features/v2/cases/Get-the-details-of-a-case-returns-OK-response.yml +++ /dev/null @@ -1,46 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:40 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:41.007812312Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","key":"DDFC-7","priority":"P4","public_id":"67","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:40 GMT - request: - body: null - headers: - Accept: - - application/json - method: GET - uri: https://api.datadoghq.com/api/v2/cases/8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749 - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:41.007812Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749","key":"DDFC-7","priority":"P4","public_id":"67","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.frozen deleted file mode 100644 index 5d3fc771c200..000000000000 --- a/cassettes/features/v2/cases/Unarchive-case-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:41.393Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.frozen deleted file mode 100644 index df6e8d3aea05..000000000000 --- a/cassettes/features/v2/cases/Unarchive-case-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:10.329Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unarchive-case-returns-OK-response.frozen b/cassettes/features/v2/cases/Unarchive-case-returns-OK-response.frozen deleted file mode 100644 index c639a2463ee5..000000000000 --- a/cassettes/features/v2/cases/Unarchive-case-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:42.027Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unarchive-case-returns-OK-response.yml b/cassettes/features/v2/cases/Unarchive-case-returns-OK-response.yml deleted file mode 100644 index 64acd5b94657..000000000000 --- a/cassettes/features/v2/cases/Unarchive-case-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:42 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:42.286687881Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","key":"DDFC-9","priority":"P4","public_id":"69","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:42 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases/020e2ce7-9fe8-4273-81ae-1e5873fba9d3/unarchive - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:42.286688Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"020e2ce7-9fe8-4273-81ae-1e5873fba9d3","key":"DDFC-9","priority":"P4","public_id":"69","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.frozen deleted file mode 100644 index a7b2a9e33bff..000000000000 --- a/cassettes/features/v2/cases/Unassign-case-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:42.637Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.frozen deleted file mode 100644 index fee1f808458f..000000000000 --- a/cassettes/features/v2/cases/Unassign-case-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:10.714Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unassign-case-returns-OK-response.frozen b/cassettes/features/v2/cases/Unassign-case-returns-OK-response.frozen deleted file mode 100644 index 0a5d0226a277..000000000000 --- a/cassettes/features/v2/cases/Unassign-case-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:43.176Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Unassign-case-returns-OK-response.yml b/cassettes/features/v2/cases/Unassign-case-returns-OK-response.yml deleted file mode 100644 index 4992fafbddcf..000000000000 --- a/cassettes/features/v2/cases/Unassign-case-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:43 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:43.427988311Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","key":"DDFC-11","priority":"P4","public_id":"71","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:43 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases/8c5de575-685c-4ac4-a78a-9774c4f2160b/unassign - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:43.427988Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"8c5de575-685c-4ac4-a78a-9774c4f2160b","key":"DDFC-11","priority":"P4","public_id":"71","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.frozen deleted file mode 100644 index da678b9cae11..000000000000 --- a/cassettes/features/v2/cases/Update-case-priority-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:43.807Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.frozen deleted file mode 100644 index 33edf5b45804..000000000000 --- a/cassettes/features/v2/cases/Update-case-priority-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:11.084Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-priority-returns-OK-response.frozen b/cassettes/features/v2/cases/Update-case-priority-returns-OK-response.frozen deleted file mode 100644 index ac293b567add..000000000000 --- a/cassettes/features/v2/cases/Update-case-priority-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:44.433Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-priority-returns-OK-response.yml b/cassettes/features/v2/cases/Update-case-priority-returns-OK-response.yml deleted file mode 100644 index d41a2995e4c1..000000000000 --- a/cassettes/features/v2/cases/Update-case-priority-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:44 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:44.723781245Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","key":"DDFC-13","priority":"P4","public_id":"73","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:44 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P3"},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases/60fdb1eb-209a-4072-9db3-4d08a9c4180c/priority - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:44.723781Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"60fdb1eb-209a-4072-9db3-4d08a9c4180c","key":"DDFC-13","modified_at":"2024-02-07T18:00:45.028076Z","priority":"P3","public_id":"73","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.frozen b/cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.frozen deleted file mode 100644 index 8a9c88da3835..000000000000 --- a/cassettes/features/v2/cases/Update-case-status-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:45.069Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.frozen b/cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.frozen deleted file mode 100644 index 52aa1297fc55..000000000000 --- a/cassettes/features/v2/cases/Update-case-status-returns-Not-Found-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T13:09:11.471Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-status-returns-OK-response.frozen b/cassettes/features/v2/cases/Update-case-status-returns-OK-response.frozen deleted file mode 100644 index 2c3628185823..000000000000 --- a/cassettes/features/v2/cases/Update-case-status-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2024-02-07T18:00:45.628Z \ No newline at end of file diff --git a/cassettes/features/v2/cases/Update-case-status-returns-OK-response.yml b/cassettes/features/v2/cases/Update-case-status-returns-OK-response.yml deleted file mode 100644 index 7c13103c4100..000000000000 --- a/cassettes/features/v2/cases/Update-case-status-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Wed, 07 Feb 2024 18:00:45 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"priority":"P4","title":"My new case","type":"STANDARD"},"relationships":{"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:45.905784777Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","key":"DDFC-15","priority":"P4","public_id":"75","status":"OPEN","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 201 - message: Created -- recorded_at: Wed, 07 Feb 2024 18:00:45 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"status":"IN_PROGRESS"},"type":"case"}}' - headers: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/cases/ceae478d-b504-4cb7-bad2-e8f8e5a0a77b/status - response: - body: - encoding: UTF-8 - string: '{"data":{"id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","type":"case","attributes":{"attributes":{},"created_at":"2024-02-07T18:00:45.905785Z","creation_source":"MANUAL","description":"","insights":[],"internal_id":"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b","key":"DDFC-15","modified_at":"2024-02-07T18:00:46.22949Z","priority":"P4","public_id":"75","status":"IN_PROGRESS","title":"My - new case","type":"STANDARD"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"}}]}' - headers: - Content-Type: - - application/vnd.api+json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/examples/v2/cases/ArchiveCase.rb b/examples/v2/case-management/ArchiveCase.rb similarity index 85% rename from examples/v2/cases/ArchiveCase.rb rename to examples/v2/case-management/ArchiveCase.rb index c5b5ec5f3d14..96f485e6c1aa 100644 --- a/examples/v2/cases/ArchiveCase.rb +++ b/examples/v2/case-management/ArchiveCase.rb @@ -1,7 +1,7 @@ # Archive case returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/examples/v2/cases/AssignCase.rb b/examples/v2/case-management/AssignCase.rb similarity index 89% rename from examples/v2/cases/AssignCase.rb rename to examples/v2/case-management/AssignCase.rb index 24eab2cbe3e5..f6427fcdf0ba 100644 --- a/examples/v2/cases/AssignCase.rb +++ b/examples/v2/case-management/AssignCase.rb @@ -1,7 +1,7 @@ # Assign case returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/examples/v2/cases/CreateCase.rb b/examples/v2/case-management/CreateCase.rb similarity index 90% rename from examples/v2/cases/CreateCase.rb rename to examples/v2/case-management/CreateCase.rb index e130774f4f89..1286db2befc9 100644 --- a/examples/v2/cases/CreateCase.rb +++ b/examples/v2/case-management/CreateCase.rb @@ -1,7 +1,7 @@ # Create a case returns "CREATED" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "user" in the system USER_DATA_ID = ENV["USER_DATA_ID"] @@ -10,7 +10,7 @@ data: DatadogAPIClient::V2::CaseCreate.new({ attributes: DatadogAPIClient::V2::CaseCreateAttributes.new({ priority: DatadogAPIClient::V2::CasePriority::NOT_DEFINED, - title: "Security breach investigation in 3dcc5b2ebf9bfb8f", + title: "Security breach investigation in 0cfbc5cbc676ee71", type: DatadogAPIClient::V2::CaseType::STANDARD, }), relationships: DatadogAPIClient::V2::CaseCreateRelationships.new({ diff --git a/examples/v2/cases-projects/CreateProject.rb b/examples/v2/case-management/CreateProject.rb similarity index 87% rename from examples/v2/cases-projects/CreateProject.rb rename to examples/v2/case-management/CreateProject.rb index b7ae0132f595..de760c4f6264 100644 --- a/examples/v2/cases-projects/CreateProject.rb +++ b/examples/v2/case-management/CreateProject.rb @@ -1,7 +1,7 @@ # Create a project returns "CREATED" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesProjectsAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new body = DatadogAPIClient::V2::ProjectCreateRequest.new({ data: DatadogAPIClient::V2::ProjectCreate.new({ diff --git a/examples/v2/cases-projects/DeleteProject.rb b/examples/v2/case-management/DeleteProject.rb similarity index 67% rename from examples/v2/cases-projects/DeleteProject.rb rename to examples/v2/case-management/DeleteProject.rb index 9b61ff96d53f..5a0b79924a7d 100644 --- a/examples/v2/cases-projects/DeleteProject.rb +++ b/examples/v2/case-management/DeleteProject.rb @@ -1,5 +1,5 @@ # Remove a project returns "No Content" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesProjectsAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new api_instance.delete_project("project_id") diff --git a/examples/v2/cases/GetCase.rb b/examples/v2/case-management/GetCase.rb similarity index 75% rename from examples/v2/cases/GetCase.rb rename to examples/v2/case-management/GetCase.rb index 145725e5a5ef..16a1badd880d 100644 --- a/examples/v2/cases/GetCase.rb +++ b/examples/v2/case-management/GetCase.rb @@ -1,7 +1,7 @@ # Get the details of a case returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/examples/v2/cases-projects/GetProject.rb b/examples/v2/case-management/GetProject.rb similarity index 67% rename from examples/v2/cases-projects/GetProject.rb rename to examples/v2/case-management/GetProject.rb index 68fe893ea7fc..e3ee76e08888 100644 --- a/examples/v2/cases-projects/GetProject.rb +++ b/examples/v2/case-management/GetProject.rb @@ -1,5 +1,5 @@ # Get the details of a project returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesProjectsAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new p api_instance.get_project("project_id") diff --git a/examples/v2/cases-projects/GetProjects.rb b/examples/v2/case-management/GetProjects.rb similarity index 63% rename from examples/v2/cases-projects/GetProjects.rb rename to examples/v2/case-management/GetProjects.rb index b2ca99fd2d58..f33b79a4d1d7 100644 --- a/examples/v2/cases-projects/GetProjects.rb +++ b/examples/v2/case-management/GetProjects.rb @@ -1,5 +1,5 @@ # Get all projects returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesProjectsAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new p api_instance.get_projects() diff --git a/examples/v2/cases/SearchCases.rb b/examples/v2/case-management/SearchCases.rb similarity index 62% rename from examples/v2/cases/SearchCases.rb rename to examples/v2/case-management/SearchCases.rb index 91e4b3c448dd..6ebdb9cdb22f 100644 --- a/examples/v2/cases/SearchCases.rb +++ b/examples/v2/case-management/SearchCases.rb @@ -1,5 +1,5 @@ # Search cases returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new p api_instance.search_cases() diff --git a/examples/v2/cases/SearchCases_3433960044.rb b/examples/v2/case-management/SearchCases_3433960044.rb similarity index 71% rename from examples/v2/cases/SearchCases_3433960044.rb rename to examples/v2/case-management/SearchCases_3433960044.rb index b24f7ed8a063..1dabb0aaccde 100644 --- a/examples/v2/cases/SearchCases_3433960044.rb +++ b/examples/v2/case-management/SearchCases_3433960044.rb @@ -1,5 +1,5 @@ # Search cases returns "OK" response with pagination require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new api_instance.search_cases_with_pagination() { |item| puts item } diff --git a/examples/v2/cases/UnarchiveCase.rb b/examples/v2/case-management/UnarchiveCase.rb similarity index 85% rename from examples/v2/cases/UnarchiveCase.rb rename to examples/v2/case-management/UnarchiveCase.rb index 6cc51e5f2703..1a6ab8241794 100644 --- a/examples/v2/cases/UnarchiveCase.rb +++ b/examples/v2/case-management/UnarchiveCase.rb @@ -1,7 +1,7 @@ # Unarchive case returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/examples/v2/cases/UnassignCase.rb b/examples/v2/case-management/UnassignCase.rb similarity index 85% rename from examples/v2/cases/UnassignCase.rb rename to examples/v2/case-management/UnassignCase.rb index ade628a2c79e..764252a062a4 100644 --- a/examples/v2/cases/UnassignCase.rb +++ b/examples/v2/case-management/UnassignCase.rb @@ -1,7 +1,7 @@ # Unassign case returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/examples/v2/cases/UpdatePriority.rb b/examples/v2/case-management/UpdatePriority.rb similarity index 89% rename from examples/v2/cases/UpdatePriority.rb rename to examples/v2/case-management/UpdatePriority.rb index 65577e20503e..92d05ca6cb06 100644 --- a/examples/v2/cases/UpdatePriority.rb +++ b/examples/v2/case-management/UpdatePriority.rb @@ -1,7 +1,7 @@ # Update case priority returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/examples/v2/cases/UpdateStatus.rb b/examples/v2/case-management/UpdateStatus.rb similarity index 89% rename from examples/v2/cases/UpdateStatus.rb rename to examples/v2/case-management/UpdateStatus.rb index 55ee11d1e837..55d1c2cf9749 100644 --- a/examples/v2/cases/UpdateStatus.rb +++ b/examples/v2/case-management/UpdateStatus.rb @@ -1,7 +1,7 @@ # Update case status returns "OK" response require "datadog_api_client" -api_instance = DatadogAPIClient::V2::CasesAPI.new +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new # there is a valid "case" in the system CASE_ID = ENV["CASE_ID"] diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 00fe8b603710..b2f1e87bef23 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -973,6 +973,15 @@ "v2.CreateCase" => { "body" => "CaseCreateRequest", }, + "v2.CreateProject" => { + "body" => "ProjectCreateRequest", + }, + "v2.DeleteProject" => { + "project_id" => "String", + }, + "v2.GetProject" => { + "project_id" => "String", + }, "v2.GetCase" => { "case_id" => "String", }, @@ -1000,15 +1009,6 @@ "case_id" => "String", "body" => "CaseEmptyRequest", }, - "v2.CreateProject" => { - "body" => "ProjectCreateRequest", - }, - "v2.DeleteProject" => { - "project_id" => "String", - }, - "v2.GetProject" => { - "project_id" => "String", - }, "v2.CreateCIAppPipelineEvent" => { "body" => "CIAppCreatePipelineEventRequest", }, diff --git a/features/v2/case_management.feature b/features/v2/case_management.feature new file mode 100644 index 000000000000..2d99e555384a --- /dev/null +++ b/features/v2/case_management.feature @@ -0,0 +1,315 @@ +@endpoint(case-management) @endpoint(case-management-v2) +Feature: Case Management + View and manage cases and project within Case Management + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CaseManagement" API + + @team:DataDog/case-management + Scenario: Archive case returns "Bad Request" response + Given new "ArchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Archive case returns "Not Found" response + Given new "ArchiveCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Archive case returns "OK" response + Given new "ArchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Assign case returns "Bad Request" response + Given new "AssignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"assignee_id": "invalid-uuid"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Assign case returns "Not Found" response + Given new "AssignCase" request + And there is a valid "user" in the system + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Assign case returns "OK" response + Given new "AssignCase" request + And there is a valid "case" in the system + And there is a valid "user" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Create a case returns "Bad Request" response + Given new "CreateCase" request + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "userx"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Create a case returns "CREATED" response + Given new "CreateCase" request + And there is a valid "user" in the system + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation in {{ unique_hash }}", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "{{user.data.id}}", "type": "user"} }, "project": {"data": {"id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data" has field "id" + And the response "data.attributes.title" is equal to "Security breach investigation in {{ unique_hash }}" + And the response "data.attributes.type" is equal to "STANDARD" + And the response "data.attributes.priority" is equal to "NOT_DEFINED" + + @generated @skip @team:DataDog/case-management + Scenario: Create a case returns "Not Found" response + Given new "CreateCase" request + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "Bad Request" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "CREATED" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "Not Found" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "Bad Request" response + Given new "GetProjects" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "Not Found" response + Given new "GetProjects" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "OK" response + Given new "GetProjects" request + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/case-management + Scenario: Get the details of a case returns "Bad Request" response + Given new "GetCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Get the details of a case returns "Not Found" response + Given new "GetCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Get the details of a case returns "OK" response + Given new "GetCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "Bad Request" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "Not Found" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "OK" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Remove a project returns "API error response" response + Given new "DeleteProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response + + @generated @skip @team:DataDog/case-management + Scenario: Remove a project returns "No Content" response + Given new "DeleteProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "Bad Request" response + Given new "SearchCases" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "Not Found" response + Given new "SearchCases" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "OK" response + Given new "SearchCases" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management @with-pagination + Scenario: Search cases returns "OK" response with pagination + Given new "SearchCases" request + When the request with pagination is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Unarchive case returns "Bad Request" response + Given new "UnarchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Unarchive case returns "Not Found" response + Given new "UnarchiveCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Unarchive case returns "OK" response + Given new "UnarchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Unassign case returns "Bad Request" response + Given new "UnassignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Unassign case returns "Not Found" response + Given new "UnassignCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Unassign case returns "OK" response + Given new "UnassignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Update case priority returns "Bad Request" response + Given new "UpdatePriority" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"priority": "P1234"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case priority returns "Not Found" response + Given new "UpdatePriority" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case priority returns "OK" response + Given new "UpdatePriority" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.priority" is equal to "P3" + + @team:DataDog/case-management + Scenario: Update case status returns "Bad Request" response + Given new "UpdateStatus" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"status": "OPENED"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case status returns "Not Found" response + Given new "UpdateStatus" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"status": "OPEN"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case status returns "OK" response + Given new "UpdateStatus" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"status": "IN_PROGRESS"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.status" is equal to "IN_PROGRESS" diff --git a/features/v2/given.json b/features/v2/given.json index cbaee96cb71b..8c2a75b9b1b5 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -69,7 +69,7 @@ "source": "data", "step": "there is a valid \"case\" in the system", "key": "case", - "tag": "Cases", + "tag": "Case Management", "operationId": "CreateCase" }, { diff --git a/features/v2/undo.json b/features/v2/undo.json index 1268756c9d25..f58d4d353469 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -221,25 +221,25 @@ } }, "SearchCases": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "safe" } }, "CreateCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "safe" } }, "GetProjects": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "type": "safe" } }, "CreateProject": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "operationId": "DeleteProject", "parameters": [ @@ -252,55 +252,55 @@ } }, "DeleteProject": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "GetProject": { - "tag": "Cases Projects", + "tag": "Case Management", "undo": { "type": "safe" } }, "GetCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "safe" } }, "ArchiveCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "AssignCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UpdatePriority": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UpdateStatus": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UnarchiveCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } }, "UnassignCase": { - "tag": "Cases", + "tag": "Case Management", "undo": { "type": "idempotent" } diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 7ef1112a4d59..ea3f3a7cbcc8 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2262,8 +2262,7 @@ def overrides "v2.apm_retention_filters_api" => "APMRetentionFiltersAPI", "v2.audit_api" => "AuditAPI", "v2.authn_mappings_api" => "AuthNMappingsAPI", - "v2.cases_api" => "CasesAPI", - "v2.cases_projects_api" => "CasesProjectsAPI", + "v2.case_management_api" => "CaseManagementAPI", "v2.ci_visibility_pipelines_api" => "CIVisibilityPipelinesAPI", "v2.ci_visibility_tests_api" => "CIVisibilityTestsAPI", "v2.cloud_cost_management_api" => "CloudCostManagementAPI", diff --git a/lib/datadog_api_client/v2/api/cases_api.rb b/lib/datadog_api_client/v2/api/case_management_api.rb similarity index 65% rename from lib/datadog_api_client/v2/api/cases_api.rb rename to lib/datadog_api_client/v2/api/case_management_api.rb index 4af2f678cc2c..26c97ca9812f 100644 --- a/lib/datadog_api_client/v2/api/cases_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_api.rb @@ -16,7 +16,7 @@ require 'cgi' module DatadogAPIClient::V2 - class CasesAPI + class CaseManagementAPI attr_accessor :api_client def initialize(api_client = DatadogAPIClient::APIClient.default) @@ -42,15 +42,15 @@ def archive_case(case_id, body, opts = {}) def archive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.archive_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.archive_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.archive_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -90,7 +90,7 @@ def archive_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -114,15 +114,15 @@ def assign_case(case_id, body, opts = {}) def assign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.assign_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.assign_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.assign_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -162,7 +162,7 @@ def assign_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -185,11 +185,11 @@ def create_case(body, opts = {}) def create_case_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.create_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.create_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case" end # resource path local_var_path = '/api/v2/cases' @@ -229,7 +229,139 @@ def create_case_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create a project. + # + # @see #create_project_with_http_info + def create_project(body, opts = {}) + data, _status_code, _headers = create_project_with_http_info(body, opts) + data + end + + # Create a project. + # + # Create a project. + # + # @param body [ProjectCreateRequest] Project payload + # @param opts [Hash] the optional parameters + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def create_project_with_http_info(body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project" + end + # resource path + local_var_path = '/api/v2/cases/projects' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ProjectResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove a project. + # + # @see #delete_project_with_http_info + def delete_project(project_id, opts = {}) + delete_project_with_http_info(project_id, opts) + nil + end + + # Remove a project. + # + # Remove a project using the project's `id`. + # + # @param project_id [String] Project UUID + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_project_with_http_info(project_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -252,11 +384,11 @@ def get_case(case_id, opts = {}) def get_case_with_http_info(case_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.get_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.get_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case" end # resource path local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -294,7 +426,132 @@ def get_case_with_http_info(case_id, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the details of a project. + # + # @see #get_project_with_http_info + def get_project(project_id, opts = {}) + data, _status_code, _headers = get_project_with_http_info(project_id, opts) + data + end + + # Get the details of a project. + # + # Get the details of a project by `project_id`. + # + # @param project_id [String] Project UUID + # @param opts [Hash] the optional parameters + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def get_project_with_http_info(project_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ProjectResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all projects. + # + # @see #get_projects_with_http_info + def get_projects(opts = {}) + data, _status_code, _headers = get_projects_with_http_info(opts) + data + end + + # Get all projects. + # + # Get all projects. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers + def get_projects_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...' + end + # resource path + local_var_path = '/api/v2/cases/projects' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ProjectsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_projects, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -321,7 +578,7 @@ def search_cases(opts = {}) def search_cases_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.search_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...' end allowable_values = ['created_at', 'priority', 'status'] if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field']) @@ -368,7 +625,7 @@ def search_cases_with_http_info(opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -413,15 +670,15 @@ def unarchive_case(case_id, body, opts = {}) def unarchive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.unarchive_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.unarchive_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.unarchive_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unarchive_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -461,7 +718,7 @@ def unarchive_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -485,15 +742,15 @@ def unassign_case(case_id, body, opts = {}) def unassign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.unassign_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.unassign_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.unassign_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unassign_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -533,7 +790,7 @@ def unassign_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -557,15 +814,15 @@ def update_priority(case_id, body, opts = {}) def update_priority_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.update_priority ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_priority ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.update_priority" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_priority" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.update_priority" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_priority" end # resource path local_var_path = '/api/v2/cases/{case_id}/priority'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -605,7 +862,7 @@ def update_priority_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#update_priority\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_priority\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -629,15 +886,15 @@ def update_status(case_id, body, opts = {}) def update_status_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesAPI.update_status ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_status ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CasesAPI.update_status" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_status" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesAPI.update_status" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_status" end # resource path local_var_path = '/api/v2/cases/{case_id}/status'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) @@ -677,7 +934,7 @@ def update_status_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesAPI#update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/datadog_api_client/v2/api/cases_projects_api.rb b/lib/datadog_api_client/v2/api/cases_projects_api.rb deleted file mode 100644 index 767f536a5736..000000000000 --- a/lib/datadog_api_client/v2/api/cases_projects_api.rb +++ /dev/null @@ -1,283 +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 'cgi' - -module DatadogAPIClient::V2 - class CasesProjectsAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create a project. - # - # @see #create_project_with_http_info - def create_project(body, opts = {}) - data, _status_code, _headers = create_project_with_http_info(body, opts) - data - end - - # Create a project. - # - # Create a project. - # - # @param body [ProjectCreateRequest] Project payload - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers - def create_project_with_http_info(body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesProjectsAPI.create_project ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CasesProjectsAPI.create_project" - end - # resource path - local_var_path = '/api/v2/cases/projects' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'ProjectResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesProjectsAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Remove a project. - # - # @see #delete_project_with_http_info - def delete_project(project_id, opts = {}) - delete_project_with_http_info(project_id, opts) - nil - end - - # Remove a project. - # - # Remove a project using the project's `id`. - # - # @param project_id [String] Project UUID - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_project_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesProjectsAPI.delete_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CasesProjectsAPI.delete_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesProjectsAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get the details of a project. - # - # @see #get_project_with_http_info - def get_project(project_id, opts = {}) - data, _status_code, _headers = get_project_with_http_info(project_id, opts) - data - end - - # Get the details of a project. - # - # Get the details of a project by `project_id`. - # - # @param project_id [String] Project UUID - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers - def get_project_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesProjectsAPI.get_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CasesProjectsAPI.get_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'ProjectResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesProjectsAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get all projects. - # - # @see #get_projects_with_http_info - def get_projects(opts = {}) - data, _status_code, _headers = get_projects_with_http_info(opts) - data - end - - # Get all projects. - # - # Get all projects. - # - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers - def get_projects_with_http_info(opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CasesProjectsAPI.get_projects ...' - end - # resource path - local_var_path = '/api/v2/cases/projects' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'ProjectsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_projects, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CasesProjectsAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end