diff --git a/.generated-info b/.generated-info index bb405bcda5..6bc2a4eb83 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "dcf594e", - "generated": "2025-07-31 09:55:56.724" + "spec_repo_commit": "b75095c", + "generated": "2025-07-31 10:46:07.850" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4ae32284e0..b125b71c69 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6891,7 +6891,7 @@ components: - data type: object CaseAttributes: - description: Case attributes + description: Case resource attributes properties: archived_at: description: Timestamp of when the case was archived @@ -6899,6 +6899,8 @@ components: nullable: true readOnly: true type: string + attributes: + $ref: '#/components/schemas/CaseObjectAttributes' closed_at: description: Timestamp of when the case was closed format: date-time @@ -7003,6 +7005,13 @@ components: required: - data type: object + CaseObjectAttributes: + additionalProperties: + items: + type: string + type: array + description: The definition of `CaseObjectAttributes` object. + type: object CasePriority: default: NOT_DEFINED description: Case priority @@ -7098,6 +7107,33 @@ components: type: string x-enum-varnames: - STANDARD + CaseUpdateAttributes: + description: Case update attributes + properties: + attributes: + $ref: '#/components/schemas/CaseUpdateAttributesAttributes' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - attributes + - type + type: object + CaseUpdateAttributesAttributes: + description: Case update attributes attributes + properties: + attributes: + $ref: '#/components/schemas/CaseObjectAttributes' + required: + - attributes + type: object + CaseUpdateAttributesRequest: + description: Case update attributes request + properties: + data: + $ref: '#/components/schemas/CaseUpdateAttributes' + required: + - data + type: object CaseUpdatePriority: description: Case priority status properties: @@ -45579,6 +45615,44 @@ paths: summary: Assign case tags: - Case Management + /api/v2/cases/{case_id}/attributes: + post: + description: Update case attributes + operationId: UpdateAttributes + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseUpdateAttributesRequest' + description: Case attributes update payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Update case attributes + tags: + - Case Management /api/v2/cases/{case_id}/priority: post: description: Update case priority diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 1354b7d7a6..11cf26604b 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -2118,6 +2118,13 @@ datadog\_api\_client.v2.model.case\_empty\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.case\_object\_attributes module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.case_object_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.case\_priority module --------------------------------------------------- @@ -2181,6 +2188,27 @@ datadog\_api\_client.v2.model.case\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.case\_update\_attributes module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.case_update_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.case\_update\_attributes\_attributes module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.case_update_attributes_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.case\_update\_attributes\_request module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.case_update_attributes_request + :members: + :show-inheritance: + datadog\_api\_client.v2.model.case\_update\_priority module ----------------------------------------------------------- diff --git a/examples/v2/case-management/UpdateAttributes.py b/examples/v2/case-management/UpdateAttributes.py new file mode 100644 index 0000000000..7fff3775ca --- /dev/null +++ b/examples/v2/case-management/UpdateAttributes.py @@ -0,0 +1,42 @@ +""" +Update case attributes returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.case_management_api import CaseManagementApi +from datadog_api_client.v2.model.case_object_attributes import CaseObjectAttributes +from datadog_api_client.v2.model.case_resource_type import CaseResourceType +from datadog_api_client.v2.model.case_update_attributes import CaseUpdateAttributes +from datadog_api_client.v2.model.case_update_attributes_attributes import CaseUpdateAttributesAttributes +from datadog_api_client.v2.model.case_update_attributes_request import CaseUpdateAttributesRequest + +# there is a valid "case" in the system +CASE_ID = environ["CASE_ID"] + +body = CaseUpdateAttributesRequest( + data=CaseUpdateAttributes( + attributes=CaseUpdateAttributesAttributes( + attributes=CaseObjectAttributes( + env=[ + "test", + ], + service=[ + "web-store", + "web-api", + ], + team=[ + "engineer", + ], + ), + ), + type=CaseResourceType.CASE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = CaseManagementApi(api_client) + response = api_instance.update_attributes(case_id=CASE_ID, body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/case_management_api.py b/src/datadog_api_client/v2/api/case_management_api.py index 99d7f5de03..58897a085d 100644 --- a/src/datadog_api_client/v2/api/case_management_api.py +++ b/src/datadog_api_client/v2/api/case_management_api.py @@ -24,6 +24,7 @@ from datadog_api_client.v2.model.project_create_request import ProjectCreateRequest from datadog_api_client.v2.model.case_empty_request import CaseEmptyRequest from datadog_api_client.v2.model.case_assign_request import CaseAssignRequest +from datadog_api_client.v2.model.case_update_attributes_request import CaseUpdateAttributesRequest from datadog_api_client.v2.model.case_update_priority_request import CaseUpdatePriorityRequest from datadog_api_client.v2.model.case_update_status_request import CaseUpdateStatusRequest @@ -309,6 +310,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_attributes_endpoint = _Endpoint( + settings={ + "response_type": (CaseResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/cases/{case_id}/attributes", + "operation_id": "update_attributes", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "case_id": { + "required": True, + "openapi_types": (str,), + "attribute": "case_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (CaseUpdateAttributesRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._update_priority_endpoint = _Endpoint( settings={ "response_type": (CaseResponse,), @@ -644,6 +671,28 @@ def unassign_case( return self._unassign_case_endpoint.call_with_http_info(**kwargs) + def update_attributes( + self, + case_id: str, + body: CaseUpdateAttributesRequest, + ) -> CaseResponse: + """Update case attributes. + + Update case attributes + + :param case_id: Case's UUID or key + :type case_id: str + :param body: Case attributes update payload + :type body: CaseUpdateAttributesRequest + :rtype: CaseResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["case_id"] = case_id + + kwargs["body"] = body + + return self._update_attributes_endpoint.call_with_http_info(**kwargs) + def update_priority( self, case_id: str, diff --git a/src/datadog_api_client/v2/model/case.py b/src/datadog_api_client/v2/model/case.py index d30f5e05c1..209c5601a0 100644 --- a/src/datadog_api_client/v2/model/case.py +++ b/src/datadog_api_client/v2/model/case.py @@ -51,7 +51,7 @@ def __init__( """ A case - :param attributes: Case attributes + :param attributes: Case resource attributes :type attributes: CaseAttributes :param id: Case's identifier diff --git a/src/datadog_api_client/v2/model/case_attributes.py b/src/datadog_api_client/v2/model/case_attributes.py index 1b44497900..25535569eb 100644 --- a/src/datadog_api_client/v2/model/case_attributes.py +++ b/src/datadog_api_client/v2/model/case_attributes.py @@ -16,6 +16,7 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.case_object_attributes import CaseObjectAttributes from datadog_api_client.v2.model.jira_issue import JiraIssue from datadog_api_client.v2.model.case_priority import CasePriority from datadog_api_client.v2.model.service_now_ticket import ServiceNowTicket @@ -26,6 +27,7 @@ class CaseAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.case_object_attributes import CaseObjectAttributes from datadog_api_client.v2.model.jira_issue import JiraIssue from datadog_api_client.v2.model.case_priority import CasePriority from datadog_api_client.v2.model.service_now_ticket import ServiceNowTicket @@ -34,6 +36,7 @@ def openapi_types(_): return { "archived_at": (datetime, none_type), + "attributes": (CaseObjectAttributes,), "closed_at": (datetime, none_type), "created_at": (datetime,), "description": (str,), @@ -49,6 +52,7 @@ def openapi_types(_): attribute_map = { "archived_at": "archived_at", + "attributes": "attributes", "closed_at": "closed_at", "created_at": "created_at", "description": "description", @@ -73,6 +77,7 @@ def openapi_types(_): def __init__( self_, archived_at: Union[datetime, none_type, UnsetType] = unset, + attributes: Union[CaseObjectAttributes, UnsetType] = unset, closed_at: Union[datetime, none_type, UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, description: Union[str, UnsetType] = unset, @@ -87,11 +92,14 @@ def __init__( **kwargs, ): """ - Case attributes + Case resource attributes :param archived_at: Timestamp of when the case was archived :type archived_at: datetime, none_type, optional + :param attributes: The definition of ``CaseObjectAttributes`` object. + :type attributes: CaseObjectAttributes, optional + :param closed_at: Timestamp of when the case was closed :type closed_at: datetime, none_type, optional @@ -127,6 +135,8 @@ def __init__( """ if archived_at is not unset: kwargs["archived_at"] = archived_at + if attributes is not unset: + kwargs["attributes"] = attributes if closed_at is not unset: kwargs["closed_at"] = closed_at if created_at is not unset: diff --git a/src/datadog_api_client/v2/model/case_object_attributes.py b/src/datadog_api_client/v2/model/case_object_attributes.py new file mode 100644 index 0000000000..bb5b63767a --- /dev/null +++ b/src/datadog_api_client/v2/model/case_object_attributes.py @@ -0,0 +1,22 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class CaseObjectAttributes(ModelNormal): + @cached_property + def additional_properties_type(_): + return ([str],) + + def __init__(self_, **kwargs): + """ + The definition of ``CaseObjectAttributes`` object. + """ + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/case_update_attributes.py b/src/datadog_api_client/v2/model/case_update_attributes.py new file mode 100644 index 0000000000..c5b7a6b931 --- /dev/null +++ b/src/datadog_api_client/v2/model/case_update_attributes.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.case_update_attributes_attributes import CaseUpdateAttributesAttributes + from datadog_api_client.v2.model.case_resource_type import CaseResourceType + + +class CaseUpdateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.case_update_attributes_attributes import CaseUpdateAttributesAttributes + from datadog_api_client.v2.model.case_resource_type import CaseResourceType + + return { + "attributes": (CaseUpdateAttributesAttributes,), + "type": (CaseResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: CaseUpdateAttributesAttributes, type: CaseResourceType, **kwargs): + """ + Case update attributes + + :param attributes: Case update attributes attributes + :type attributes: CaseUpdateAttributesAttributes + + :param type: Case resource type + :type type: CaseResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/case_update_attributes_attributes.py b/src/datadog_api_client/v2/model/case_update_attributes_attributes.py new file mode 100644 index 0000000000..9afdbe788a --- /dev/null +++ b/src/datadog_api_client/v2/model/case_update_attributes_attributes.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.case_object_attributes import CaseObjectAttributes + + +class CaseUpdateAttributesAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.case_object_attributes import CaseObjectAttributes + + return { + "attributes": (CaseObjectAttributes,), + } + + attribute_map = { + "attributes": "attributes", + } + + def __init__(self_, attributes: CaseObjectAttributes, **kwargs): + """ + Case update attributes attributes + + :param attributes: The definition of ``CaseObjectAttributes`` object. + :type attributes: CaseObjectAttributes + """ + super().__init__(kwargs) + + self_.attributes = attributes diff --git a/src/datadog_api_client/v2/model/case_update_attributes_request.py b/src/datadog_api_client/v2/model/case_update_attributes_request.py new file mode 100644 index 0000000000..424d3aae1e --- /dev/null +++ b/src/datadog_api_client/v2/model/case_update_attributes_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.case_update_attributes import CaseUpdateAttributes + + +class CaseUpdateAttributesRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.case_update_attributes import CaseUpdateAttributes + + return { + "data": (CaseUpdateAttributes,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: CaseUpdateAttributes, **kwargs): + """ + Case update attributes request + + :param data: Case update attributes + :type data: CaseUpdateAttributes + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index ee45d35b41..1783706602 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -477,6 +477,7 @@ from datadog_api_client.v2.model.case_create_request import CaseCreateRequest from datadog_api_client.v2.model.case_empty import CaseEmpty from datadog_api_client.v2.model.case_empty_request import CaseEmptyRequest +from datadog_api_client.v2.model.case_object_attributes import CaseObjectAttributes from datadog_api_client.v2.model.case_priority import CasePriority from datadog_api_client.v2.model.case_relationships import CaseRelationships from datadog_api_client.v2.model.case_resource_type import CaseResourceType @@ -486,6 +487,9 @@ from datadog_api_client.v2.model.case_trigger import CaseTrigger from datadog_api_client.v2.model.case_trigger_wrapper import CaseTriggerWrapper from datadog_api_client.v2.model.case_type import CaseType +from datadog_api_client.v2.model.case_update_attributes import CaseUpdateAttributes +from datadog_api_client.v2.model.case_update_attributes_attributes import CaseUpdateAttributesAttributes +from datadog_api_client.v2.model.case_update_attributes_request import CaseUpdateAttributesRequest from datadog_api_client.v2.model.case_update_priority import CaseUpdatePriority from datadog_api_client.v2.model.case_update_priority_attributes import CaseUpdatePriorityAttributes from datadog_api_client.v2.model.case_update_priority_request import CaseUpdatePriorityRequest @@ -4003,6 +4007,7 @@ "CaseCreateRequest", "CaseEmpty", "CaseEmptyRequest", + "CaseObjectAttributes", "CasePriority", "CaseRelationships", "CaseResourceType", @@ -4012,6 +4017,9 @@ "CaseTrigger", "CaseTriggerWrapper", "CaseType", + "CaseUpdateAttributes", + "CaseUpdateAttributesAttributes", + "CaseUpdateAttributesRequest", "CaseUpdatePriority", "CaseUpdatePriorityAttributes", "CaseUpdatePriorityRequest", diff --git a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.frozen index 02ebd0b910..081a252dab 100644 --- a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.159Z \ No newline at end of file +2025-07-21T13:52:40.919Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.yaml index f8a1594d22..1243424bfb 100644 --- a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_bad_request_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"6706fe66-cabd-4b22-b4c5-dd478bba421a","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:41.25066Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"6706fe66-cabd-4b22-b4c5-dd478bba421a","key":"DDFC-72317","merge_status":"NOT_MERGED","priority":"P4","public_id":"72377","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,7 +26,7 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/4e49aede-4c04-42d3-b5bc-f8eb4c1340df/archive + uri: https://api.datadoghq.com/api/v2/cases/6706fe66-cabd-4b22-b4c5-dd478bba421a/archive response: body: string: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type diff --git a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_not_found_response.frozen index 16674248e3..59cf7189df 100644 --- a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.378Z \ No newline at end of file +2025-07-21T13:52:41.730Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.frozen index f8ce6d98bb..57508d4854 100644 --- a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.466Z \ No newline at end of file +2025-07-21T13:52:42.155Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.yaml index 35d609ba71..0b48beee56 100644 --- a/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_archive_case_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"b074b409-24f8-42ae-b545-b1486429630d","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:42.51392Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b074b409-24f8-42ae-b545-b1486429630d","key":"DDFC-72318","merge_status":"NOT_MERGED","priority":"P4","public_id":"72378","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,11 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/3752309b-6a77-4015-845a-02ff88647b4b/archive + uri: https://api.datadoghq.com/api/v2/cases/b074b409-24f8-42ae-b545-b1486429630d/archive response: body: - 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":""}}]}' + string: '{"data":{"id":"b074b409-24f8-42ae-b545-b1486429630d","type":"case","attributes":{"archived_at":"2025-07-21T13:52:42.933945716Z","attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:42.51392Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b074b409-24f8-42ae-b545-b1486429630d","key":"DDFC-72318","merge_status":"NOT_MERGED","modified_at":"2025-07-21T13:52:42.933946Z","priority":"P4","public_id":"72378","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.frozen index 2749371a9b..7decaaaea4 100644 --- a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.651Z \ No newline at end of file +2025-07-21T13:52:43.015Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.yaml index c644999fda..7772706753 100644 --- a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_bad_request_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"510b0121-1477-43c0-8986-78f011016d48","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:43.335245Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"510b0121-1477-43c0-8986-78f011016d48","key":"DDFC-72319","merge_status":"NOT_MERGED","priority":"P4","public_id":"72379","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,10 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/cf2e3b59-d504-4714-9853-38e4ceddb858/assign + uri: https://api.datadoghq.com/api/v2/cases/510b0121-1477-43c0-8986-78f011016d48/assign response: body: - string: '{"errors":[{"code":"invalid_command","title":"error when validating - input command: ''assigneeid'' field must be an uuid","meta":{"entity":"assigneeid","rule":"uuid"}}]}' + string: '{"errors":[{"status":"400","title":"Bad Request"}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.frozen index dac002f7f3..067940f74d 100644 --- a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.832Z \ No newline at end of file +2025-07-21T13:52:43.820Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.yaml index 34d4df8634..cb0bf4b840 100644 --- a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_not_found_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Assign_case_returns_Not_Found_response-1707936915@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Assign_case_returns_Not_Found_response-1753105963@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - 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 + string: '{"data":{"type":"users","id":"fa033cd0-6639-11f0-b658-96290b93dbfc","attributes":{"name":null,"handle":"test-assign_case_returns_not_found_response-1753105963@datadoghq.com","created_at":"2025-07-21T13:52:44.217086+00:00","modified_at":"2025-07-21T13:52:44.217086+00:00","email":"test-assign_case_returns_not_found_response-1753105963@datadoghq.com","icon":"https://secure.gravatar.com/avatar/de9eda912656e39d585005ddc0880775?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"}}}}} ' @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"assignee_id":"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd"},"type":"case"}}' + body: '{"data":{"attributes":{"assignee_id":"fa033cd0-6639-11f0-b658-96290b93dbfc"},"type":"case"}}' headers: accept: - application/json @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd + uri: https://api.datadoghq.com/api/v2/users/fa033cd0-6639-11f0-b658-96290b93dbfc response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.frozen index 63999fedab..4e634aa5c5 100644 --- a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:16.362Z \ No newline at end of file +2025-07-21T13:52:45.309Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.yaml index 8a555082f6..15dc415d47 100644 --- a/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_assign_case_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:45.654592Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d","key":"DDFC-72320","merge_status":"NOT_MERGED","priority":"P4","public_id":"72380","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -19,7 +19,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"email":"Test-Assign_case_returns_OK_response-1707936916@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Assign_case_returns_OK_response-1753105965@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -30,7 +30,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - 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 + string: '{"data":{"type":"users","id":"fb218c6d-6639-11f0-a2d3-1a819e56f795","attributes":{"name":null,"handle":"test-assign_case_returns_ok_response-1753105965@datadoghq.com","created_at":"2025-07-21T13:52:46.093451+00:00","modified_at":"2025-07-21T13:52:46.093451+00:00","email":"test-assign_case_returns_ok_response-1753105965@datadoghq.com","icon":"https://secure.gravatar.com/avatar/a6015cb53f5ee1693a8a69c8f6904fae?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"}}}}} ' @@ -41,18 +41,18 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"assignee_id":"97a38d32-cb6a-11ee-9645-0a530ef9b7d3"},"type":"case"}}' + body: '{"data":{"attributes":{"assignee_id":"fb218c6d-6639-11f0-a2d3-1a819e56f795"},"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 + uri: https://api.datadoghq.com/api/v2/cases/fd1228dc-d475-4a0b-8677-7a9ce3b50b3d/assign response: body: - 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":""}}]}' + string: '{"data":{"id":"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:45.654592Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d","key":"DDFC-72320","merge_status":"NOT_MERGED","modified_at":"2025-07-21T13:52:46.52116Z","priority":"P4","public_id":"72380","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"assignee":{"data":{"id":"fb218c6d-6639-11f0-a2d3-1a819e56f795","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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}},{"id":"fb218c6d-6639-11f0-a2d3-1a819e56f795","type":"user","attributes":{"active":false,"email":"test-assign_case_returns_ok_response-1753105965@datadoghq.com","handle":"test-assign_case_returns_ok_response-1753105965@datadoghq.com","name":""}}]}' headers: content-type: - application/vnd.api+json @@ -65,7 +65,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/97a38d32-cb6a-11ee-9645-0a530ef9b7d3 + uri: https://api.datadoghq.com/api/v2/users/fb218c6d-6639-11f0-a2d3-1a819e56f795 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_bad_request_response.frozen index 3d43091372..4494f306b1 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:16.995Z \ No newline at end of file +2025-07-21T13:52:47.155Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.frozen index d0a1a57a42..c1e8fb0c3b 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.074Z \ No newline at end of file +2025-07-21T13:52:47.527Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.yaml index e39d92f96d..ee77c5abd5 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_a_case_returns_created_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Create_a_case_returns_CREATED_response-1707936917@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Create_a_case_returns_CREATED_response-1753105967@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - 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 + string: '{"data":{"type":"users","id":"fc35a29f-6639-11f0-8bee-a24ce66fd256","attributes":{"name":null,"handle":"test-create_a_case_returns_created_response-1753105967@datadoghq.com","created_at":"2025-07-21T13:52:47.902815+00:00","modified_at":"2025-07-21T13:52:47.902815+00:00","email":"test-create_a_case_returns_created_response-1753105967@datadoghq.com","icon":"https://secure.gravatar.com/avatar/600ad64c52b4a9b6a9f2a46d8fa9ec0a?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"}}}}} ' @@ -23,7 +23,7 @@ interactions: message: Created - request: body: '{"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"}}' + investigation in 20df485fb3942e6f","type":"STANDARD"},"relationships":{"assignee":{"data":{"id":"fc35a29f-6639-11f0-8bee-a24ce66fd256","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}},"type":"case"}}' headers: accept: - application/json @@ -33,8 +33,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"2275ce7b-781b-4539-b0f3-2cc1b2140565","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:48.320633Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"2275ce7b-781b-4539-b0f3-2cc1b2140565","key":"DDFC-72321","merge_status":"NOT_MERGED","priority":"NOT_DEFINED","public_id":"72381","status":"OPEN","title":"Security + breach investigation in 20df485fb3942e6f","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"assignee":{"data":{"id":"fc35a29f-6639-11f0-8bee-a24ce66fd256","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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}},{"id":"fc35a29f-6639-11f0-8bee-a24ce66fd256","type":"user","attributes":{"active":false,"email":"test-create_a_case_returns_created_response-1753105967@datadoghq.com","handle":"test-create_a_case_returns_created_response-1753105967@datadoghq.com","name":""}}]}' headers: content-type: - application/vnd.api+json @@ -47,7 +47,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/97fb5e7f-cb6a-11ee-8de6-d2393b962484 + uri: https://api.datadoghq.com/api/v2/users/fc35a29f-6639-11f0-8bee-a24ce66fd256 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_not_found_response.frozen index 1f1e9770dc..65a7dda987 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.678Z \ No newline at end of file +2025-07-21T13:52:48.953Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.frozen index ce3e1d89d5..683f8abed3 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.758Z \ No newline at end of file +2025-07-21T13:52:49.345Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.yaml index 25b4b66eee..856b536db5 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_the_details_of_a_case_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"5e66536f-3946-41fd-9e0f-183e719d7128","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:49.694835Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"5e66536f-3946-41fd-9e0f-183e719d7128","key":"DDFC-72322","merge_status":"NOT_MERGED","priority":"P4","public_id":"72382","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -24,11 +24,11 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/cases/d981cc6f-654e-4528-8451-d3d99259d4d6 + uri: https://api.datadoghq.com/api/v2/cases/5e66536f-3946-41fd-9e0f-183e719d7128 response: body: - 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":""}}]}' + string: '{"data":{"id":"5e66536f-3946-41fd-9e0f-183e719d7128","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:49.694835Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"5e66536f-3946-41fd-9e0f-183e719d7128","key":"DDFC-72322","merge_status":"NOT_MERGED","priority":"P4","public_id":"72382","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.frozen index 5b768a1c88..22ddf6aec4 100644 --- a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.936Z \ No newline at end of file +2025-07-21T13:52:50.131Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.yaml index 16b37f221a..03b56cd6c9 100644 --- a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_bad_request_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"5fd92551-50b8-46e9-899d-5846cf3eab9e","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:50.459513Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"5fd92551-50b8-46e9-899d-5846cf3eab9e","key":"DDFC-72323","merge_status":"NOT_MERGED","priority":"P4","public_id":"72383","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,7 +26,7 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/7c588891-1486-4cf6-992f-f0c3a97f0245/unarchive + uri: https://api.datadoghq.com/api/v2/cases/5fd92551-50b8-46e9-899d-5846cf3eab9e/unarchive response: body: string: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type diff --git a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_not_found_response.frozen index 034f1d4aa8..091e5f1693 100644 --- a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.130Z \ No newline at end of file +2025-07-21T13:52:50.895Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.frozen index df7e85e9f4..c118a3ee00 100644 --- a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.220Z \ No newline at end of file +2025-07-21T13:52:51.279Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.yaml index e7e249f859..9cdc21eea2 100644 --- a/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_unarchive_case_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"b6a0f192-9be6-4898-b05b-f4cc308de679","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:51.610535Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b6a0f192-9be6-4898-b05b-f4cc308de679","key":"DDFC-72324","merge_status":"NOT_MERGED","priority":"P4","public_id":"72384","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,11 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/56b03839-5199-4207-94e6-648f5c363d1d/unarchive + uri: https://api.datadoghq.com/api/v2/cases/b6a0f192-9be6-4898-b05b-f4cc308de679/unarchive response: body: - 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":""}}]}' + string: '{"data":{"id":"b6a0f192-9be6-4898-b05b-f4cc308de679","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:51.610535Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b6a0f192-9be6-4898-b05b-f4cc308de679","key":"DDFC-72324","merge_status":"NOT_MERGED","priority":"P4","public_id":"72384","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.frozen index 5c53ccfe49..7b3f4dbd14 100644 --- a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.364Z \ No newline at end of file +2025-07-21T13:52:52.067Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.yaml index 9a46a0fa02..033f3b3802 100644 --- a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_bad_request_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"6e4af4e8-67fd-461a-9664-adf910673121","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:52.413703Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"6e4af4e8-67fd-461a-9664-adf910673121","key":"DDFC-72325","merge_status":"NOT_MERGED","priority":"P4","public_id":"72385","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,7 +26,7 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/4c89618c-11cc-40ba-bc6c-000e862910b1/unassign + uri: https://api.datadoghq.com/api/v2/cases/6e4af4e8-67fd-461a-9664-adf910673121/unassign response: body: string: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type diff --git a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_not_found_response.frozen index 6a08f9742d..d41e392f87 100644 --- a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.522Z \ No newline at end of file +2025-07-21T13:52:52.854Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.frozen index e57766f0df..f5e55d1024 100644 --- a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.613Z \ No newline at end of file +2025-07-21T13:52:53.249Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.yaml index 6a65365762..ce658db5f9 100644 --- a/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_unassign_case_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"b222e3e7-19fe-434f-ab26-7e0845775ccd","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:53.581415Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b222e3e7-19fe-434f-ab26-7e0845775ccd","key":"DDFC-72326","merge_status":"NOT_MERGED","priority":"P4","public_id":"72386","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,11 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/fa3c26fc-fada-4308-8888-4067d97acf06/unassign + uri: https://api.datadoghq.com/api/v2/cases/b222e3e7-19fe-434f-ab26-7e0845775ccd/unassign response: body: - 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":""}}]}' + string: '{"data":{"id":"b222e3e7-19fe-434f-ab26-7e0845775ccd","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:53.581415Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b222e3e7-19fe-434f-ab26-7e0845775ccd","key":"DDFC-72326","merge_status":"NOT_MERGED","priority":"P4","public_id":"72386","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_bad_request_response.frozen new file mode 100644 index 0000000000..323ed8c606 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2025-07-21T08:23:41.749Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_bad_request_response.yaml new file mode 100644 index 0000000000..f6f4523d52 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_bad_request_response.yaml @@ -0,0 +1,41 @@ +interactions: +- request: + body: '{"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: + string: '{"data":{"id":"0fac8699-2b39-4acb-b290-05a0fd19eb95","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T08:23:42.090561Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"0fac8699-2b39-4acb-b290-05a0fd19eb95","key":"DDFC-72247","merge_status":"NOT_MERGED","priority":"P4","public_id":"72307","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"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 +- request: + body: '{"data":{"attributes":{"attributes":{"service":"web-store"}},"type":"case"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/0fac8699-2b39-4acb-b290-05a0fd19eb95/attributes + response: + body: + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"error decoding + attribute \"attributes\": invalid type string"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_not_found_response.frozen new file mode 100644 index 0000000000..9cc9365f13 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_not_found_response.frozen @@ -0,0 +1 @@ +2025-07-21T08:23:42.266Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_not_found_response.yaml new file mode 100644 index 0000000000..43a0e1fa13 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_not_found_response.yaml @@ -0,0 +1,20 @@ +interactions: +- request: + body: '{"data":{"attributes":{"attributes":{}},"type":"case"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/attributes + response: + body: + string: '{"errors":[{"code":"resource_not_found","title":"case not found"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_ok_response.frozen new file mode 100644 index 0000000000..d438f1b5b2 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_ok_response.frozen @@ -0,0 +1 @@ +2025-07-21T18:43:31.851Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_ok_response.yaml new file mode 100644 index 0000000000..fe1f0b530b --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_case_attributes_returns_ok_response.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: '{"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: + string: '{"data":{"id":"f396c907-777d-4985-9e9d-2a420a0c0515","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T18:42:41.549781Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"f396c907-777d-4985-9e9d-2a420a0c0515","key":"DDFC-72342","merge_status":"NOT_MERGED","priority":"P4","public_id":"72402","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 201 + message: Created +- request: + body: '{"data":{"attributes":{"attributes":{"env":["test"],"service":["web-store","web-api"],"team":["engineer"]}},"type":"case"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/cases/f396c907-777d-4985-9e9d-2a420a0c0515/attributes + response: + body: + string: '{"data":{"id":"f396c907-777d-4985-9e9d-2a420a0c0515","type":"case","attributes":{"attributes":{"env":["test"],"service":["web-store","web-api"],"team":["engineer"]},"comment_count":0,"created_at":"2025-07-21T18:42:41.549781Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"f396c907-777d-4985-9e9d-2a420a0c0515","key":"DDFC-72342","merge_status":"NOT_MERGED","modified_at":"2025-07-21T18:42:41.694883Z","priority":"P4","public_id":"72402","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.frozen index b44760c049..34a73d972c 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.767Z \ No newline at end of file +2025-07-21T13:52:56.000Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.yaml index dcc58fb6ce..d1a0d006e8 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_bad_request_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"57868e9a-2697-4384-b724-8e118b20a7f3","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:56.317328Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"57868e9a-2697-4384-b724-8e118b20a7f3","key":"DDFC-72329","merge_status":"NOT_MERGED","priority":"P4","public_id":"72389","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,11 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/683c81be-fa27-42c8-957c-897923a2f660/priority + uri: https://api.datadoghq.com/api/v2/cases/57868e9a-2697-4384-b724-8e118b20a7f3/priority response: body: string: '{"errors":[{"title":"Generic Error","detail":"invalid priority P1234. - Must be one of P1, P2, P3, P4, P5, NOT_DEFINED"}]}' + Must be one of P2, P3, P4, P5, NOT_DEFINED, P1"}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_not_found_response.frozen index e6fee30e9d..f6b3d2f698 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.927Z \ No newline at end of file +2025-07-21T13:52:56.765Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.frozen index 42fe59de7b..9b134590a2 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.004Z \ No newline at end of file +2025-07-21T13:52:57.162Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.yaml index 3ab73011c9..0dc2947a16 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_case_priority_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"18014b24-6e64-4ca5-8cac-7ccbdd65258b","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:57.488697Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"18014b24-6e64-4ca5-8cac-7ccbdd65258b","key":"DDFC-72330","merge_status":"NOT_MERGED","priority":"P4","public_id":"72390","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,11 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/c55de906-a08b-4916-ade3-5f1b268379c3/priority + uri: https://api.datadoghq.com/api/v2/cases/18014b24-6e64-4ca5-8cac-7ccbdd65258b/priority response: body: - 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":""}}]}' + string: '{"data":{"id":"18014b24-6e64-4ca5-8cac-7ccbdd65258b","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:57.488697Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"18014b24-6e64-4ca5-8cac-7ccbdd65258b","key":"DDFC-72330","merge_status":"NOT_MERGED","modified_at":"2025-07-21T13:52:57.885095Z","priority":"P3","public_id":"72390","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.frozen index 1c1c338c0f..f149d8dad2 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.178Z \ No newline at end of file +2025-07-21T13:52:57.959Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.yaml index f5321df510..b9adfc6c0a 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_bad_request_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"98319575-b53b-43be-96b2-7595a5f1be6c","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:58.293018Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"98319575-b53b-43be-96b2-7595a5f1be6c","key":"DDFC-72331","merge_status":"NOT_MERGED","priority":"P4","public_id":"72391","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,13 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0/status + uri: https://api.datadoghq.com/api/v2/cases/98319575-b53b-43be-96b2-7595a5f1be6c/status response: body: string: '{"errors":[{"title":"Generic Error","detail":"invalid status OPENED. - Must be one of SUNKNOWN, OPEN, IN_PROGRESS, CLOSED"}]}' + Must be one of PENDING_APPROVAL, APPROVED, IMPLEMENTING, CANCELLED, SUNKNOWN, + ACKNOWLEDGED, TRIGGERED, RESOLVED, COMPLETED, DECLINED, OPEN, IN_PROGRESS, + CLOSED"}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_not_found_response.frozen index 3725bea8b6..ca65b4f9cf 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_not_found_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.338Z \ No newline at end of file +2025-07-21T13:52:58.721Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.frozen index a7c1161cdc..086a7bba2e 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.415Z \ No newline at end of file +2025-07-21T13:52:59.116Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.yaml index 30c7609445..808952d724 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_case_status_returns_ok_response.yaml @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/cases response: body: - 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":""}}]}' + string: '{"data":{"id":"6d09fb31-6357-4f35-b1af-eaa0047f19f0","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:59.449985Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"6d09fb31-6357-4f35-b1af-eaa0047f19f0","key":"DDFC-72332","merge_status":"NOT_MERGED","priority":"P4","public_id":"72392","status":"OPEN","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json @@ -26,11 +26,11 @@ interactions: content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/cases/d1633979-1770-4e5b-a2d0-2ede9f2a8f43/status + uri: https://api.datadoghq.com/api/v2/cases/6d09fb31-6357-4f35-b1af-eaa0047f19f0/status response: body: - 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":""}}]}' + string: '{"data":{"id":"6d09fb31-6357-4f35-b1af-eaa0047f19f0","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-07-21T13:52:59.449985Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"6d09fb31-6357-4f35-b1af-eaa0047f19f0","key":"DDFC-72332","merge_status":"NOT_MERGED","modified_at":"2025-07-21T13:52:59.835103Z","priority":"P4","public_id":"72392","status":"IN_PROGRESS","title":"My + new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"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":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/features/case_management.feature b/tests/v2/features/case_management.feature index e95b1dc1c4..58c95f7166 100644 --- a/tests/v2/features/case_management.feature +++ b/tests/v2/features/case_management.feature @@ -263,6 +263,32 @@ Feature: Case Management When the request is sent Then the response status is 200 OK + @skip @team:DataDog/case-management + Scenario: Update case attributes returns "Bad Request" response + Given new "UpdateAttributes" 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", "attributes": { "attributes": { "service": "web-store"}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case attributes returns "Not Found" response + Given new "UpdateAttributes" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value { "data": { "type": "case", "attributes": { "attributes": {} } } } + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case attributes returns "OK" response + Given new "UpdateAttributes" 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": {"attributes": {"env": ["test"], "service": ["web-store", "web-api"], "team": ["engineer"]}}, "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 diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index a1fe13fed9..53bef5692a 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -446,6 +446,12 @@ "type": "idempotent" } }, + "UpdateAttributes": { + "tag": "Case Management", + "undo": { + "type": "idempotent" + } + }, "UpdatePriority": { "tag": "Case Management", "undo": {