From 77715ae8807c866967b805a641c1b3e020a24d71 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:04:26 +0000 Subject: [PATCH] Data Deletion Endpoints Documentation (#26227) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- config/_default/menus/api.en.yaml | 40 + content/en/api/latest/data-deletion/_index.md | 3 + content/en/api/v2/data-deletion/_index.md | 4 + content/en/api/v2/data-deletion/examples.json | 279 ++ .../request.CreateDataDeletionRequest.json | 16 + data/api/v2/CodeExamples.json | 7 + data/api/v2/full_spec.yaml | 421 +++ data/api/v2/full_spec_deref.json | 2632 +++++++++++++++-- data/api/v2/translate_actions.json | 14 + data/api/v2/translate_tags.json | 4 + static/resources/json/full_spec_v2.json | 2632 +++++++++++++++-- 12 files changed, 5556 insertions(+), 504 deletions(-) create mode 100644 content/en/api/latest/data-deletion/_index.md create mode 100644 content/en/api/v2/data-deletion/_index.md create mode 100644 content/en/api/v2/data-deletion/examples.json create mode 100644 content/en/api/v2/data-deletion/request.CreateDataDeletionRequest.json diff --git a/.apigentools-info b/.apigentools-info index bace05b75330c..3990244453106 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-02 19:33:14.118490", - "spec_repo_commit": "7511c5f0" + "regenerated": "2024-12-03 10:18:51.678531", + "spec_repo_commit": "3f8bbb67" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-02 19:33:22.015278", - "spec_repo_commit": "7511c5f0" + "regenerated": "2024-12-03 10:18:59.434554", + "spec_repo_commit": "3f8bbb67" } } } \ No newline at end of file diff --git a/config/_default/menus/api.en.yaml b/config/_default/menus/api.en.yaml index c099490fbb541..c531b076edd7e 100644 --- a/config/_default/menus/api.en.yaml +++ b/config/_default/menus/api.en.yaml @@ -5405,6 +5405,46 @@ menu: unstable: - v2 order: 4 + - name: Data Deletion + url: /api/latest/data-deletion/ + identifier: data-deletion + generated: true + - name: Cancels a data deletion request + url: '#cancels-a-data-deletion-request' + identifier: data-deletion-cancels-a-data-deletion-request + parent: data-deletion + generated: true + params: + versions: + - v2 + operationids: + - CancelDataDeletionRequest + unstable: [] + order: 2 + - name: Gets a list of data deletion requests + url: '#gets-a-list-of-data-deletion-requests' + identifier: data-deletion-gets-a-list-of-data-deletion-requests + parent: data-deletion + generated: true + params: + versions: + - v2 + operationids: + - GetDataDeletionRequests + unstable: [] + order: 3 + - name: Creates a data deletion request + url: '#creates-a-data-deletion-request' + identifier: data-deletion-creates-a-data-deletion-request + parent: data-deletion + generated: true + params: + versions: + - v2 + operationids: + - CreateDataDeletionRequest + unstable: [] + order: 1 - name: Domain Allowlist url: /api/latest/domain-allowlist/ identifier: domain-allowlist diff --git a/content/en/api/latest/data-deletion/_index.md b/content/en/api/latest/data-deletion/_index.md new file mode 100644 index 0000000000000..0304ea5a3d9c3 --- /dev/null +++ b/content/en/api/latest/data-deletion/_index.md @@ -0,0 +1,3 @@ +--- +title: Data Deletion +--- diff --git a/content/en/api/v2/data-deletion/_index.md b/content/en/api/v2/data-deletion/_index.md new file mode 100644 index 0000000000000..31206b57e2e82 --- /dev/null +++ b/content/en/api/v2/data-deletion/_index.md @@ -0,0 +1,4 @@ +--- +title: Data Deletion +headless: true +--- diff --git a/content/en/api/v2/data-deletion/examples.json b/content/en/api/v2/data-deletion/examples.json new file mode 100644 index 0000000000000..bade810735c36 --- /dev/null +++ b/content/en/api/v2/data-deletion/examples.json @@ -0,0 +1,279 @@ +{ + "CreateDataDeletionRequest": { + "responses": { + "200": { + "json": { + "data": { + "attributes": { + "created_at": "2024-01-01T00:00:00.000000Z", + "created_by": "test.user@datadoghq.com", + "from_time": 1672527600000, + "indexes": [ + "index-1", + "index-2" + ], + "is_created": true, + "org_id": 321813, + "product": "logs", + "query": "service:xyz host:abc", + "starting_at": "2024-01-01T02:00:00.000000Z", + "status": "pending", + "to_time": 1704063600000, + "total_unrestricted": 100, + "updated_at": "2024-01-01T00:00:00.000000Z" + }, + "id": "1", + "type": "deletion_request" + }, + "meta": { + "count_product": { + "": "integer" + }, + "count_status": { + "": "integer" + }, + "next_page": "cGFnZTI=", + "product": "logs", + "request_status": "canceled" + } + }, + "html": "
\n
\n
\n
\n

data

\n
\n

object

\n

The created data deletion request information.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Deletion attribute for data deletion response.

\n
\n
\n
\n
\n
\n

created_at [required]

\n
\n

string

\n

Creation time of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

created_by [required]

\n
\n

string

\n

User who created the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

from_time [required]

\n
\n

int64

\n

Start of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

indexes

\n
\n

[string]

\n

List of indexes for the search. If not provided, the search is performed in all indexes.

\n
\n \n
\n
\n
\n
\n
\n

is_created [required]

\n
\n

boolean

\n

Whether the deletion request is fully created or not.

\n
\n \n
\n
\n
\n
\n
\n

org_id [required]

\n
\n

int64

\n

Organization ID.

\n
\n \n
\n
\n
\n
\n
\n

product [required]

\n
\n

string

\n

Product name.

\n
\n \n
\n
\n
\n
\n
\n

query [required]

\n
\n

string

\n

Query for creating a data deletion request.

\n
\n \n
\n
\n
\n
\n
\n

starting_at [required]

\n
\n

string

\n

Starting time of the process to delete the requested data.

\n
\n \n
\n
\n
\n
\n
\n

status [required]

\n
\n

string

\n

Status of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

to_time [required]

\n
\n

int64

\n

End of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

total_unrestricted [required]

\n
\n

int64

\n

Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.

\n
\n \n
\n
\n
\n
\n
\n

updated_at [required]

\n
\n

string

\n

Update time of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The ID of the created data deletion request.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

string

\n

The type of the request created.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

The metadata of the data deletion response.

\n
\n
\n
\n
\n
\n

count_product

\n
\n

object

\n

The total deletion requests created by product.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

int64

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

count_status

\n
\n

object

\n

The total deletion requests created by status.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

int64

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

next_page

\n
\n

string

\n

The next page when searching deletion requests created in the current organization.

\n
\n \n
\n
\n
\n
\n
\n

product

\n
\n

string

\n

The product of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

request_status

\n
\n

string

\n

The status of the executed request.

\n
\n \n
\n
\n
\n
" + }, + "400": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "403": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "412": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "500": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + } + }, + "request": { + "json_curl": { + "data": { + "attributes": { + "from": 1672527600000, + "query": {}, + "to": 1704063600000 + } + } + }, + "json": { + "data": { + "attributes": { + "from": 1672527600000, + "indexes": [ + "index-1", + "index-2" + ], + "query": { + "": "string" + }, + "to": 1704063600000 + } + } + }, + "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

Data needed to create a data deletion request.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes for creating a data deletion request.

\n
\n
\n
\n
\n
\n

from [required]

\n
\n

int64

\n

Start of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

indexes

\n
\n

[string]

\n

List of indexes for the search. If not provided, the search is performed in all indexes.

\n
\n \n
\n
\n
\n
\n
\n

query [required]

\n
\n

object

\n

Query for creating a data deletion request.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

string

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

to [required]

\n
\n

int64

\n

End of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n
" + } + }, + "GetDataDeletionRequests": { + "responses": { + "200": { + "json": { + "data": [ + { + "attributes": { + "created_at": "2024-01-01T00:00:00.000000Z", + "created_by": "test.user@datadoghq.com", + "from_time": 1672527600000, + "indexes": [ + "index-1", + "index-2" + ], + "is_created": true, + "org_id": 321813, + "product": "logs", + "query": "service:xyz host:abc", + "starting_at": "2024-01-01T02:00:00.000000Z", + "status": "pending", + "to_time": 1704063600000, + "total_unrestricted": 100, + "updated_at": "2024-01-01T00:00:00.000000Z" + }, + "id": "1", + "type": "deletion_request" + } + ], + "meta": { + "count_product": { + "": "integer" + }, + "count_status": { + "": "integer" + }, + "next_page": "cGFnZTI=", + "product": "logs", + "request_status": "canceled" + } + }, + "html": "
\n
\n
\n
\n

data

\n
\n

[object]

\n

The list of data deletion requests that matches the query.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Deletion attribute for data deletion response.

\n
\n
\n
\n
\n
\n

created_at [required]

\n
\n

string

\n

Creation time of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

created_by [required]

\n
\n

string

\n

User who created the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

from_time [required]

\n
\n

int64

\n

Start of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

indexes

\n
\n

[string]

\n

List of indexes for the search. If not provided, the search is performed in all indexes.

\n
\n \n
\n
\n
\n
\n
\n

is_created [required]

\n
\n

boolean

\n

Whether the deletion request is fully created or not.

\n
\n \n
\n
\n
\n
\n
\n

org_id [required]

\n
\n

int64

\n

Organization ID.

\n
\n \n
\n
\n
\n
\n
\n

product [required]

\n
\n

string

\n

Product name.

\n
\n \n
\n
\n
\n
\n
\n

query [required]

\n
\n

string

\n

Query for creating a data deletion request.

\n
\n \n
\n
\n
\n
\n
\n

starting_at [required]

\n
\n

string

\n

Starting time of the process to delete the requested data.

\n
\n \n
\n
\n
\n
\n
\n

status [required]

\n
\n

string

\n

Status of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

to_time [required]

\n
\n

int64

\n

End of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

total_unrestricted [required]

\n
\n

int64

\n

Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.

\n
\n \n
\n
\n
\n
\n
\n

updated_at [required]

\n
\n

string

\n

Update time of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The ID of the created data deletion request.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

string

\n

The type of the request created.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

The metadata of the data deletion response.

\n
\n
\n
\n
\n
\n

count_product

\n
\n

object

\n

The total deletion requests created by product.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

int64

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

count_status

\n
\n

object

\n

The total deletion requests created by status.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

int64

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

next_page

\n
\n

string

\n

The next page when searching deletion requests created in the current organization.

\n
\n \n
\n
\n
\n
\n
\n

product

\n
\n

string

\n

The product of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

request_status

\n
\n

string

\n

The status of the executed request.

\n
\n \n
\n
\n
\n
" + }, + "400": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "403": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "500": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + } + }, + "request": { + "json_curl": {}, + "json": {}, + "html": "" + } + }, + "CancelDataDeletionRequest": { + "responses": { + "200": { + "json": { + "data": { + "attributes": { + "created_at": "2024-01-01T00:00:00.000000Z", + "created_by": "test.user@datadoghq.com", + "from_time": 1672527600000, + "indexes": [ + "index-1", + "index-2" + ], + "is_created": true, + "org_id": 321813, + "product": "logs", + "query": "service:xyz host:abc", + "starting_at": "2024-01-01T02:00:00.000000Z", + "status": "pending", + "to_time": 1704063600000, + "total_unrestricted": 100, + "updated_at": "2024-01-01T00:00:00.000000Z" + }, + "id": "1", + "type": "deletion_request" + }, + "meta": { + "count_product": { + "": "integer" + }, + "count_status": { + "": "integer" + }, + "next_page": "cGFnZTI=", + "product": "logs", + "request_status": "canceled" + } + }, + "html": "
\n
\n
\n
\n

data

\n
\n

object

\n

The created data deletion request information.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Deletion attribute for data deletion response.

\n
\n
\n
\n
\n
\n

created_at [required]

\n
\n

string

\n

Creation time of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

created_by [required]

\n
\n

string

\n

User who created the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

from_time [required]

\n
\n

int64

\n

Start of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

indexes

\n
\n

[string]

\n

List of indexes for the search. If not provided, the search is performed in all indexes.

\n
\n \n
\n
\n
\n
\n
\n

is_created [required]

\n
\n

boolean

\n

Whether the deletion request is fully created or not.

\n
\n \n
\n
\n
\n
\n
\n

org_id [required]

\n
\n

int64

\n

Organization ID.

\n
\n \n
\n
\n
\n
\n
\n

product [required]

\n
\n

string

\n

Product name.

\n
\n \n
\n
\n
\n
\n
\n

query [required]

\n
\n

string

\n

Query for creating a data deletion request.

\n
\n \n
\n
\n
\n
\n
\n

starting_at [required]

\n
\n

string

\n

Starting time of the process to delete the requested data.

\n
\n \n
\n
\n
\n
\n
\n

status [required]

\n
\n

string

\n

Status of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

to_time [required]

\n
\n

int64

\n

End of requested time window, milliseconds since Unix epoch.

\n
\n \n
\n
\n
\n
\n
\n

total_unrestricted [required]

\n
\n

int64

\n

Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.

\n
\n \n
\n
\n
\n
\n
\n

updated_at [required]

\n
\n

string

\n

Update time of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The ID of the created data deletion request.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

string

\n

The type of the request created.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

The metadata of the data deletion response.

\n
\n
\n
\n
\n
\n

count_product

\n
\n

object

\n

The total deletion requests created by product.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

int64

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

count_status

\n
\n

object

\n

The total deletion requests created by status.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

int64

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

next_page

\n
\n

string

\n

The next page when searching deletion requests created in the current organization.

\n
\n \n
\n
\n
\n
\n
\n

product

\n
\n

string

\n

The product of the deletion request.

\n
\n \n
\n
\n
\n
\n
\n

request_status

\n
\n

string

\n

The status of the executed request.

\n
\n \n
\n
\n
\n
" + }, + "400": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "403": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "412": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "500": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + } + }, + "request": { + "json_curl": {}, + "json": {}, + "html": "" + } + } +} \ No newline at end of file diff --git a/content/en/api/v2/data-deletion/request.CreateDataDeletionRequest.json b/content/en/api/v2/data-deletion/request.CreateDataDeletionRequest.json new file mode 100644 index 0000000000000..772530f246c8a --- /dev/null +++ b/content/en/api/v2/data-deletion/request.CreateDataDeletionRequest.json @@ -0,0 +1,16 @@ +{ + "data": { + "attributes": { + "from": 1672527600000, + "indexes": [ + "index-1", + "index-2" + ], + "query": { + "host": "abc", + "service": "xyz" + }, + "to": 1704063600000 + } + } +} \ No newline at end of file diff --git a/data/api/v2/CodeExamples.json b/data/api/v2/CodeExamples.json index df28a5a11810a..9c486634accbe 100644 --- a/data/api/v2/CodeExamples.json +++ b/data/api/v2/CodeExamples.json @@ -300,6 +300,13 @@ "description": "Update items of a dashboard list returns \"OK\" response" } ], + "CreateDataDeletionRequest": [ + { + "group": "data_deletion", + "suffix": "", + "description": "Creates a data deletion request returns \"OK\" response" + } + ], "PatchDomainAllowlist": [ { "group": "domain_allowlist", diff --git a/data/api/v2/full_spec.yaml b/data/api/v2/full_spec.yaml index 613506e755fd9..42bae448d4d5f 100644 --- a/data/api/v2/full_spec.yaml +++ b/data/api/v2/full_spec.yaml @@ -578,6 +578,13 @@ components: example: 10 format: int64 type: integer + ProductName: + description: Name of the product to be deleted, either `logs` or `rum`. + in: path + name: product + required: true + schema: + type: string ProjectIDPathParameter: description: Project UUID example: e555e290-ed65-49bd-ae18-8acbfcf18db7 @@ -593,6 +600,13 @@ components: required: true schema: type: string + RequestId: + description: ID of the deletion request. + in: path + name: id + required: true + schema: + type: string ResourceID: description: 'Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.' @@ -4274,6 +4288,14 @@ components: - name - expression type: object + CancelDataDeletionResponseBody: + description: The response from the cancel data deletion request endpoint. + properties: + data: + $ref: '#/components/schemas/DataDeletionResponseItem' + meta: + $ref: '#/components/schemas/DataDeletionResponseMeta' + type: object Case: description: A case properties: @@ -6465,6 +6487,66 @@ components: type: string x-enum-varnames: - COST_BY_ORG + CreateDataDeletionRequestBody: + description: Object needed to create a data deletion request. + properties: + data: + $ref: '#/components/schemas/CreateDataDeletionRequestBodyData' + required: + - data + type: object + CreateDataDeletionRequestBodyAttributes: + description: Attributes for creating a data deletion request. + properties: + from: + description: Start of requested time window, milliseconds since Unix epoch. + example: 1672527600000 + format: int64 + type: integer + indexes: + description: List of indexes for the search. If not provided, the search + is performed in all indexes. + example: + - index-1 + - index-2 + items: + description: Individual index. + type: string + type: array + query: + additionalProperties: + type: string + description: Query for creating a data deletion request. + example: + host: abc + service: xyz + type: object + to: + description: End of requested time window, milliseconds since Unix epoch. + example: 1704063600000 + format: int64 + type: integer + required: + - query + - from + - to + type: object + CreateDataDeletionRequestBodyData: + description: Data needed to create a data deletion request. + properties: + attributes: + $ref: '#/components/schemas/CreateDataDeletionRequestBodyAttributes' + required: + - attributes + type: object + CreateDataDeletionResponseBody: + description: The response from the create data deletion request endpoint. + properties: + data: + $ref: '#/components/schemas/DataDeletionResponseItem' + meta: + $ref: '#/components/schemas/DataDeletionResponseMeta' + type: object CreateOpenAPIResponse: description: Response for `CreateOpenAPI` operation. properties: @@ -7756,6 +7838,140 @@ components: - INTEGRATION_SCREENBOARD - INTEGRATION_TIMEBOARD - HOST_TIMEBOARD + DataDeletionResponseItem: + description: The created data deletion request information. + properties: + attributes: + $ref: '#/components/schemas/DataDeletionResponseItemAttributes' + id: + description: The ID of the created data deletion request. + example: '1' + type: string + type: + description: The type of the request created. + example: deletion_request + type: string + required: + - id + - type + - attributes + type: object + DataDeletionResponseItemAttributes: + description: Deletion attribute for data deletion response. + properties: + created_at: + description: Creation time of the deletion request. + example: '2024-01-01T00:00:00.000000Z' + type: string + created_by: + description: User who created the deletion request. + example: test.user@datadoghq.com + type: string + from_time: + description: Start of requested time window, milliseconds since Unix epoch. + example: 1672527600000 + format: int64 + type: integer + indexes: + description: List of indexes for the search. If not provided, the search + is performed in all indexes. + example: + - index-1 + - index-2 + items: + description: Individual index. + type: string + type: array + is_created: + description: Whether the deletion request is fully created or not. + example: true + type: boolean + org_id: + description: Organization ID. + example: 321813 + format: int64 + type: integer + product: + description: Product name. + example: logs + type: string + query: + description: Query for creating a data deletion request. + example: service:xyz host:abc + type: string + starting_at: + description: Starting time of the process to delete the requested data. + example: '2024-01-01T02:00:00.000000Z' + type: string + status: + description: Status of the deletion request. + example: pending + type: string + to_time: + description: End of requested time window, milliseconds since Unix epoch. + example: 1704063600000 + format: int64 + type: integer + total_unrestricted: + description: Total number of elements to be deleted. Only the data accessible + to the current user that matches the query and timeframe provided will + be deleted. + example: 100 + format: int64 + type: integer + updated_at: + description: Update time of the deletion request. + example: '2024-01-01T00:00:00.000000Z' + type: string + required: + - created_at + - created_by + - from_time + - is_created + - org_id + - product + - query + - starting_at + - status + - to_time + - total_unrestricted + - updated_at + type: object + DataDeletionResponseMeta: + description: The metadata of the data deletion response. + properties: + count_product: + additionalProperties: + format: int64 + type: integer + description: The total deletion requests created by product. + example: + logs: 8 + rum: 7 + type: object + count_status: + additionalProperties: + format: int64 + type: integer + description: The total deletion requests created by status. + example: + completed: 10 + pending: 5 + type: object + next_page: + description: The next page when searching deletion requests created in the + current organization. + example: cGFnZTI= + type: string + product: + description: The product of the deletion request. + example: logs + type: string + request_status: + description: The status of the executed request. + example: canceled + type: string + type: object DataScalarColumn: description: A column containing the numerical results for a formula or query. properties: @@ -10774,6 +10990,17 @@ components: type: string x-enum-varnames: - GCP_SERVICE_ACCOUNT + GetDataDeletionsResponseBody: + description: The response from the get data deletion requests endpoint. + properties: + data: + description: The list of data deletion requests that matches the query. + items: + $ref: '#/components/schemas/DataDeletionResponseItem' + type: array + meta: + $ref: '#/components/schemas/DataDeletionResponseMeta' + type: object GetDeviceAttributes: description: The device attributes properties: @@ -31784,6 +32011,196 @@ paths: x-menu-order: 3 x-undo: type: safe + /api/v2/deletion/data/{product}: + post: + description: Creates a data deletion request by providing a query and a time + frame targeting the proper data. + operationId: CreateDataDeletionRequest + parameters: + - $ref: '#/components/parameters/ProductName' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDataDeletionRequestBody' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateDataDeletionResponseBody' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '412': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Precondition failed error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Internal server error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Creates a data deletion request + tags: + - Data Deletion + x-given: + deletion_request: + parameters: + - name: product + value: '"logs"' + - name: body + value: "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n + \ \"to\": 1704063600000,\n \"indexes\": [\"index-1\", \"index-2\"],\n + \ \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n }\n + \ }\n}" + step: there is a valid "deletion_request" in the system + x-menu-order: 1 + x-permission: + operator: OR + permissions: + - rum_delete_data + - logs_delete_data + x-undo: + operationId: CancelDataDeletionRequest + parameters: + - name: id + source: data.id + type: unsafe + /api/v2/deletion/requests: + get: + description: Gets a list of data deletion requests based on several filter parameters. + operationId: GetDataDeletionRequests + parameters: + - description: The next page of the previous search. If the next_page parameter + is included, the rest of the query elements are ignored. + example: cGFnZTI= + in: query + name: next_page + required: false + schema: + type: string + - description: Retrieve only the requests related to the given product. + example: logs + in: query + name: product + required: false + schema: + type: string + - description: Retrieve only the requests that matches the given query. + example: service:xyz host:abc + in: query + name: query + required: false + schema: + type: string + - description: Retrieve only the requests with the given status. + example: pending + in: query + name: status + required: false + schema: + type: string + - description: Sets the page size of the search. + example: '50' + in: query + name: page_size + required: false + schema: + default: 50 + format: int64 + maximum: 50 + minimum: 1 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GetDataDeletionsResponseBody' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Internal server error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Gets a list of data deletion requests + tags: + - Data Deletion + x-menu-order: 3 + x-permission: + operator: OR + permissions: + - rum_delete_data + - logs_delete_data + x-undo: + type: safe + /api/v2/deletion/requests/{id}/cancel: + put: + description: Cancels a data deletion request by providing its ID. + operationId: CancelDataDeletionRequest + parameters: + - $ref: '#/components/parameters/RequestId' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CancelDataDeletionResponseBody' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '412': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Precondition failed error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Internal server error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Cancels a data deletion request + tags: + - Data Deletion + x-menu-order: 2 + x-permission: + operator: OR + permissions: + - rum_delete_data + - logs_delete_data + x-undo: + type: idempotent /api/v2/domain_allowlist: get: description: Get the domain allowlist for an organization. @@ -47119,6 +47536,10 @@ tags: organization.' name: Dashboard Lists +- 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. + name: Data Deletion - description: 'Configure your Datadog Email Domain Allowlist directly through the Datadog API. diff --git a/data/api/v2/full_spec_deref.json b/data/api/v2/full_spec_deref.json index 1d8e360c62a78..1cb38fb493bad 100644 --- a/data/api/v2/full_spec_deref.json +++ b/data/api/v2/full_spec_deref.json @@ -861,6 +861,15 @@ "type": "integer" } }, + "ProductName": { + "description": "Name of the product to be deleted, either `logs` or `rum`.", + "in": "path", + "name": "product", + "required": true, + "schema": { + "type": "string" + } + }, "ProjectIDPathParameter": { "description": "Project UUID", "example": "e555e290-ed65-49bd-ae18-8acbfcf18db7", @@ -880,6 +889,15 @@ "type": "string" } }, + "RequestId": { + "description": "ID of the deletion request.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, "ResourceID": { "description": "Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.", "example": "dashboard:abc-def-ghi", @@ -24304,6 +24322,174 @@ ], "type": "object" }, + "CancelDataDeletionResponseBody": { + "description": "The response from the cancel data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Case": { "description": "A case", "properties": { @@ -33555,6 +33741,339 @@ "COST_BY_ORG" ] }, + "CreateDataDeletionRequestBody": { + "description": "Object needed to create a data deletion request.", + "properties": { + "data": { + "description": "Data needed to create a data deletion request.", + "properties": { + "attributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "CreateDataDeletionRequestBodyAttributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + }, + "CreateDataDeletionRequestBodyData": { + "description": "Data needed to create a data deletion request.", + "properties": { + "attributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + } + }, + "required": [ + "attributes" + ], + "type": "object" + }, + "CreateDataDeletionResponseBody": { + "description": "The response from the create data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "CreateOpenAPIResponse": { "description": "Response for `CreateOpenAPI` operation.", "properties": { @@ -40093,6 +40612,264 @@ "HOST_TIMEBOARD" ] }, + "DataDeletionResponseItem": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "DataDeletionResponseItemAttributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "DataDeletionResponseMeta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + }, "DataScalarColumn": { "description": "A column containing the numerical results for a formula or query.", "properties": { @@ -58307,6 +59084,178 @@ "GCP_SERVICE_ACCOUNT" ] }, + "GetDataDeletionsResponseBody": { + "description": "The response from the get data deletion requests endpoint.", + "properties": { + "data": { + "description": "The list of data deletion requests that matches the query.", + "items": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "type": "array" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "GetDeviceAttributes": { "description": "The device attributes", "properties": { @@ -220656,251 +221605,1418 @@ } }, "description": "Too many requests" - } - }, - "summary": "Add Items to a Dashboard List", - "tags": [ - "Dashboard Lists" - ], - "x-codegen-request-body-name": "body", - "x-given": { - "dashboard_list_dashboard": { - "parameters": [ - { - "name": "dashboard_list_id", - "source": "dashboard_list.id" - }, - { - "name": "body", - "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ dashboard.id }}\",\n \"type\": \"custom_timeboard\"\n }\n ]\n}" - } - ], - "step": "the \"dashboard_list\" has the \"dashboard\"" - }, - "dashboard_list_screenboard_dashboard": { - "parameters": [ - { - "name": "dashboard_list_id", - "source": "dashboard_list.id" - }, - { - "name": "body", - "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ screenboard_dashboard.id }}\",\n \"type\": \"custom_screenboard\"\n }\n ]\n}" - } - ], - "step": "the \"dashboard_list\" has the \"screenboard_dashboard\"" - } - }, - "x-menu-order": 2, - "x-undo": { - "type": "safe" - } - }, - "put": { - "description": "Update dashboards of an existing dashboard list.", - "operationId": "UpdateDashboardListItems", - "parameters": [ - { - "description": "ID of the dashboard list to update items from.", - "in": "path", - "name": "dashboard_list_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "description": "Request containing the list of dashboards to update to.", - "properties": { - "dashboards": { - "description": "List of dashboards to update the dashboard list to.", - "items": { - "description": "A dashboard within a list.", - "properties": { - "id": { - "description": "ID of the dashboard.", - "example": "q5j-nti-fv6", - "type": "string" - }, - "type": { - "description": "The type of the dashboard.", - "enum": [ - "custom_timeboard", - "custom_screenboard", - "integration_screenboard", - "integration_timeboard", - "host_timeboard" - ], - "example": "host_timeboard", - "type": "string", - "x-enum-varnames": [ - "CUSTOM_TIMEBOARD", - "CUSTOM_SCREENBOARD", - "INTEGRATION_SCREENBOARD", - "INTEGRATION_TIMEBOARD", - "HOST_TIMEBOARD" - ] - } - }, - "required": [ - "type", - "id" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "New dashboards of the dashboard list.", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "description": "Response containing a list of updated dashboards.", - "properties": { - "dashboards": { - "description": "List of dashboards in the dashboard list.", - "items": { - "description": "A dashboard within a list.", - "properties": { - "id": { - "description": "ID of the dashboard.", - "example": "q5j-nti-fv6", - "readOnly": true, - "type": "string" - }, - "type": { - "description": "The type of the dashboard.", - "enum": [ - "custom_timeboard", - "custom_screenboard", - "integration_screenboard", - "integration_timeboard", - "host_timeboard" - ], - "example": "host_timeboard", - "type": "string", - "x-enum-varnames": [ - "CUSTOM_TIMEBOARD", - "CUSTOM_SCREENBOARD", - "INTEGRATION_SCREENBOARD", - "INTEGRATION_TIMEBOARD", - "HOST_TIMEBOARD" - ] - } - }, - "required": [ - "type", - "id" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" + } + }, + "summary": "Add Items to a Dashboard List", + "tags": [ + "Dashboard Lists" + ], + "x-codegen-request-body-name": "body", + "x-given": { + "dashboard_list_dashboard": { + "parameters": [ + { + "name": "dashboard_list_id", + "source": "dashboard_list.id" + }, + { + "name": "body", + "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ dashboard.id }}\",\n \"type\": \"custom_timeboard\"\n }\n ]\n}" + } + ], + "step": "the \"dashboard_list\" has the \"dashboard\"" + }, + "dashboard_list_screenboard_dashboard": { + "parameters": [ + { + "name": "dashboard_list_id", + "source": "dashboard_list.id" + }, + { + "name": "body", + "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ screenboard_dashboard.id }}\",\n \"type\": \"custom_screenboard\"\n }\n ]\n}" + } + ], + "step": "the \"dashboard_list\" has the \"screenboard_dashboard\"" + } + }, + "x-menu-order": 2, + "x-undo": { + "type": "safe" + } + }, + "put": { + "description": "Update dashboards of an existing dashboard list.", + "operationId": "UpdateDashboardListItems", + "parameters": [ + { + "description": "ID of the dashboard list to update items from.", + "in": "path", + "name": "dashboard_list_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Request containing the list of dashboards to update to.", + "properties": { + "dashboards": { + "description": "List of dashboards to update the dashboard list to.", + "items": { + "description": "A dashboard within a list.", + "properties": { + "id": { + "description": "ID of the dashboard.", + "example": "q5j-nti-fv6", + "type": "string" + }, + "type": { + "description": "The type of the dashboard.", + "enum": [ + "custom_timeboard", + "custom_screenboard", + "integration_screenboard", + "integration_timeboard", + "host_timeboard" + ], + "example": "host_timeboard", + "type": "string", + "x-enum-varnames": [ + "CUSTOM_TIMEBOARD", + "CUSTOM_SCREENBOARD", + "INTEGRATION_SCREENBOARD", + "INTEGRATION_TIMEBOARD", + "HOST_TIMEBOARD" + ] + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "New dashboards of the dashboard list.", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Response containing a list of updated dashboards.", + "properties": { + "dashboards": { + "description": "List of dashboards in the dashboard list.", + "items": { + "description": "A dashboard within a list.", + "properties": { + "id": { + "description": "ID of the dashboard.", + "example": "q5j-nti-fv6", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "The type of the dashboard.", + "enum": [ + "custom_timeboard", + "custom_screenboard", + "integration_screenboard", + "integration_timeboard", + "host_timeboard" + ], + "example": "host_timeboard", + "type": "string", + "x-enum-varnames": [ + "CUSTOM_TIMEBOARD", + "CUSTOM_SCREENBOARD", + "INTEGRATION_SCREENBOARD", + "INTEGRATION_TIMEBOARD", + "HOST_TIMEBOARD" + ] + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Not Found" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" + } + }, + "summary": "Update items of a dashboard list", + "tags": [ + "Dashboard Lists" + ], + "x-codegen-request-body-name": "body", + "x-menu-order": 3, + "x-undo": { + "type": "safe" + } + } + }, + "/api/v2/deletion/data/{product}": { + "post": { + "description": "Creates a data deletion request by providing a query and a time frame targeting the proper data.", + "operationId": "CreateDataDeletionRequest", + "parameters": [ + { + "description": "Name of the product to be deleted, either `logs` or `rum`.", + "in": "path", + "name": "product", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Object needed to create a data deletion request.", + "properties": { + "data": { + "description": "Data needed to create a data deletion request.", + "properties": { + "attributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "The response from the create data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "412": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Precondition failed error" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" + }, + "500": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Internal server error" + } + }, + "security": [ + { + "apiKeyAuth": [], + "appKeyAuth": [] + } + ], + "summary": "Creates a data deletion request", + "tags": [ + "Data Deletion" + ], + "x-given": { + "deletion_request": { + "parameters": [ + { + "name": "product", + "value": "\"logs\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"index-1\", \"index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n }\n }\n}" + } + ], + "step": "there is a valid \"deletion_request\" in the system" + } + }, + "x-menu-order": 1, + "x-permission": { + "operator": "OR", + "permissions": [ + "rum_delete_data", + "logs_delete_data" + ] + }, + "x-undo": { + "operationId": "CancelDataDeletionRequest", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + } + }, + "/api/v2/deletion/requests": { + "get": { + "description": "Gets a list of data deletion requests based on several filter parameters.", + "operationId": "GetDataDeletionRequests", + "parameters": [ + { + "description": "The next page of the previous search. If the next_page parameter is included, the rest of the query elements are ignored.", + "example": "cGFnZTI=", + "in": "query", + "name": "next_page", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve only the requests related to the given product.", + "example": "logs", + "in": "query", + "name": "product", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve only the requests that matches the given query.", + "example": "service:xyz host:abc", + "in": "query", + "name": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve only the requests with the given status.", + "example": "pending", + "in": "query", + "name": "status", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Sets the page size of the search.", + "example": "50", + "in": "query", + "name": "page_size", + "required": false, + "schema": { + "default": 50, + "format": "int64", + "maximum": 50, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "The response from the get data deletion requests endpoint.", + "properties": { + "data": { + "description": "The list of data deletion requests that matches the query.", + "items": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "type": "array" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" + }, + "500": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Internal server error" + } + }, + "security": [ + { + "apiKeyAuth": [], + "appKeyAuth": [] + } + ], + "summary": "Gets a list of data deletion requests", + "tags": [ + "Data Deletion" + ], + "x-menu-order": 3, + "x-permission": { + "operator": "OR", + "permissions": [ + "rum_delete_data", + "logs_delete_data" + ] + }, + "x-undo": { + "type": "safe" + } + } + }, + "/api/v2/deletion/requests/{id}/cancel": { + "put": { + "description": "Cancels a data deletion request by providing its ID.", + "operationId": "CancelDataDeletionRequest", + "parameters": [ + { + "description": "ID of the deletion request.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "The response from the cancel data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "412": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Precondition failed error" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" }, - "400": { - "content": { - "application/json": { - "schema": { - "description": "API error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "example": [ - "Bad Request" - ], - "items": { - "description": "A list of items.", - "example": "Bad Request", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - } - } - }, - "description": "Bad Request" - }, - "403": { - "content": { - "application/json": { - "schema": { - "description": "API error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "example": [ - "Bad Request" - ], - "items": { - "description": "A list of items.", - "example": "Bad Request", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "description": "API error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "example": [ - "Bad Request" - ], - "items": { - "description": "A list of items.", - "example": "Bad Request", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - } - } - }, - "description": "Not Found" - }, - "429": { + "500": { "content": { "application/json": { "schema": { @@ -220926,17 +223042,29 @@ } } }, - "description": "Too many requests" + "description": "Internal server error" } }, - "summary": "Update items of a dashboard list", + "security": [ + { + "apiKeyAuth": [], + "appKeyAuth": [] + } + ], + "summary": "Cancels a data deletion request", "tags": [ - "Dashboard Lists" + "Data Deletion" ], - "x-codegen-request-body-name": "body", - "x-menu-order": 3, + "x-menu-order": 2, + "x-permission": { + "operator": "OR", + "permissions": [ + "rum_delete_data", + "logs_delete_data" + ] + }, "x-undo": { - "type": "safe" + "type": "idempotent" } } }, @@ -355898,6 +358026,10 @@ "description": "Interact with your dashboard lists through the API to\norganize, find, and share all of your dashboards with your team and\norganization.", "name": "Dashboard Lists" }, + { + "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.", + "name": "Data Deletion" + }, { "description": "Configure your Datadog Email Domain Allowlist directly through the Datadog API.\nThe Email Domain Allowlist controls the domains that certain datadog emails can be sent to.\nFor more information, see the [Domain Allowlist docs page](https://docs.datadoghq.com/account_management/org_settings/domain_allowlist)", "name": "Domain Allowlist" diff --git a/data/api/v2/translate_actions.json b/data/api/v2/translate_actions.json index 11dc934e7548b..1e510725f1de4 100644 --- a/data/api/v2/translate_actions.json +++ b/data/api/v2/translate_actions.json @@ -397,6 +397,20 @@ "request_description": "New dashboards of the dashboard list.", "request_schema_description": "Request containing the list of dashboards to update to." }, + "CreateDataDeletionRequest": { + "description": "Creates a data deletion request by providing a query and a time frame targeting the proper data.", + "summary": "Creates a data deletion request", + "request_description": "", + "request_schema_description": "Object needed to create a data deletion request." + }, + "GetDataDeletionRequests": { + "description": "Gets a list of data deletion requests based on several filter parameters.", + "summary": "Gets a list of data deletion requests" + }, + "CancelDataDeletionRequest": { + "description": "Cancels a data deletion request by providing its ID.", + "summary": "Cancels a data deletion request" + }, "GetDomainAllowlist": { "description": "Get the domain allowlist for an organization.", "summary": "Get Domain Allowlist" diff --git a/data/api/v2/translate_tags.json b/data/api/v2/translate_tags.json index 5488d3ebcb695..9fd118dcd7f3f 100644 --- a/data/api/v2/translate_tags.json +++ b/data/api/v2/translate_tags.json @@ -67,6 +67,10 @@ "name": "Dashboard Lists", "description": "Interact with your dashboard lists through the API to\norganize, find, and share all of your dashboards with your team and\norganization." }, + "data-deletion": { + "name": "Data Deletion", + "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." + }, "domain-allowlist": { "name": "Domain Allowlist", "description": "Configure your Datadog Email Domain Allowlist directly through the Datadog API.\nThe Email Domain Allowlist controls the domains that certain datadog emails can be sent to.\nFor more information, see the [Domain Allowlist docs page](https://docs.datadoghq.com/account_management/org_settings/domain_allowlist)" diff --git a/static/resources/json/full_spec_v2.json b/static/resources/json/full_spec_v2.json index 1d8e360c62a78..1cb38fb493bad 100644 --- a/static/resources/json/full_spec_v2.json +++ b/static/resources/json/full_spec_v2.json @@ -861,6 +861,15 @@ "type": "integer" } }, + "ProductName": { + "description": "Name of the product to be deleted, either `logs` or `rum`.", + "in": "path", + "name": "product", + "required": true, + "schema": { + "type": "string" + } + }, "ProjectIDPathParameter": { "description": "Project UUID", "example": "e555e290-ed65-49bd-ae18-8acbfcf18db7", @@ -880,6 +889,15 @@ "type": "string" } }, + "RequestId": { + "description": "ID of the deletion request.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, "ResourceID": { "description": "Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.", "example": "dashboard:abc-def-ghi", @@ -24304,6 +24322,174 @@ ], "type": "object" }, + "CancelDataDeletionResponseBody": { + "description": "The response from the cancel data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "Case": { "description": "A case", "properties": { @@ -33555,6 +33741,339 @@ "COST_BY_ORG" ] }, + "CreateDataDeletionRequestBody": { + "description": "Object needed to create a data deletion request.", + "properties": { + "data": { + "description": "Data needed to create a data deletion request.", + "properties": { + "attributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + }, + "CreateDataDeletionRequestBodyAttributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + }, + "CreateDataDeletionRequestBodyData": { + "description": "Data needed to create a data deletion request.", + "properties": { + "attributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + } + }, + "required": [ + "attributes" + ], + "type": "object" + }, + "CreateDataDeletionResponseBody": { + "description": "The response from the create data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "CreateOpenAPIResponse": { "description": "Response for `CreateOpenAPI` operation.", "properties": { @@ -40093,6 +40612,264 @@ "HOST_TIMEBOARD" ] }, + "DataDeletionResponseItem": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "DataDeletionResponseItemAttributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "DataDeletionResponseMeta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + }, "DataScalarColumn": { "description": "A column containing the numerical results for a formula or query.", "properties": { @@ -58307,6 +59084,178 @@ "GCP_SERVICE_ACCOUNT" ] }, + "GetDataDeletionsResponseBody": { + "description": "The response from the get data deletion requests endpoint.", + "properties": { + "data": { + "description": "The list of data deletion requests that matches the query.", + "items": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "type": "array" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, "GetDeviceAttributes": { "description": "The device attributes", "properties": { @@ -220656,251 +221605,1418 @@ } }, "description": "Too many requests" - } - }, - "summary": "Add Items to a Dashboard List", - "tags": [ - "Dashboard Lists" - ], - "x-codegen-request-body-name": "body", - "x-given": { - "dashboard_list_dashboard": { - "parameters": [ - { - "name": "dashboard_list_id", - "source": "dashboard_list.id" - }, - { - "name": "body", - "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ dashboard.id }}\",\n \"type\": \"custom_timeboard\"\n }\n ]\n}" - } - ], - "step": "the \"dashboard_list\" has the \"dashboard\"" - }, - "dashboard_list_screenboard_dashboard": { - "parameters": [ - { - "name": "dashboard_list_id", - "source": "dashboard_list.id" - }, - { - "name": "body", - "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ screenboard_dashboard.id }}\",\n \"type\": \"custom_screenboard\"\n }\n ]\n}" - } - ], - "step": "the \"dashboard_list\" has the \"screenboard_dashboard\"" - } - }, - "x-menu-order": 2, - "x-undo": { - "type": "safe" - } - }, - "put": { - "description": "Update dashboards of an existing dashboard list.", - "operationId": "UpdateDashboardListItems", - "parameters": [ - { - "description": "ID of the dashboard list to update items from.", - "in": "path", - "name": "dashboard_list_id", - "required": true, - "schema": { - "format": "int64", - "type": "integer" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "description": "Request containing the list of dashboards to update to.", - "properties": { - "dashboards": { - "description": "List of dashboards to update the dashboard list to.", - "items": { - "description": "A dashboard within a list.", - "properties": { - "id": { - "description": "ID of the dashboard.", - "example": "q5j-nti-fv6", - "type": "string" - }, - "type": { - "description": "The type of the dashboard.", - "enum": [ - "custom_timeboard", - "custom_screenboard", - "integration_screenboard", - "integration_timeboard", - "host_timeboard" - ], - "example": "host_timeboard", - "type": "string", - "x-enum-varnames": [ - "CUSTOM_TIMEBOARD", - "CUSTOM_SCREENBOARD", - "INTEGRATION_SCREENBOARD", - "INTEGRATION_TIMEBOARD", - "HOST_TIMEBOARD" - ] - } - }, - "required": [ - "type", - "id" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "New dashboards of the dashboard list.", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "description": "Response containing a list of updated dashboards.", - "properties": { - "dashboards": { - "description": "List of dashboards in the dashboard list.", - "items": { - "description": "A dashboard within a list.", - "properties": { - "id": { - "description": "ID of the dashboard.", - "example": "q5j-nti-fv6", - "readOnly": true, - "type": "string" - }, - "type": { - "description": "The type of the dashboard.", - "enum": [ - "custom_timeboard", - "custom_screenboard", - "integration_screenboard", - "integration_timeboard", - "host_timeboard" - ], - "example": "host_timeboard", - "type": "string", - "x-enum-varnames": [ - "CUSTOM_TIMEBOARD", - "CUSTOM_SCREENBOARD", - "INTEGRATION_SCREENBOARD", - "INTEGRATION_TIMEBOARD", - "HOST_TIMEBOARD" - ] - } - }, - "required": [ - "type", - "id" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - } - } - }, - "description": "OK" + } + }, + "summary": "Add Items to a Dashboard List", + "tags": [ + "Dashboard Lists" + ], + "x-codegen-request-body-name": "body", + "x-given": { + "dashboard_list_dashboard": { + "parameters": [ + { + "name": "dashboard_list_id", + "source": "dashboard_list.id" + }, + { + "name": "body", + "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ dashboard.id }}\",\n \"type\": \"custom_timeboard\"\n }\n ]\n}" + } + ], + "step": "the \"dashboard_list\" has the \"dashboard\"" + }, + "dashboard_list_screenboard_dashboard": { + "parameters": [ + { + "name": "dashboard_list_id", + "source": "dashboard_list.id" + }, + { + "name": "body", + "value": "{\n \"dashboards\": [\n {\n \"id\": \"{{ screenboard_dashboard.id }}\",\n \"type\": \"custom_screenboard\"\n }\n ]\n}" + } + ], + "step": "the \"dashboard_list\" has the \"screenboard_dashboard\"" + } + }, + "x-menu-order": 2, + "x-undo": { + "type": "safe" + } + }, + "put": { + "description": "Update dashboards of an existing dashboard list.", + "operationId": "UpdateDashboardListItems", + "parameters": [ + { + "description": "ID of the dashboard list to update items from.", + "in": "path", + "name": "dashboard_list_id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Request containing the list of dashboards to update to.", + "properties": { + "dashboards": { + "description": "List of dashboards to update the dashboard list to.", + "items": { + "description": "A dashboard within a list.", + "properties": { + "id": { + "description": "ID of the dashboard.", + "example": "q5j-nti-fv6", + "type": "string" + }, + "type": { + "description": "The type of the dashboard.", + "enum": [ + "custom_timeboard", + "custom_screenboard", + "integration_screenboard", + "integration_timeboard", + "host_timeboard" + ], + "example": "host_timeboard", + "type": "string", + "x-enum-varnames": [ + "CUSTOM_TIMEBOARD", + "CUSTOM_SCREENBOARD", + "INTEGRATION_SCREENBOARD", + "INTEGRATION_TIMEBOARD", + "HOST_TIMEBOARD" + ] + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "New dashboards of the dashboard list.", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Response containing a list of updated dashboards.", + "properties": { + "dashboards": { + "description": "List of dashboards in the dashboard list.", + "items": { + "description": "A dashboard within a list.", + "properties": { + "id": { + "description": "ID of the dashboard.", + "example": "q5j-nti-fv6", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "The type of the dashboard.", + "enum": [ + "custom_timeboard", + "custom_screenboard", + "integration_screenboard", + "integration_timeboard", + "host_timeboard" + ], + "example": "host_timeboard", + "type": "string", + "x-enum-varnames": [ + "CUSTOM_TIMEBOARD", + "CUSTOM_SCREENBOARD", + "INTEGRATION_SCREENBOARD", + "INTEGRATION_TIMEBOARD", + "HOST_TIMEBOARD" + ] + } + }, + "required": [ + "type", + "id" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "404": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Not Found" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" + } + }, + "summary": "Update items of a dashboard list", + "tags": [ + "Dashboard Lists" + ], + "x-codegen-request-body-name": "body", + "x-menu-order": 3, + "x-undo": { + "type": "safe" + } + } + }, + "/api/v2/deletion/data/{product}": { + "post": { + "description": "Creates a data deletion request by providing a query and a time frame targeting the proper data.", + "operationId": "CreateDataDeletionRequest", + "parameters": [ + { + "description": "Name of the product to be deleted, either `logs` or `rum`.", + "in": "path", + "name": "product", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "Object needed to create a data deletion request.", + "properties": { + "data": { + "description": "Data needed to create a data deletion request.", + "properties": { + "attributes": { + "description": "Attributes for creating a data deletion request.", + "properties": { + "from": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "query": { + "additionalProperties": { + "type": "string" + }, + "description": "Query for creating a data deletion request.", + "example": { + "host": "abc", + "service": "xyz" + }, + "type": "object" + }, + "to": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + } + }, + "required": [ + "query", + "from", + "to" + ], + "type": "object" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "The response from the create data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "412": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Precondition failed error" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" + }, + "500": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Internal server error" + } + }, + "security": [ + { + "apiKeyAuth": [], + "appKeyAuth": [] + } + ], + "summary": "Creates a data deletion request", + "tags": [ + "Data Deletion" + ], + "x-given": { + "deletion_request": { + "parameters": [ + { + "name": "product", + "value": "\"logs\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"from\": 1672527600000,\n \"to\": 1704063600000,\n \"indexes\": [\"index-1\", \"index-2\"],\n \"query\": {\"host\": \"abc\", \"service\": \"xyz\"}\n }\n }\n}" + } + ], + "step": "there is a valid \"deletion_request\" in the system" + } + }, + "x-menu-order": 1, + "x-permission": { + "operator": "OR", + "permissions": [ + "rum_delete_data", + "logs_delete_data" + ] + }, + "x-undo": { + "operationId": "CancelDataDeletionRequest", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + } + }, + "/api/v2/deletion/requests": { + "get": { + "description": "Gets a list of data deletion requests based on several filter parameters.", + "operationId": "GetDataDeletionRequests", + "parameters": [ + { + "description": "The next page of the previous search. If the next_page parameter is included, the rest of the query elements are ignored.", + "example": "cGFnZTI=", + "in": "query", + "name": "next_page", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve only the requests related to the given product.", + "example": "logs", + "in": "query", + "name": "product", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve only the requests that matches the given query.", + "example": "service:xyz host:abc", + "in": "query", + "name": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Retrieve only the requests with the given status.", + "example": "pending", + "in": "query", + "name": "status", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Sets the page size of the search.", + "example": "50", + "in": "query", + "name": "page_size", + "required": false, + "schema": { + "default": 50, + "format": "int64", + "maximum": 50, + "minimum": 1, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "The response from the get data deletion requests endpoint.", + "properties": { + "data": { + "description": "The list of data deletion requests that matches the query.", + "items": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "type": "array" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" + }, + "500": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Internal server error" + } + }, + "security": [ + { + "apiKeyAuth": [], + "appKeyAuth": [] + } + ], + "summary": "Gets a list of data deletion requests", + "tags": [ + "Data Deletion" + ], + "x-menu-order": 3, + "x-permission": { + "operator": "OR", + "permissions": [ + "rum_delete_data", + "logs_delete_data" + ] + }, + "x-undo": { + "type": "safe" + } + } + }, + "/api/v2/deletion/requests/{id}/cancel": { + "put": { + "description": "Cancels a data deletion request by providing its ID.", + "operationId": "CancelDataDeletionRequest", + "parameters": [ + { + "description": "ID of the deletion request.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "The response from the cancel data deletion request endpoint.", + "properties": { + "data": { + "description": "The created data deletion request information.", + "properties": { + "attributes": { + "description": "Deletion attribute for data deletion response.", + "properties": { + "created_at": { + "description": "Creation time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + }, + "created_by": { + "description": "User who created the deletion request.", + "example": "test.user@datadoghq.com", + "type": "string" + }, + "from_time": { + "description": "Start of requested time window, milliseconds since Unix epoch.", + "example": 1672527600000, + "format": "int64", + "type": "integer" + }, + "indexes": { + "description": "List of indexes for the search. If not provided, the search is performed in all indexes.", + "example": [ + "index-1", + "index-2" + ], + "items": { + "description": "Individual index.", + "type": "string" + }, + "type": "array" + }, + "is_created": { + "description": "Whether the deletion request is fully created or not.", + "example": true, + "type": "boolean" + }, + "org_id": { + "description": "Organization ID.", + "example": 321813, + "format": "int64", + "type": "integer" + }, + "product": { + "description": "Product name.", + "example": "logs", + "type": "string" + }, + "query": { + "description": "Query for creating a data deletion request.", + "example": "service:xyz host:abc", + "type": "string" + }, + "starting_at": { + "description": "Starting time of the process to delete the requested data.", + "example": "2024-01-01T02:00:00.000000Z", + "type": "string" + }, + "status": { + "description": "Status of the deletion request.", + "example": "pending", + "type": "string" + }, + "to_time": { + "description": "End of requested time window, milliseconds since Unix epoch.", + "example": 1704063600000, + "format": "int64", + "type": "integer" + }, + "total_unrestricted": { + "description": "Total number of elements to be deleted. Only the data accessible to the current user that matches the query and timeframe provided will be deleted.", + "example": 100, + "format": "int64", + "type": "integer" + }, + "updated_at": { + "description": "Update time of the deletion request.", + "example": "2024-01-01T00:00:00.000000Z", + "type": "string" + } + }, + "required": [ + "created_at", + "created_by", + "from_time", + "is_created", + "org_id", + "product", + "query", + "starting_at", + "status", + "to_time", + "total_unrestricted", + "updated_at" + ], + "type": "object" + }, + "id": { + "description": "The ID of the created data deletion request.", + "example": "1", + "type": "string" + }, + "type": { + "description": "The type of the request created.", + "example": "deletion_request", + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes" + ], + "type": "object" + }, + "meta": { + "description": "The metadata of the data deletion response.", + "properties": { + "count_product": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by product.", + "example": { + "logs": 8, + "rum": 7 + }, + "type": "object" + }, + "count_status": { + "additionalProperties": { + "format": "int64", + "type": "integer" + }, + "description": "The total deletion requests created by status.", + "example": { + "completed": 10, + "pending": 5 + }, + "type": "object" + }, + "next_page": { + "description": "The next page when searching deletion requests created in the current organization.", + "example": "cGFnZTI=", + "type": "string" + }, + "product": { + "description": "The product of the deletion request.", + "example": "logs", + "type": "string" + }, + "request_status": { + "description": "The status of the executed request.", + "example": "canceled", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "OK" + }, + "400": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Bad Request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Forbidden" + }, + "412": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Precondition failed error" + }, + "429": { + "content": { + "application/json": { + "schema": { + "description": "API error response.", + "properties": { + "errors": { + "description": "A list of errors.", + "example": [ + "Bad Request" + ], + "items": { + "description": "A list of items.", + "example": "Bad Request", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "errors" + ], + "type": "object" + } + } + }, + "description": "Too many requests" }, - "400": { - "content": { - "application/json": { - "schema": { - "description": "API error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "example": [ - "Bad Request" - ], - "items": { - "description": "A list of items.", - "example": "Bad Request", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - } - } - }, - "description": "Bad Request" - }, - "403": { - "content": { - "application/json": { - "schema": { - "description": "API error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "example": [ - "Bad Request" - ], - "items": { - "description": "A list of items.", - "example": "Bad Request", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - } - } - }, - "description": "Forbidden" - }, - "404": { - "content": { - "application/json": { - "schema": { - "description": "API error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "example": [ - "Bad Request" - ], - "items": { - "description": "A list of items.", - "example": "Bad Request", - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - } - } - }, - "description": "Not Found" - }, - "429": { + "500": { "content": { "application/json": { "schema": { @@ -220926,17 +223042,29 @@ } } }, - "description": "Too many requests" + "description": "Internal server error" } }, - "summary": "Update items of a dashboard list", + "security": [ + { + "apiKeyAuth": [], + "appKeyAuth": [] + } + ], + "summary": "Cancels a data deletion request", "tags": [ - "Dashboard Lists" + "Data Deletion" ], - "x-codegen-request-body-name": "body", - "x-menu-order": 3, + "x-menu-order": 2, + "x-permission": { + "operator": "OR", + "permissions": [ + "rum_delete_data", + "logs_delete_data" + ] + }, "x-undo": { - "type": "safe" + "type": "idempotent" } } }, @@ -355898,6 +358026,10 @@ "description": "Interact with your dashboard lists through the API to\norganize, find, and share all of your dashboards with your team and\norganization.", "name": "Dashboard Lists" }, + { + "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.", + "name": "Data Deletion" + }, { "description": "Configure your Datadog Email Domain Allowlist directly through the Datadog API.\nThe Email Domain Allowlist controls the domains that certain datadog emails can be sent to.\nFor more information, see the [Domain Allowlist docs page](https://docs.datadoghq.com/account_management/org_settings/domain_allowlist)", "name": "Domain Allowlist"