diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e31333a3d..610a8f444a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1538,7 +1538,7 @@ components: example: "-created_at" type: string ProductName: - description: Name of the product to be deleted, either `logs` or `rum`. + description: Name of the product to be deleted. Only `logs` is supported. in: path name: product required: true @@ -24351,6 +24351,12 @@ components: CreateDataDeletionRequestBodyAttributes: description: Attributes for creating a data deletion request. properties: + displayed_total: + description: Total number of elements to be deleted as displayed to the user. + example: 100 + format: int64 + minimum: 1 + type: integer from: description: Start of requested time window, milliseconds since Unix epoch. example: 1672527600000 @@ -24378,6 +24384,7 @@ components: - query - from - to + - displayed_total type: object CreateDataDeletionRequestBodyData: description: Data needed to create a data deletion request. @@ -30968,6 +30975,19 @@ components: description: User who created the deletion request. example: "test.user@datadoghq.com" type: string + customer_message: + description: A message for the customer regarding the deletion request, if any. + example: "Your deletion request is being processed." + type: string + displayed_total: + description: Total number of elements to be deleted as displayed to the user. + example: 100 + format: int64 + type: integer + error_category: + description: The category of the error for the deletion request, if any. + example: "validation_error" + type: string from_time: description: Start of requested time window, milliseconds since Unix epoch. example: 1672527600000 @@ -31031,6 +31051,7 @@ components: - status - to_time - total_unrestricted + - displayed_total - updated_at type: object DataDeletionResponseMeta: @@ -31041,7 +31062,7 @@ components: format: int64 type: integer description: The total deletion requests created by product. - example: {"logs": 8, "rum": 7} + example: {"logs": 8} type: object count_status: additionalProperties: @@ -143031,6 +143052,21 @@ paths: requestBody: content: application/json: + examples: + default: + value: + data: + attributes: + displayed_total: 100 + from: 1672527600000 + indexes: + - test-index + - test-index-2 + query: + host: abc + service: xyz + to: 1704063600000 + type: create_deletion_req schema: $ref: "#/components/schemas/CreateDataDeletionRequestBody" required: true @@ -143045,6 +143081,7 @@ paths: attributes: created_at: "2024-01-01T00:00:00.000000Z" created_by: test@example.com + displayed_total: 100 from_time: 1672527600000 is_created: true org_id: 123 @@ -143090,11 +143127,7 @@ paths: x-permission: operator: OR permissions: - - rum_delete_data - logs_delete_data - x-unstable: |- - **Note**: This endpoint is in Preview. If you have any feedback, - contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/deletion/requests: get: description: Gets a list of data deletion requests based on several filter parameters. @@ -143151,6 +143184,7 @@ paths: - attributes: created_at: "2024-01-01T00:00:00.000000Z" created_by: test@example.com + displayed_total: 100 from_time: 1672527600000 is_created: true org_id: 123 @@ -143190,11 +143224,7 @@ paths: x-permission: operator: OR permissions: - - rum_delete_data - logs_delete_data - x-unstable: |- - **Note**: This endpoint is in Preview. If you have any feedback, - contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/deletion/requests/{id}/cancel: put: description: Cancels a data deletion request by providing its ID. @@ -143212,6 +143242,7 @@ paths: attributes: created_at: "2024-01-01T00:00:00.000000Z" created_by: test@example.com + displayed_total: 100 from_time: 1672527600000 is_created: true org_id: 123 @@ -143257,11 +143288,7 @@ paths: x-permission: operator: OR permissions: - - rum_delete_data - logs_delete_data - x-unstable: |- - **Note**: This endpoint is in Preview. If you have any feedback, - contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/deployment_gates: get: description: |- @@ -218171,7 +218198,7 @@ tags: information. name: Dashboards - description: |- - The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively. + The Data Deletion API allows the user to target and delete data from the allowed products. It's enabled for Logs and depends on the `logs_delete_data` permission. name: Data Deletion - description: Manage and run data observability monitors. name: Data Observability diff --git a/examples/v2/data-deletion/CancelDataDeletionRequest.py b/examples/v2/data-deletion/CancelDataDeletionRequest.py index 0d72c0a884..282309129a 100644 --- a/examples/v2/data-deletion/CancelDataDeletionRequest.py +++ b/examples/v2/data-deletion/CancelDataDeletionRequest.py @@ -10,7 +10,6 @@ DELETION_REQUEST_DATA_ID = environ["DELETION_REQUEST_DATA_ID"] configuration = Configuration() -configuration.unstable_operations["cancel_data_deletion_request"] = True with ApiClient(configuration) as api_client: api_instance = DataDeletionApi(api_client) response = api_instance.cancel_data_deletion_request( diff --git a/examples/v2/data-deletion/CreateDataDeletionRequest.py b/examples/v2/data-deletion/CreateDataDeletionRequest.py index 544f55cef1..4a8db589af 100644 --- a/examples/v2/data-deletion/CreateDataDeletionRequest.py +++ b/examples/v2/data-deletion/CreateDataDeletionRequest.py @@ -16,6 +16,7 @@ body = CreateDataDeletionRequestBody( data=CreateDataDeletionRequestBodyData( attributes=CreateDataDeletionRequestBodyAttributes( + displayed_total=100, _from=1672527600000, indexes=[ "test-index", @@ -32,7 +33,6 @@ ) configuration = Configuration() -configuration.unstable_operations["create_data_deletion_request"] = True with ApiClient(configuration) as api_client: api_instance = DataDeletionApi(api_client) response = api_instance.create_data_deletion_request(product="logs", body=body) diff --git a/examples/v2/data-deletion/GetDataDeletionRequests.py b/examples/v2/data-deletion/GetDataDeletionRequests.py index 96555ed244..e259bb9cac 100644 --- a/examples/v2/data-deletion/GetDataDeletionRequests.py +++ b/examples/v2/data-deletion/GetDataDeletionRequests.py @@ -6,7 +6,6 @@ from datadog_api_client.v2.api.data_deletion_api import DataDeletionApi configuration = Configuration() -configuration.unstable_operations["get_data_deletion_requests"] = True with ApiClient(configuration) as api_client: api_instance = DataDeletionApi(api_client) response = api_instance.get_data_deletion_requests() diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 985877705c..c0cac8747f 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -490,9 +490,6 @@ def __init__( "v2.get_all_datasets": False, "v2.get_dataset": False, "v2.update_dataset": False, - "v2.cancel_data_deletion_request": False, - "v2.create_data_deletion_request": False, - "v2.get_data_deletion_requests": False, "v2.create_deployment_gate": False, "v2.create_deployment_rule": False, "v2.delete_deployment_gate": False, diff --git a/src/datadog_api_client/v2/api/data_deletion_api.py b/src/datadog_api_client/v2/api/data_deletion_api.py index 104680bf67..8ec306a84b 100644 --- a/src/datadog_api_client/v2/api/data_deletion_api.py +++ b/src/datadog_api_client/v2/api/data_deletion_api.py @@ -19,7 +19,7 @@ class DataDeletionApi: """ - The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on ``logs_delete_data`` and ``rum_delete_data`` permissions respectively. + The Data Deletion API allows the user to target and delete data from the allowed products. It's enabled for Logs and depends on the ``logs_delete_data`` permission. """ def __init__(self, api_client=None): @@ -148,7 +148,7 @@ def create_data_deletion_request( Creates a data deletion request by providing a query and a timeframe targeting the proper data. - :param product: Name of the product to be deleted, either ``logs`` or ``rum``. + :param product: Name of the product to be deleted. Only ``logs`` is supported. :type product: str :type body: CreateDataDeletionRequestBody :rtype: CreateDataDeletionResponseBody diff --git a/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py b/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py index 5d81a86ada..a6a8c76d3a 100644 --- a/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py +++ b/src/datadog_api_client/v2/model/create_data_deletion_request_body_attributes.py @@ -14,9 +14,16 @@ class CreateDataDeletionRequestBodyAttributes(ModelNormal): + validations = { + "displayed_total": { + "inclusive_minimum": 1, + }, + } + @cached_property def openapi_types(_): return { + "displayed_total": (int,), "_from": (int,), "indexes": ([str],), "query": ({str: (str,)},), @@ -24,6 +31,7 @@ def openapi_types(_): } attribute_map = { + "displayed_total": "displayed_total", "_from": "from", "indexes": "indexes", "query": "query", @@ -31,11 +39,20 @@ def openapi_types(_): } def __init__( - self_, _from: int, query: Dict[str, str], to: int, indexes: Union[List[str], UnsetType] = unset, **kwargs + self_, + displayed_total: int, + _from: int, + query: Dict[str, str], + to: int, + indexes: Union[List[str], UnsetType] = unset, + **kwargs, ): """ Attributes for creating a data deletion request. + :param displayed_total: Total number of elements to be deleted as displayed to the user. + :type displayed_total: int + :param _from: Start of requested time window, milliseconds since Unix epoch. :type _from: int @@ -52,6 +69,7 @@ def __init__( kwargs["indexes"] = indexes super().__init__(kwargs) + self_.displayed_total = displayed_total self_._from = _from self_.query = query self_.to = to diff --git a/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py b/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py index 0af8401575..bfcb495f2d 100644 --- a/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py +++ b/src/datadog_api_client/v2/model/data_deletion_response_item_attributes.py @@ -19,6 +19,9 @@ def openapi_types(_): return { "created_at": (str,), "created_by": (str,), + "customer_message": (str,), + "displayed_total": (int,), + "error_category": (str,), "from_time": (int,), "indexes": ([str],), "is_created": (bool,), @@ -35,6 +38,9 @@ def openapi_types(_): attribute_map = { "created_at": "created_at", "created_by": "created_by", + "customer_message": "customer_message", + "displayed_total": "displayed_total", + "error_category": "error_category", "from_time": "from_time", "indexes": "indexes", "is_created": "is_created", @@ -52,6 +58,7 @@ def __init__( self_, created_at: str, created_by: str, + displayed_total: int, from_time: int, is_created: bool, org_id: int, @@ -62,6 +69,8 @@ def __init__( to_time: int, total_unrestricted: int, updated_at: str, + customer_message: Union[str, UnsetType] = unset, + error_category: Union[str, UnsetType] = unset, indexes: Union[List[str], UnsetType] = unset, **kwargs, ): @@ -74,6 +83,15 @@ def __init__( :param created_by: User who created the deletion request. :type created_by: str + :param customer_message: A message for the customer regarding the deletion request, if any. + :type customer_message: str, optional + + :param displayed_total: Total number of elements to be deleted as displayed to the user. + :type displayed_total: int + + :param error_category: The category of the error for the deletion request, if any. + :type error_category: str, optional + :param from_time: Start of requested time window, milliseconds since Unix epoch. :type from_time: int @@ -107,12 +125,17 @@ def __init__( :param updated_at: Update time of the deletion request. :type updated_at: str """ + if customer_message is not unset: + kwargs["customer_message"] = customer_message + if error_category is not unset: + kwargs["error_category"] = error_category if indexes is not unset: kwargs["indexes"] = indexes super().__init__(kwargs) self_.created_at = created_at self_.created_by = created_by + self_.displayed_total = displayed_total self_.from_time = from_time self_.is_created = is_created self_.org_id = org_id diff --git a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_bad_request_response.frozen index 88d6a9afa8..31722d3171 100644 --- a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_bad_request_response.frozen @@ -1 +1 @@ -2025-01-15T14:25:54.929Z \ No newline at end of file +2026-08-21T11:45:52.523Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.frozen index 7ef7817da7..62b93f0a22 100644 --- a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.frozen @@ -1 +1 @@ -2025-01-15T14:26:08.930Z \ No newline at end of file +2026-08-21T11:46:24.173Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.yaml index 9007c2b6d0..cec56590bf 100644 --- a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000},"type":"create_deletion_req"}}' + body: '{"data":{"attributes":{"displayed_total":100,"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000},"type":"create_deletion_req"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deletion/data/logs response: body: - string: '{"data":{"id":"753","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:26:09.447960191Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:26:09.447960191Z"}},"meta":{"product":"logs"}}' + string: '{"data":{"id":"13032","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:46:24.528038529Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:46:24.528038529Z"}},"meta":{"product":"logs"}}' headers: content-type: - application/vnd.api+json @@ -24,11 +24,11 @@ interactions: accept: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deletion/requests/753/cancel + uri: https://api.datadoghq.com/api/v2/deletion/requests/13032/cancel response: body: - string: '{"data":{"id":"753","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:26:09.44796Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:26:10.016496Z"}},"meta":{"product":"logs","request_status":"canceled"}}' + string: '{"data":{"id":"13032","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:46:24.528038Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:46:25.053351Z"}},"meta":{"product":"logs","request_status":"canceled"}}' headers: content-type: - application/vnd.api+json @@ -41,11 +41,11 @@ interactions: accept: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deletion/requests/753/cancel + uri: https://api.datadoghq.com/api/v2/deletion/requests/13032/cancel response: body: - string: '{"data":{"id":"753","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:26:09.44796Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:26:10.016496Z"}},"meta":{"product":"logs","request_status":"canceled"}}' + string: '{"data":{"id":"13032","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:46:24.528038Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:46:25.185079Z"}},"meta":{"product":"logs","request_status":"canceled"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_precondition_failed_error_response.frozen b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_precondition_failed_error_response.frozen index 6e3bf9d415..5e6a072a57 100644 --- a/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_precondition_failed_error_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_cancels_a_data_deletion_request_returns_precondition_failed_error_response.frozen @@ -1 +1 @@ -2025-01-15T14:26:26.195Z \ No newline at end of file +2026-08-21T11:46:39.970Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.frozen index 72e9b695b5..97451f0d57 100644 --- a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.frozen @@ -1 +1 @@ -2025-01-15T14:27:27.929Z \ No newline at end of file +2026-08-21T11:47:15.760Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.yaml index 49a3697f49..0483a4627c 100644 --- a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000},"type":"create_deletion_req"}}' + body: '{"data":{"attributes":{"displayed_total":100,"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000},"type":"create_deletion_req"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deletion/data/logs response: body: - string: '{"data":{"id":"754","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:27:28.457837225Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:27:28.457837225Z"}},"meta":{"product":"logs"}}' + string: '{"data":{"id":"13033","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:47:16.120391487Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:47:16.120391487Z"}},"meta":{"product":"logs"}}' headers: content-type: - application/vnd.api+json @@ -24,11 +24,11 @@ interactions: accept: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deletion/requests/754/cancel + uri: https://api.datadoghq.com/api/v2/deletion/requests/13033/cancel response: body: - string: '{"data":{"id":"754","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:27:28.457837Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:27:28.841156Z"}},"meta":{"product":"logs","request_status":"canceled"}}' + string: '{"data":{"id":"13033","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:47:16.120391Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:47:16.583052Z"}},"meta":{"product":"logs","request_status":"canceled"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.frozen b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.frozen index 6b5b3b9c6d..3e9ce2fc98 100644 --- a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.frozen @@ -1 +1 @@ -2025-01-15T14:27:45.329Z \ No newline at end of file +2026-08-21T11:47:30.530Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.yaml b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.yaml index 8795740a7d..b1f436add0 100644 --- a/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_creates_a_data_deletion_request_returns_precondition_failed_error_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{},"to":1704063600000},"type":"create_deletion_req"}}' + body: '{"data":{"attributes":{"displayed_total":100,"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{},"to":1704063600000},"type":"create_deletion_req"}}' headers: accept: - application/json @@ -10,7 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deletion/data/logs response: body: - string: '{"errors":[{"status":"412","code":"INVALID_BODY","title":"INVALID_BODY","detail":"INVALID_BODY"}]}' + string: '{"errors":[{"status":"412","code":"INVALID_BODY","title":"INVALID_BODY","detail":"query + is required and cannot be empty"}]}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.frozen index fa1e1b7f6d..42842f65e3 100644 --- a/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.frozen @@ -1 +1 @@ -2025-01-15T14:28:03.053Z \ No newline at end of file +2026-08-21T11:47:59.227Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.yaml index 2882df6a37..bc441b78e9 100644 --- a/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_gets_a_list_of_data_deletion_requests_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000},"type":"create_deletion_req"}}' + body: '{"data":{"attributes":{"displayed_total":100,"from":1672527600000,"indexes":["test-index","test-index-2"],"query":{"host":"abc","service":"xyz"},"to":1704063600000},"type":"create_deletion_req"}}' headers: accept: - application/json @@ -10,8 +10,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/deletion/data/logs response: body: - string: '{"data":{"id":"755","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:28:03.561191422Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:28:03.561191422Z"}},"meta":{"product":"logs"}}' + string: '{"data":{"id":"13034","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:47:59.580494865Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:47:59.580494865Z"}},"meta":{"product":"logs"}}' headers: content-type: - application/vnd.api+json @@ -27,57 +27,57 @@ interactions: uri: https://api.datadoghq.com/api/v2/deletion/requests response: body: - string: '{"data":[{"id":"755","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:28:03.561191Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:28:03.561191Z"}},{"id":"754","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:27:28.457837Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:27:29.845912Z"}},{"id":"753","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:26:09.44796Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:26:40.778007Z"}},{"id":"752","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:25:29.051089Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:25:29.487794Z"}},{"id":"714","type":"deletion_request","attributes":{"created_at":"2024-12-13T11:10:11.283679Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T11:10:12.030383Z"}},{"id":"713","type":"deletion_request","attributes":{"created_at":"2024-12-13T11:10:10.997244Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T11:10:11.762718Z"}},{"id":"712","type":"deletion_request","attributes":{"created_at":"2024-12-13T11:10:10.589382Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T11:10:11.996616Z"}},{"id":"711","type":"deletion_request","attributes":{"created_at":"2024-12-13T05:12:36.867077Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T05:12:37.582675Z"}},{"id":"710","type":"deletion_request","attributes":{"created_at":"2024-12-13T05:12:36.409111Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T05:12:37.523535Z"}},{"id":"709","type":"deletion_request","attributes":{"created_at":"2024-12-13T05:12:35.772827Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T05:12:37.358453Z"}},{"id":"708","type":"deletion_request","attributes":{"created_at":"2024-12-13T04:20:49.519001Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T04:21:21.590926Z"}},{"id":"707","type":"deletion_request","attributes":{"created_at":"2024-12-13T04:20:48.85652Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T04:20:50.409776Z"}},{"id":"706","type":"deletion_request","attributes":{"created_at":"2024-12-13T04:20:46.836697Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T04:20:49.900177Z"}},{"id":"705","type":"deletion_request","attributes":{"created_at":"2024-12-13T03:29:33.148865Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T03:30:05.402385Z"}},{"id":"704","type":"deletion_request","attributes":{"created_at":"2024-12-13T03:29:32.873575Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T03:29:34.480198Z"}},{"id":"703","type":"deletion_request","attributes":{"created_at":"2024-12-13T03:29:31.474974Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T03:29:34.575551Z"}},{"id":"702","type":"deletion_request","attributes":{"created_at":"2024-12-13T02:35:46.220064Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T02:36:16.89516Z"}},{"id":"701","type":"deletion_request","attributes":{"created_at":"2024-12-13T02:35:46.023077Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T02:35:48.234014Z"}},{"id":"700","type":"deletion_request","attributes":{"created_at":"2024-12-13T02:35:44.731426Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T02:36:15.503554Z"}},{"id":"699","type":"deletion_request","attributes":{"created_at":"2024-12-13T01:48:30.752051Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T01:48:31.279909Z"}},{"id":"698","type":"deletion_request","attributes":{"created_at":"2024-12-13T01:48:05.417998Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T01:48:36.25558Z"}},{"id":"697","type":"deletion_request","attributes":{"created_at":"2024-12-13T01:45:32.382234Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T01:45:36.312471Z"}},{"id":"696","type":"deletion_request","attributes":{"created_at":"2024-12-13T00:10:48.46036Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T00:10:49.886692Z"}},{"id":"695","type":"deletion_request","attributes":{"created_at":"2024-12-13T00:10:48.327767Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T00:10:48.780992Z"}},{"id":"694","type":"deletion_request","attributes":{"created_at":"2024-12-13T00:10:47.122825Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-13T00:10:48.487494Z"}},{"id":"685","type":"deletion_request","attributes":{"created_at":"2024-12-12T11:12:38.870862Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T11:12:39.89965Z"}},{"id":"684","type":"deletion_request","attributes":{"created_at":"2024-12-12T11:12:38.199983Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T11:12:39.049625Z"}},{"id":"683","type":"deletion_request","attributes":{"created_at":"2024-12-12T11:12:36.807002Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T11:13:07.805293Z"}},{"id":"682","type":"deletion_request","attributes":{"created_at":"2024-12-12T05:12:52.684546Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T05:12:53.685522Z"}},{"id":"681","type":"deletion_request","attributes":{"created_at":"2024-12-12T05:12:52.16783Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T05:12:53.950165Z"}},{"id":"680","type":"deletion_request","attributes":{"created_at":"2024-12-12T05:12:51.544717Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T05:12:53.828301Z"}},{"id":"679","type":"deletion_request","attributes":{"created_at":"2024-12-12T04:17:01.83844Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T04:17:03.845361Z"}},{"id":"678","type":"deletion_request","attributes":{"created_at":"2024-12-12T04:17:01.663259Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T04:17:03.964271Z"}},{"id":"677","type":"deletion_request","attributes":{"created_at":"2024-12-12T04:17:00.420697Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T04:17:03.326956Z"}},{"id":"676","type":"deletion_request","attributes":{"created_at":"2024-12-12T03:33:57.914898Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T03:34:00.243844Z"}},{"id":"675","type":"deletion_request","attributes":{"created_at":"2024-12-12T03:33:57.247608Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T03:33:57.967989Z"}},{"id":"674","type":"deletion_request","attributes":{"created_at":"2024-12-12T03:33:55.222307Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T03:34:27.685207Z"}},{"id":"673","type":"deletion_request","attributes":{"created_at":"2024-12-12T02:35:45.009347Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T02:36:16.117622Z"}},{"id":"672","type":"deletion_request","attributes":{"created_at":"2024-12-12T02:35:44.703999Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T02:35:45.087818Z"}},{"id":"671","type":"deletion_request","attributes":{"created_at":"2024-12-12T02:35:43.243266Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T02:35:44.412883Z"}},{"id":"670","type":"deletion_request","attributes":{"created_at":"2024-12-12T01:37:54.871601Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T01:37:56.816539Z"}},{"id":"669","type":"deletion_request","attributes":{"created_at":"2024-12-12T01:35:59.187862Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T01:36:00.746255Z"}},{"id":"668","type":"deletion_request","attributes":{"created_at":"2024-12-12T01:33:43.354197Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T01:33:48.502764Z"}},{"id":"667","type":"deletion_request","attributes":{"created_at":"2024-12-12T00:10:04.772518Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T00:10:07.559594Z"}},{"id":"666","type":"deletion_request","attributes":{"created_at":"2024-12-12T00:10:04.623831Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T00:10:05.077168Z"}},{"id":"665","type":"deletion_request","attributes":{"created_at":"2024-12-12T00:10:03.407238Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-12T00:10:07.423403Z"}},{"id":"663","type":"deletion_request","attributes":{"created_at":"2024-12-11T13:24:23.783684Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-11T13:24:55.748311Z"}},{"id":"662","type":"deletion_request","attributes":{"created_at":"2024-12-11T13:24:23.268323Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-11T13:24:23.989092Z"}},{"id":"661","type":"deletion_request","attributes":{"created_at":"2024-12-11T13:24:21.411605Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-11T13:24:24.416787Z"}},{"id":"660","type":"deletion_request","attributes":{"created_at":"2024-12-11T11:10:35.376536Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2024-12-11T11:10:35.80173Z"}}],"meta":{"next_page":"eyJQcm9kdWN0cyI6bnVsbCwiUXVlcnkiOiIiLCJTdGF0dXMiOiIiLCJQYWdlU2l6ZSI6NTAsIkxhc3RJdGVtSWQiOjY1OX0K","count_status":{"canceled":303,"pending":1},"count_product":{"logs":304}}}' + string: '{"data":[{"id":"13034","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:47:59.580494Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"pending","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:47:59.580494Z"}},{"id":"13033","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:47:16.120391Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:47:18.315203Z"}},{"id":"13032","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:46:24.528038Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:46:25.726606Z"}},{"id":"13030","type":"deletion_request","attributes":{"created_at":"2026-08-21T10:18:07.987769Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T10:18:08.752204Z"}},{"id":"13029","type":"deletion_request","attributes":{"created_at":"2026-08-21T10:17:19.650523Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T10:17:21.05757Z"}},{"id":"13028","type":"deletion_request","attributes":{"created_at":"2026-08-21T10:16:23.376737Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T10:16:25.445094Z"}},{"id":"12260","type":"deletion_request","attributes":{"created_at":"2026-07-14T14:24:10.689798Z","created_by":"frog@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-07-14T14:24:12.862459Z"}},{"id":"12259","type":"deletion_request","attributes":{"created_at":"2026-07-14T14:21:03.558558Z","created_by":"frog@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-07-14T14:21:06.012022Z"}},{"id":"12258","type":"deletion_request","attributes":{"created_at":"2026-07-14T14:19:56.727717Z","created_by":"frog@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-07-14T14:19:58.343536Z"}},{"id":"7710","type":"deletion_request","attributes":{"created_at":"2025-07-21T07:39:41.023912Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T07:39:45.79711Z"}},{"id":"7709","type":"deletion_request","attributes":{"created_at":"2025-07-21T07:38:20.881444Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":true,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"2025-07-21T09:38:21.311086Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T07:38:21.340893Z"}},{"id":"7708","type":"deletion_request","attributes":{"created_at":"2025-07-21T07:37:50.940003Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T07:37:57.234547Z"}},{"id":"7707","type":"deletion_request","attributes":{"created_at":"2025-07-21T05:19:18.686293Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T05:19:19.617573Z"}},{"id":"7706","type":"deletion_request","attributes":{"created_at":"2025-07-21T05:19:18.390765Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T05:19:19.56572Z"}},{"id":"7705","type":"deletion_request","attributes":{"created_at":"2025-07-21T05:19:18.036334Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T05:19:19.584271Z"}},{"id":"7704","type":"deletion_request","attributes":{"created_at":"2025-07-21T04:36:46.329958Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":true,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"2025-07-21T06:36:47.275783Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T04:36:47.522008Z"}},{"id":"7703","type":"deletion_request","attributes":{"created_at":"2025-07-21T04:36:46.106031Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T04:36:47.207268Z"}},{"id":"7702","type":"deletion_request","attributes":{"created_at":"2025-07-21T04:36:44.854623Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":true,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"2025-07-21T06:36:45.165155Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T04:36:45.956922Z"}},{"id":"7700","type":"deletion_request","attributes":{"created_at":"2025-07-21T04:08:49.886921Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T04:08:51.651045Z"}},{"id":"7699","type":"deletion_request","attributes":{"created_at":"2025-07-21T04:08:49.137299Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T04:08:51.805867Z"}},{"id":"7698","type":"deletion_request","attributes":{"created_at":"2025-07-21T04:08:47.029432Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T04:08:48.614404Z"}},{"id":"7697","type":"deletion_request","attributes":{"created_at":"2025-07-21T03:39:41.169061Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T03:39:44.861403Z"}},{"id":"7696","type":"deletion_request","attributes":{"created_at":"2025-07-21T03:38:20.958225Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T03:38:26.817759Z"}},{"id":"7695","type":"deletion_request","attributes":{"created_at":"2025-07-21T03:37:51.213295Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T03:37:55.111343Z"}},{"id":"7694","type":"deletion_request","attributes":{"created_at":"2025-07-21T00:13:59.35249Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T00:14:01.688928Z"}},{"id":"7693","type":"deletion_request","attributes":{"created_at":"2025-07-21T00:13:59.213567Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T00:14:01.559065Z"}},{"id":"7692","type":"deletion_request","attributes":{"created_at":"2025-07-21T00:13:58.003358Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-21T00:14:03.866174Z"}},{"id":"7691","type":"deletion_request","attributes":{"created_at":"2025-07-20T23:39:41.179696Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T23:39:42.118782Z"}},{"id":"7690","type":"deletion_request","attributes":{"created_at":"2025-07-20T23:38:20.923174Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T23:38:22.634442Z"}},{"id":"7689","type":"deletion_request","attributes":{"created_at":"2025-07-20T23:37:50.941434Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T23:37:52.822748Z"}},{"id":"7686","type":"deletion_request","attributes":{"created_at":"2025-07-20T19:39:41.191157Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T19:39:46.69775Z"}},{"id":"7685","type":"deletion_request","attributes":{"created_at":"2025-07-20T19:38:20.940211Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T19:38:23.223383Z"}},{"id":"7684","type":"deletion_request","attributes":{"created_at":"2025-07-20T19:37:50.957069Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":true,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"2025-07-20T21:37:51.728059Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T19:37:51.864865Z"}},{"id":"7683","type":"deletion_request","attributes":{"created_at":"2025-07-20T15:39:41.230795Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T15:39:43.42317Z"}},{"id":"7682","type":"deletion_request","attributes":{"created_at":"2025-07-20T15:38:21.504854Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T15:38:22.69831Z"}},{"id":"7681","type":"deletion_request","attributes":{"created_at":"2025-07-20T15:37:51.043519Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T15:37:51.994834Z"}},{"id":"7680","type":"deletion_request","attributes":{"created_at":"2025-07-20T11:39:41.176922Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T11:39:42.387978Z"}},{"id":"7679","type":"deletion_request","attributes":{"created_at":"2025-07-20T11:38:20.927763Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T11:38:22.283049Z"}},{"id":"7678","type":"deletion_request","attributes":{"created_at":"2025-07-20T11:37:50.953526Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T11:37:53.424778Z"}},{"id":"7677","type":"deletion_request","attributes":{"created_at":"2025-07-20T07:39:41.163287Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T07:39:41.729721Z"}},{"id":"7676","type":"deletion_request","attributes":{"created_at":"2025-07-20T07:38:21.116615Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T07:38:25.380537Z"}},{"id":"7675","type":"deletion_request","attributes":{"created_at":"2025-07-20T07:37:50.964623Z","created_by":"frog@datadoghq.com","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T07:37:52.241797Z"}},{"id":"7674","type":"deletion_request","attributes":{"created_at":"2025-07-20T05:17:59.379144Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T05:18:00.145549Z"}},{"id":"7673","type":"deletion_request","attributes":{"created_at":"2025-07-20T05:17:59.121641Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T05:17:59.256557Z"}},{"id":"7672","type":"deletion_request","attributes":{"created_at":"2025-07-20T05:17:58.618818Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T05:17:58.922935Z"}},{"id":"7671","type":"deletion_request","attributes":{"created_at":"2025-07-20T04:36:35.455242Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":true,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"2025-07-20T06:36:36.053265Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T04:36:36.637282Z"}},{"id":"7670","type":"deletion_request","attributes":{"created_at":"2025-07-20T04:36:35.29885Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T04:36:35.85054Z"}},{"id":"7669","type":"deletion_request","attributes":{"created_at":"2025-07-20T04:36:34.022688Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T04:36:46.647697Z"}},{"id":"7668","type":"deletion_request","attributes":{"created_at":"2025-07-20T04:09:48.780258Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":true,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"2025-07-20T06:09:48.928673Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T04:09:50.539287Z"}},{"id":"7667","type":"deletion_request","attributes":{"created_at":"2025-07-20T04:09:48.002572Z","created_by":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","displayed_total":0,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-07-20T04:09:48.501942Z"}}],"meta":{"next_page":"eyJQcm9kdWN0cyI6bnVsbCwiUXVlcnkiOiIiLCJTdGF0dXMiOiIiLCJQYWdlU2l6ZSI6NTAsIkxhc3RJdGVtSWQiOjc2NjZ9Cg","count_status":{"canceled":2185,"pending":1},"count_product":{"logs":2186}}}' headers: content-type: - application/vnd.api+json @@ -90,11 +90,11 @@ interactions: accept: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/deletion/requests/755/cancel + uri: https://api.datadoghq.com/api/v2/deletion/requests/13034/cancel response: body: - string: '{"data":{"id":"755","type":"deletion_request","attributes":{"created_at":"2025-01-15T14:28:03.561191Z","created_by":"frog@datadoghq.com","from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc - service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2025-01-15T14:28:04.405914Z"}},"meta":{"product":"logs","request_status":"canceled"}}' + string: '{"data":{"id":"13034","type":"deletion_request","attributes":{"created_at":"2026-08-21T11:47:59.580494Z","created_by":"luis.navarro@datadoghq.com","displayed_total":100,"from_time":1672527600000,"indexes":["test-index","test-index-2"],"is_created":false,"org_id":321813,"product":"logs","query":"host:abc + service:xyz","starting_at":"0001-01-01T00:00:00Z","status":"canceled","to_time":1704063600000,"total_unrestricted":0,"updated_at":"2026-08-21T11:48:00.641616Z"}},"meta":{"product":"logs","request_status":"canceled"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/features/data_deletion.feature b/tests/v2/features/data_deletion.feature index 36cdb70f3f..8c4359df02 100644 --- a/tests/v2/features/data_deletion.feature +++ b/tests/v2/features/data_deletion.feature @@ -1,8 +1,8 @@ @endpoint(data-deletion) @endpoint(data-deletion-v2) Feature: Data Deletion The Data Deletion API allows the user to target and delete data from the - allowed products. It's currently enabled for Logs and RUM and depends on - `logs_delete_data` and `rum_delete_data` permissions respectively. + allowed products. It's enabled for Logs and depends on the + `logs_delete_data` permission. Background: Given a valid "apiKeyAuth" key in the system @@ -11,16 +11,14 @@ Feature: Data Deletion @replay-only @team:DataDog/governance-tooling-and-systems Scenario: Cancels a data deletion request returns "Bad Request" response - Given operation "CancelDataDeletionRequest" enabled - And new "CancelDataDeletionRequest" request + Given new "CancelDataDeletionRequest" request And request contains "id" parameter with value "id-1" When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/governance-tooling-and-systems + @team:DataDog/governance-tooling-and-systems Scenario: Cancels a data deletion request returns "OK" response - Given operation "CancelDataDeletionRequest" enabled - And there is a valid "deletion_request" in the system + Given there is a valid "deletion_request" in the system And new "CancelDataDeletionRequest" request And request contains "id" parameter from "deletion_request.data.id" When the request is sent @@ -32,27 +30,24 @@ Feature: Data Deletion @replay-only @team:DataDog/governance-tooling-and-systems Scenario: Cancels a data deletion request returns "Precondition failed error" response - Given operation "CancelDataDeletionRequest" enabled - And new "CancelDataDeletionRequest" request + Given new "CancelDataDeletionRequest" request And request contains "id" parameter with value "-1" When the request is sent Then the response status is 412 Precondition failed error @generated @skip @team:DataDog/governance-tooling-and-systems Scenario: Creates a data deletion request returns "Bad Request" response - Given operation "CreateDataDeletionRequest" enabled - And new "CreateDataDeletionRequest" request + Given new "CreateDataDeletionRequest" request And request contains "product" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} + And body with value {"data": {"attributes": {"displayed_total": 100, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/governance-tooling-and-systems + @team:DataDog/governance-tooling-and-systems Scenario: Creates a data deletion request returns "OK" response - Given operation "CreateDataDeletionRequest" enabled - And new "CreateDataDeletionRequest" request + Given new "CreateDataDeletionRequest" request And request contains "product" parameter with value "logs" - And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} + And body with value {"data": {"attributes": {"displayed_total": 100, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {"host": "abc", "service": "xyz"}, "to": 1704063600000}, "type": "create_deletion_req"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "deletion_request" @@ -61,24 +56,21 @@ Feature: Data Deletion @replay-only @team:DataDog/governance-tooling-and-systems Scenario: Creates a data deletion request returns "Precondition failed error" response - Given operation "CreateDataDeletionRequest" enabled - And new "CreateDataDeletionRequest" request + Given new "CreateDataDeletionRequest" request And request contains "product" parameter with value "logs" - And body with value {"data": {"attributes": {"from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}} + And body with value {"data": {"attributes": {"displayed_total": 100, "from": 1672527600000, "indexes": ["test-index", "test-index-2"], "query": {}, "to": 1704063600000}, "type": "create_deletion_req"}} When the request is sent Then the response status is 412 Precondition failed error @generated @skip @team:DataDog/governance-tooling-and-systems Scenario: Gets a list of data deletion requests returns "Bad Request" response - Given operation "GetDataDeletionRequests" enabled - And new "GetDataDeletionRequests" request + Given new "GetDataDeletionRequests" request When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/governance-tooling-and-systems + @team:DataDog/governance-tooling-and-systems Scenario: Gets a list of data deletion requests returns "OK" response - Given operation "GetDataDeletionRequests" enabled - And there is a valid "deletion_request" in the system + Given there is a valid "deletion_request" in the system And new "GetDataDeletionRequests" request When the request is sent Then the response status is 200 OK diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 25ee1fa408..99157ddd84 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -366,7 +366,7 @@ }, { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n },\n \"type\": \"create_deletion_req\"\n }\n}" + "value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"test-index\", \"test-index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"},\n \"displayed_total\": 100\n },\n \"type\": \"create_deletion_req\"\n }\n}" } ], "step": "there is a valid \"deletion_request\" in the system",