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:34:02.923"
"spec_repo_commit": "672a533",
"generated": "2025-07-31 18:08:32.981"
}
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
26 changes: 20 additions & 6 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5247,17 +5247,17 @@ datadog\_api\_client.v2.model.datadog\_integration\_update module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dataset module
--------------------------------------------
datadog\_api\_client.v2.model.dataset\_attributes\_request module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dataset
.. automodule:: datadog_api_client.v2.model.dataset_attributes_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dataset\_attributes module
--------------------------------------------------------
datadog\_api\_client.v2.model.dataset\_attributes\_response module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dataset_attributes
.. automodule:: datadog_api_client.v2.model.dataset_attributes_response
:members:
:show-inheritance:

Expand All @@ -5268,6 +5268,20 @@ datadog\_api\_client.v2.model.dataset\_create\_request module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dataset\_request module
-----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dataset_request
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dataset\_response module
------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dataset_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dataset\_response\_multi module
-------------------------------------------------------------

Expand Down
15 changes: 7 additions & 8 deletions examples/v2/datasets/CreateDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,33 @@

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.datasets_api import DatasetsApi
from datadog_api_client.v2.model.dataset import Dataset
from datadog_api_client.v2.model.dataset_attributes import DatasetAttributes
from datadog_api_client.v2.model.dataset_attributes_request import DatasetAttributesRequest
from datadog_api_client.v2.model.dataset_create_request import DatasetCreateRequest
from datadog_api_client.v2.model.dataset_request import DatasetRequest
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct

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

configuration = Configuration()
configuration.unstable_operations["create_dataset"] = True
with ApiClient(configuration) as api_client:
api_instance = DatasetsApi(api_client)
response = api_instance.create_dataset(body=body)
Expand Down
7 changes: 6 additions & 1 deletion examples/v2/datasets/DeleteDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@
Delete a dataset returns "No Content" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.datasets_api import DatasetsApi

# there is a valid "dataset" in the system
DATASET_DATA_ID = environ["DATASET_DATA_ID"]

configuration = Configuration()
configuration.unstable_operations["delete_dataset"] = True
with ApiClient(configuration) as api_client:
api_instance = DatasetsApi(api_client)
api_instance.delete_dataset(
dataset_id="dataset_id",
dataset_id=DATASET_DATA_ID,
)
1 change: 1 addition & 0 deletions examples/v2/datasets/GetAllDatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from datadog_api_client.v2.api.datasets_api import DatasetsApi

configuration = Configuration()
configuration.unstable_operations["get_all_datasets"] = True
with ApiClient(configuration) as api_client:
api_instance = DatasetsApi(api_client)
response = api_instance.get_all_datasets()
Expand Down
7 changes: 6 additions & 1 deletion examples/v2/datasets/GetDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
Get a single dataset by ID returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.datasets_api import DatasetsApi

# there is a valid "dataset" in the system
DATASET_DATA_ID = environ["DATASET_DATA_ID"]

configuration = Configuration()
configuration.unstable_operations["get_dataset"] = True
with ApiClient(configuration) as api_client:
api_instance = DatasetsApi(api_client)
response = api_instance.get_dataset(
dataset_id="dataset_id",
dataset_id=DATASET_DATA_ID,
)

print(response)
23 changes: 13 additions & 10 deletions examples/v2/datasets/UpdateDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,41 @@
Edit a dataset returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.datasets_api import DatasetsApi
from datadog_api_client.v2.model.dataset import Dataset
from datadog_api_client.v2.model.dataset_attributes import DatasetAttributes
from datadog_api_client.v2.model.dataset_attributes_request import DatasetAttributesRequest
from datadog_api_client.v2.model.dataset_request import DatasetRequest
from datadog_api_client.v2.model.dataset_update_request import DatasetUpdateRequest
from datadog_api_client.v2.model.filters_per_product import FiltersPerProduct

# there is a valid "dataset" in the system
DATASET_DATA_ID = environ["DATASET_DATA_ID"]

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

configuration = Configuration()
configuration.unstable_operations["update_dataset"] = True
with ApiClient(configuration) as api_client:
api_instance = DatasetsApi(api_client)
response = api_instance.update_dataset(dataset_id="dataset_id", body=body)
response = api_instance.update_dataset(dataset_id=DATASET_DATA_ID, body=body)

print(response)
Loading
Loading