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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "ab8171f",
"generated": "2025-07-31 17:35:11.690"
"spec_repo_commit": "672a533",
"generated": "2025-07-31 18:09:11.566"
}
118 changes: 84 additions & 34 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13145,31 +13145,33 @@ components:
required:
- type
type: object
Dataset:
description: "Dataset object.\n\n### Datasets Constraints\n- **Tag Limit per
Dataset**:\n - Each restricted dataset supports a maximum of 10 key:value
pairs per product.\n\n- **Tag Key Rules per Telemetry Type**:\n - Only one
tag key or attribute may be used to define access within a single telemetry
type.\n - The same or different tag key may be used across different telemetry
types.\n\n- **Tag Value Uniqueness**:\n - Tag values must be unique within
a single dataset.\n - A tag value used in one dataset cannot be reused in
another dataset of the same telemetry type."
DatasetAttributesRequest:
description: Dataset metadata and configurations.
properties:
attributes:
$ref: '#/components/schemas/DatasetAttributes'
id:
description: Unique identifier for the dataset.
example: 123e4567-e89b-12d3-a456-426614174000
type: string
type:
description: Resource type, always "dataset".
example: dataset
name:
description: Name of the dataset.
example: Security Audit Dataset
type: string
principals:
description: List of access principals, formatted as `principal_type:id`.
Principal can be 'team' or 'role'.
example:
- role:94172442-be03-11e9-a77a-3b7612558ac1
items:
example: role:94172442-be03-11e9-a77a-3b7612558ac1
type: string
type: array
product_filters:
description: List of product-specific filters.
items:
$ref: '#/components/schemas/FiltersPerProduct'
type: array
required:
- type
- attributes
- name
- product_filters
- principals
type: object
DatasetAttributes:
DatasetAttributesResponse:
description: Dataset metadata and configuration(s).
properties:
created_at:
Expand Down Expand Up @@ -13199,43 +13201,76 @@ components:
items:
$ref: '#/components/schemas/FiltersPerProduct'
type: array
required:
- name
- product_filters
- principals
type: object
DatasetCreateRequest:
description: Create request for a dataset.
properties:
data:
$ref: '#/components/schemas/Dataset'
$ref: '#/components/schemas/DatasetRequest'
required:
- data
type: object
DatasetRequest:
description: "**Datasets Object Constraints**\n- **Tag limit per dataset**:\n
\ - Each restricted dataset supports a maximum of 10 key:value pairs per product.\n\n-
**Tag key rules per telemetry type**:\n - Only one tag key or attribute may
be used to define access within a single telemetry type.\n - The same or
different tag key may be used across different telemetry types.\n\n- **Tag
value uniqueness**:\n - Tag values must be unique within a single dataset.\n
\ - A tag value used in one dataset cannot be reused in another dataset of
the same telemetry type."
properties:
attributes:
$ref: '#/components/schemas/DatasetAttributesRequest'
type:
description: Resource type, always "dataset".
example: dataset
type: string
required:
- type
- attributes
type: object
DatasetResponse:
description: "**Datasets Object Constraints**\n- **Tag Limit per Dataset**:\n
\ - Each restricted dataset supports a maximum of 10 key:value pairs per product.\n\n-
**Tag Key Rules per Telemetry Type**:\n - Only one tag key or attribute may
be used to define access within a single telemetry type.\n - The same or
different tag key may be used across different telemetry types.\n\n- **Tag
Value Uniqueness**:\n - Tag values must be unique within a single dataset.\n
\ - A tag value used in one dataset cannot be reused in another dataset of
the same telemetry type."
properties:
attributes:
$ref: '#/components/schemas/DatasetAttributesResponse'
id:
description: Unique identifier for the dataset.
example: 123e4567-e89b-12d3-a456-426614174000
type: string
type:
description: Resource type, always "dataset".
example: dataset
type: string
type: object
DatasetResponseMulti:
description: Response containing a list of datasets.
properties:
data:
description: The list of datasets returned in response.
items:
$ref: '#/components/schemas/Dataset'
$ref: '#/components/schemas/DatasetResponse'
type: array
required:
- data
type: object
DatasetResponseSingle:
description: Response containing a single dataset object.
properties:
data:
$ref: '#/components/schemas/Dataset'
required:
- data
$ref: '#/components/schemas/DatasetResponse'
type: object
DatasetUpdateRequest:
description: Edit request for a dataset.
properties:
data:
$ref: '#/components/schemas/Dataset'
$ref: '#/components/schemas/DatasetRequest'
required:
- data
type: object
Expand Down Expand Up @@ -49913,6 +49948,9 @@ paths:
operator: OR
permissions:
- user_access_read
x-unstable: '**Note: Data Access is in preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).**'
post:
description: Create a dataset with the configurations in the request.
operationId: CreateDataset
Expand All @@ -49924,7 +49962,7 @@ paths:
attributes:
name: Test RUM Dataset
principals:
- role:23bacb30-1c59-11f0-a596-da7ad0900002
- role:94172442-be03-11e9-a77a-3b7612558ac1
product_filters:
- filters:
- '@application.id:application_123'
Expand Down Expand Up @@ -49962,6 +50000,9 @@ paths:
operator: OR
permissions:
- user_access_manage
x-unstable: '**Note: Data Access is in preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).**'
/api/v2/datasets/{dataset_id}:
delete:
description: Deletes the dataset associated with the ID.
Expand Down Expand Up @@ -49989,6 +50030,9 @@ paths:
x-permission:
operator: OPEN
permissions: []
x-unstable: '**Note: Data Access is in preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).**'
get:
description: Retrieves the dataset associated with the ID.
operationId: GetDataset
Expand Down Expand Up @@ -50019,6 +50063,9 @@ paths:
x-permission:
operator: OPEN
permissions: []
x-unstable: '**Note: Data Access is in preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).**'
put:
description: Edits the dataset associated with the ID.
operationId: UpdateDataset
Expand Down Expand Up @@ -50057,6 +50104,9 @@ paths:
x-permission:
operator: OPEN
permissions: []
x-unstable: '**Note: Data Access is in preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).**'
/api/v2/deletion/data/{product}:
post:
description: Creates a data deletion request by providing a query and a timeframe
Expand Down
15 changes: 7 additions & 8 deletions examples/v2/datasets/CreateDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,34 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DatasetsApi;
import com.datadog.api.client.v2.model.Dataset;
import com.datadog.api.client.v2.model.DatasetAttributes;
import com.datadog.api.client.v2.model.DatasetAttributesRequest;
import com.datadog.api.client.v2.model.DatasetCreateRequest;
import com.datadog.api.client.v2.model.DatasetRequest;
import com.datadog.api.client.v2.model.DatasetResponseSingle;
import com.datadog.api.client.v2.model.FiltersPerProduct;
import java.util.Collections;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createDataset", true);
DatasetsApi apiInstance = new DatasetsApi(defaultClient);

DatasetCreateRequest body =
new DatasetCreateRequest()
.data(
new Dataset()
new DatasetRequest()
.attributes(
new DatasetAttributes()
.createdAt(null)
new DatasetAttributesRequest()
.name("Security Audit Dataset")
.principals(
Collections.singletonList(
"role:86245fce-0a4e-11f0-92bd-da7ad0900002"))
"role:94172442-be03-11e9-a77a-3b7612558ac1"))
.productFilters(
Collections.singletonList(
new FiltersPerProduct()
.filters(Collections.singletonList("@application.id:ABCD"))
.product("logs"))))
.id("123e4567-e89b-12d3-a456-426614174000")
.product("metrics"))))
.type("dataset"));

try {
Expand Down
6 changes: 5 additions & 1 deletion examples/v2/datasets/DeleteDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteDataset", true);
DatasetsApi apiInstance = new DatasetsApi(defaultClient);

// there is a valid "dataset" in the system
String DATASET_DATA_ID = System.getenv("DATASET_DATA_ID");

try {
apiInstance.deleteDataset("dataset_id");
apiInstance.deleteDataset(DATASET_DATA_ID);
} catch (ApiException e) {
System.err.println("Exception when calling DatasetsApi#deleteDataset");
System.err.println("Status code: " + e.getCode());
Expand Down
1 change: 1 addition & 0 deletions examples/v2/datasets/GetAllDatasets.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getAllDatasets", true);
DatasetsApi apiInstance = new DatasetsApi(defaultClient);

try {
Expand Down
6 changes: 5 additions & 1 deletion examples/v2/datasets/GetDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getDataset", true);
DatasetsApi apiInstance = new DatasetsApi(defaultClient);

// there is a valid "dataset" in the system
String DATASET_DATA_ID = System.getenv("DATASET_DATA_ID");

try {
DatasetResponseSingle result = apiInstance.getDataset("dataset_id");
DatasetResponseSingle result = apiInstance.getDataset(DATASET_DATA_ID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DatasetsApi#getDataset");
Expand Down
22 changes: 12 additions & 10 deletions examples/v2/datasets/UpdateDataset.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DatasetsApi;
import com.datadog.api.client.v2.model.Dataset;
import com.datadog.api.client.v2.model.DatasetAttributes;
import com.datadog.api.client.v2.model.DatasetAttributesRequest;
import com.datadog.api.client.v2.model.DatasetRequest;
import com.datadog.api.client.v2.model.DatasetResponseSingle;
import com.datadog.api.client.v2.model.DatasetUpdateRequest;
import com.datadog.api.client.v2.model.FiltersPerProduct;
Expand All @@ -13,29 +13,31 @@
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.updateDataset", true);
DatasetsApi apiInstance = new DatasetsApi(defaultClient);

// there is a valid "dataset" in the system
String DATASET_DATA_ID = System.getenv("DATASET_DATA_ID");

DatasetUpdateRequest body =
new DatasetUpdateRequest()
.data(
new Dataset()
new DatasetRequest()
.attributes(
new DatasetAttributes()
.createdAt(null)
new DatasetAttributesRequest()
.name("Security Audit Dataset")
.principals(
Collections.singletonList(
"role:86245fce-0a4e-11f0-92bd-da7ad0900002"))
"role:94172442-be03-11e9-a77a-3b7612558ac1"))
.productFilters(
Collections.singletonList(
new FiltersPerProduct()
.filters(Collections.singletonList("@application.id:ABCD"))
.product("logs"))))
.id("123e4567-e89b-12d3-a456-426614174000")
.filters(Collections.singletonList("@application.id:1234"))
.product("metrics"))))
.type("dataset"));

try {
DatasetResponseSingle result = apiInstance.updateDataset("dataset_id", body);
DatasetResponseSingle result = apiInstance.updateDataset(DATASET_DATA_ID, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DatasetsApi#updateDataset");
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,11 @@ public class ApiClient {
put("v2.listVulnerableAssets", false);
put("v2.muteFindings", false);
put("v2.runHistoricalJob", false);
put("v2.createDataset", false);
put("v2.deleteDataset", false);
put("v2.getAllDatasets", false);
put("v2.getDataset", false);
put("v2.updateDataset", false);
put("v2.cancelDataDeletionRequest", false);
put("v2.createDataDeletionRequest", false);
put("v2.getDataDeletionRequests", false);
Expand Down
Loading