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:13.885"
"spec_repo_commit": "672a533",
"generated": "2025-07-31 18:09:12.434"
}
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
5 changes: 5 additions & 0 deletions api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,11 @@ func NewConfiguration() *Configuration {
"v2.ListVulnerableAssets": false,
"v2.MuteFindings": false,
"v2.RunHistoricalJob": false,
"v2.CreateDataset": false,
"v2.DeleteDataset": false,
"v2.GetAllDatasets": false,
"v2.GetDataset": false,
"v2.UpdateDataset": false,
"v2.CancelDataDeletionRequest": false,
"v2.CreateDataDeletionRequest": false,
"v2.GetDataDeletionRequests": false,
Expand Down
47 changes: 47 additions & 0 deletions api/datadogV2/api_datasets.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package datadogV2

import (
_context "context"
_fmt "fmt"
_log "log"
_nethttp "net/http"
_neturl "net/url"

Expand All @@ -24,6 +26,15 @@ func (a *DatasetsApi) CreateDataset(ctx _context.Context, body DatasetCreateRequ
localVarReturnValue DatasetResponseSingle
)

operationId := "v2.CreateDataset"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.DatasetsApi.CreateDataset")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -103,6 +114,15 @@ func (a *DatasetsApi) DeleteDataset(ctx _context.Context, datasetId string) (*_n
localVarPostBody interface{}
)

operationId := "v2.DeleteDataset"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.DatasetsApi.DeleteDataset")
if err != nil {
return nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -172,6 +192,15 @@ func (a *DatasetsApi) GetAllDatasets(ctx _context.Context) (DatasetResponseMulti
localVarReturnValue DatasetResponseMulti
)

operationId := "v2.GetAllDatasets"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.DatasetsApi.GetAllDatasets")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -249,6 +278,15 @@ func (a *DatasetsApi) GetDataset(ctx _context.Context, datasetId string) (Datase
localVarReturnValue DatasetResponseSingle
)

operationId := "v2.GetDataset"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.DatasetsApi.GetDataset")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -327,6 +365,15 @@ func (a *DatasetsApi) UpdateDataset(ctx _context.Context, datasetId string, body
localVarReturnValue DatasetResponseSingle
)

operationId := "v2.UpdateDataset"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.DatasetsApi.UpdateDataset")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down
Loading
Loading