Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 42 additions & 15 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ components:
example: "-created_at"
type: string
ProductName:
description: Name of the product to be deleted, either `logs` or `rum`.
description: Name of the product to be deleted. Only `logs` is supported.
in: path
name: product
required: true
Expand Down Expand Up @@ -24351,6 +24351,12 @@ components:
CreateDataDeletionRequestBodyAttributes:
description: Attributes for creating a data deletion request.
properties:
displayed_total:
description: Total number of elements to be deleted as displayed to the user.
example: 100
format: int64
minimum: 1
type: integer
from:
description: Start of requested time window, milliseconds since Unix epoch.
example: 1672527600000
Expand Down Expand Up @@ -24378,6 +24384,7 @@ components:
- query
- from
- to
- displayed_total
type: object
CreateDataDeletionRequestBodyData:
description: Data needed to create a data deletion request.
Expand Down Expand Up @@ -30968,6 +30975,19 @@ components:
description: User who created the deletion request.
example: "test.user@datadoghq.com"
type: string
customer_message:
description: A message for the customer regarding the deletion request, if any.
example: "Your deletion request is being processed."
type: string
displayed_total:
description: Total number of elements to be deleted as displayed to the user.
example: 100
format: int64
type: integer
error_category:
description: The category of the error for the deletion request, if any.
example: "validation_error"
type: string
from_time:
description: Start of requested time window, milliseconds since Unix epoch.
example: 1672527600000
Expand Down Expand Up @@ -31031,6 +31051,7 @@ components:
- status
- to_time
- total_unrestricted
- displayed_total
- updated_at
type: object
DataDeletionResponseMeta:
Expand All @@ -31041,7 +31062,7 @@ components:
format: int64
type: integer
description: The total deletion requests created by product.
example: {"logs": 8, "rum": 7}
example: {"logs": 8}
type: object
count_status:
additionalProperties:
Expand Down Expand Up @@ -143031,6 +143052,21 @@ paths:
requestBody:
content:
application/json:
examples:
default:
value:
data:
attributes:
displayed_total: 100
from: 1672527600000
indexes:
- test-index
- test-index-2
query:
host: abc
service: xyz
to: 1704063600000
type: create_deletion_req
schema:
$ref: "#/components/schemas/CreateDataDeletionRequestBody"
required: true
Expand All @@ -143045,6 +143081,7 @@ paths:
attributes:
created_at: "2024-01-01T00:00:00.000000Z"
created_by: test@example.com
displayed_total: 100
from_time: 1672527600000
is_created: true
org_id: 123
Expand Down Expand Up @@ -143090,11 +143127,7 @@ paths:
x-permission:
operator: OR
permissions:
- rum_delete_data
- logs_delete_data
x-unstable: |-
**Note**: This endpoint is in Preview. If you have any feedback,
contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/deletion/requests:
get:
description: Gets a list of data deletion requests based on several filter parameters.
Expand Down Expand Up @@ -143151,6 +143184,7 @@ paths:
- attributes:
created_at: "2024-01-01T00:00:00.000000Z"
created_by: test@example.com
displayed_total: 100
from_time: 1672527600000
is_created: true
org_id: 123
Expand Down Expand Up @@ -143190,11 +143224,7 @@ paths:
x-permission:
operator: OR
permissions:
- rum_delete_data
- logs_delete_data
x-unstable: |-
**Note**: This endpoint is in Preview. If you have any feedback,
contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/deletion/requests/{id}/cancel:
put:
description: Cancels a data deletion request by providing its ID.
Expand All @@ -143212,6 +143242,7 @@ paths:
attributes:
created_at: "2024-01-01T00:00:00.000000Z"
created_by: test@example.com
displayed_total: 100
from_time: 1672527600000
is_created: true
org_id: 123
Expand Down Expand Up @@ -143257,11 +143288,7 @@ paths:
x-permission:
operator: OR
permissions:
- rum_delete_data
- logs_delete_data
x-unstable: |-
**Note**: This endpoint is in Preview. If you have any feedback,
contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/deployment_gates:
get:
description: |-
Expand Down Expand Up @@ -218181,7 +218208,7 @@ tags:
information.
name: Dashboards
- description: |-
The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively.
The Data Deletion API allows the user to target and delete data from the allowed products. It's enabled for Logs and depends on the `logs_delete_data` permission.
name: Data Deletion
- description: Manage and run data observability monitors.
name: Data Observability
Expand Down
1 change: 0 additions & 1 deletion examples/v2/data-deletion/CancelDataDeletionRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.cancelDataDeletionRequest", true);
DataDeletionApi apiInstance = new DataDeletionApi(defaultClient);

// there is a valid "deletion_request" in the system
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/data-deletion/CreateDataDeletionRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createDataDeletionRequest", true);
DataDeletionApi apiInstance = new DataDeletionApi(defaultClient);

CreateDataDeletionRequestBody body =
Expand All @@ -23,6 +22,7 @@ public static void main(String[] args) {
new CreateDataDeletionRequestBodyData()
.attributes(
new CreateDataDeletionRequestBodyAttributes()
.displayedTotal(100L)
.from(1672527600000L)
.indexes(Arrays.asList("test-index", "test-index-2"))
.query(
Expand Down
1 change: 0 additions & 1 deletion examples/v2/data-deletion/GetDataDeletionRequests.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getDataDeletionRequests", true);
DataDeletionApi apiInstance = new DataDeletionApi(defaultClient);

try {
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1080,9 +1080,6 @@ public class ApiClient {
put("v2.getAllDatasets", false);
put("v2.getDataset", false);
put("v2.updateDataset", false);
put("v2.cancelDataDeletionRequest", false);
put("v2.createDataDeletionRequest", false);
put("v2.getDataDeletionRequests", false);
put("v2.createDeploymentGate", false);
put("v2.createDeploymentRule", false);
put("v2.deleteDeploymentGate", false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ public CompletableFuture<CancelDataDeletionResponseBody> cancelDataDeletionReque
*/
public ApiResponse<CancelDataDeletionResponseBody> cancelDataDeletionRequestWithHttpInfo(
String id) throws ApiException {
// Check if unstable operation is enabled
String operationId = "cancelDataDeletionRequest";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;

// verify the required parameter 'id' is set
Expand Down Expand Up @@ -148,17 +141,6 @@ public ApiResponse<CancelDataDeletionResponseBody> cancelDataDeletionRequestWith
*/
public CompletableFuture<ApiResponse<CancelDataDeletionResponseBody>>
cancelDataDeletionRequestWithHttpInfoAsync(String id) {
// Check if unstable operation is enabled
String operationId = "cancelDataDeletionRequest";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<CancelDataDeletionResponseBody>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;

// verify the required parameter 'id' is set
Expand Down Expand Up @@ -210,7 +192,7 @@ public ApiResponse<CancelDataDeletionResponseBody> cancelDataDeletionRequestWith
*
* <p>See {@link #createDataDeletionRequestWithHttpInfo}.
*
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
* (required)
* @param body (required)
* @return CreateDataDeletionResponseBody
Expand All @@ -226,7 +208,7 @@ public CreateDataDeletionResponseBody createDataDeletionRequest(
*
* <p>See {@link #createDataDeletionRequestWithHttpInfoAsync}.
*
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
* (required)
* @param body (required)
* @return CompletableFuture&lt;CreateDataDeletionResponseBody&gt;
Expand All @@ -243,7 +225,7 @@ public CompletableFuture<CreateDataDeletionResponseBody> createDataDeletionReque
/**
* Creates a data deletion request by providing a query and a timeframe targeting the proper data.
*
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
* (required)
* @param body (required)
* @return ApiResponse&lt;CreateDataDeletionResponseBody&gt;
Expand All @@ -262,13 +244,6 @@ public CompletableFuture<CreateDataDeletionResponseBody> createDataDeletionReque
*/
public ApiResponse<CreateDataDeletionResponseBody> createDataDeletionRequestWithHttpInfo(
String product, CreateDataDeletionRequestBody body) throws ApiException {
// Check if unstable operation is enabled
String operationId = "createDataDeletionRequest";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = body;

// verify the required parameter 'product' is set
Expand Down Expand Up @@ -314,25 +289,14 @@ public ApiResponse<CreateDataDeletionResponseBody> createDataDeletionRequestWith
*
* <p>See {@link #createDataDeletionRequestWithHttpInfo}.
*
* @param product Name of the product to be deleted, either <code>logs</code> or <code>rum</code>.
* @param product Name of the product to be deleted. Only <code>logs</code> is supported.
* (required)
* @param body (required)
* @return CompletableFuture&lt;ApiResponse&lt;CreateDataDeletionResponseBody&gt;&gt;
*/
public CompletableFuture<ApiResponse<CreateDataDeletionResponseBody>>
createDataDeletionRequestWithHttpInfoAsync(
String product, CreateDataDeletionRequestBody body) {
// Check if unstable operation is enabled
String operationId = "createDataDeletionRequest";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<CreateDataDeletionResponseBody>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = body;

// verify the required parameter 'product' is set
Expand Down Expand Up @@ -533,13 +497,6 @@ public CompletableFuture<GetDataDeletionsResponseBody> getDataDeletionRequestsAs
*/
public ApiResponse<GetDataDeletionsResponseBody> getDataDeletionRequestsWithHttpInfo(
GetDataDeletionRequestsOptionalParameters parameters) throws ApiException {
// Check if unstable operation is enabled
String operationId = "getDataDeletionRequests";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId));
}
Object localVarPostBody = null;
String nextPage = parameters.nextPage;
String product = parameters.product;
Expand Down Expand Up @@ -589,17 +546,6 @@ public ApiResponse<GetDataDeletionsResponseBody> getDataDeletionRequestsWithHttp
public CompletableFuture<ApiResponse<GetDataDeletionsResponseBody>>
getDataDeletionRequestsWithHttpInfoAsync(
GetDataDeletionRequestsOptionalParameters parameters) {
// Check if unstable operation is enabled
String operationId = "getDataDeletionRequests";
if (apiClient.isUnstableOperationEnabled("v2." + operationId)) {
apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId));
} else {
CompletableFuture<ApiResponse<GetDataDeletionsResponseBody>> result =
new CompletableFuture<>();
result.completeExceptionally(
new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)));
return result;
}
Object localVarPostBody = null;
String nextPage = parameters.nextPage;
String product = parameters.product;
Expand Down
Loading
Loading