Skip to content

Commit 2ca8de7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 62a4a23e of spec repo
1 parent 0574af6 commit 2ca8de7

20 files changed

+1763
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-07-10 21:03:57.603015",
8-
"spec_repo_commit": "fe6b4ea7"
7+
"regenerated": "2025-07-11 13:56:48.376221",
8+
"spec_repo_commit": "62a4a23e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-10 21:03:57.620947",
13-
"spec_repo_commit": "fe6b4ea7"
12+
"regenerated": "2025-07-11 13:56:48.392644",
13+
"spec_repo_commit": "62a4a23e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,14 @@ components:
288288
required: true
289289
schema:
290290
type: string
291+
DatasetID:
292+
description: The ID of a defined dataset.
293+
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
294+
in: path
295+
name: dataset_id
296+
required: true
297+
schema:
298+
type: string
291299
EntityID:
292300
description: UUID or Entity Ref.
293301
in: path
@@ -12178,6 +12186,93 @@ components:
1217812186
required:
1217912187
- databaseMonitoringTrigger
1218012188
type: object
12189+
Dataset:
12190+
description: Dataset object.
12191+
properties:
12192+
attributes:
12193+
$ref: '#/components/schemas/DatasetAttributes'
12194+
id:
12195+
description: Unique identifier for the dataset.
12196+
example: 123e4567-e89b-12d3-a456-426614174000
12197+
type: string
12198+
type:
12199+
description: Resource type, always "dataset".
12200+
example: dataset
12201+
type: string
12202+
required:
12203+
- type
12204+
- attributes
12205+
type: object
12206+
DatasetAttributes:
12207+
description: Dataset metadata and configuration(s).
12208+
properties:
12209+
created_at:
12210+
description: Timestamp when the dataset was created.
12211+
format: date-time
12212+
nullable: true
12213+
type: string
12214+
created_by:
12215+
description: Unique ID of the user who created the dataset.
12216+
format: uuid
12217+
type: string
12218+
name:
12219+
description: Name of the dataset.
12220+
example: Security Audit Dataset
12221+
type: string
12222+
principals:
12223+
description: List of access principals, formatted as `principal_type:id`.
12224+
Principal can be 'team' or 'role'.
12225+
example:
12226+
- role:86245fce-0a4e-11f0-92bd-da7ad0900002
12227+
items:
12228+
example: role:86245fce-0a4e-11f0-92bd-da7ad0900002
12229+
type: string
12230+
type: array
12231+
product_filters:
12232+
description: List of product-specific filters.
12233+
items:
12234+
$ref: '#/components/schemas/FiltersPerProduct'
12235+
type: array
12236+
required:
12237+
- name
12238+
- product_filters
12239+
- principals
12240+
type: object
12241+
DatasetCreateRequest:
12242+
description: Create request for a dataset.
12243+
properties:
12244+
data:
12245+
$ref: '#/components/schemas/Dataset'
12246+
required:
12247+
- data
12248+
type: object
12249+
DatasetEditRequest:
12250+
description: Edit request for a dataset.
12251+
properties:
12252+
data:
12253+
$ref: '#/components/schemas/Dataset'
12254+
required:
12255+
- data
12256+
type: object
12257+
DatasetResponseMulti:
12258+
description: Response containing a list of datasets.
12259+
properties:
12260+
data:
12261+
description: The list of datasets returned in response.
12262+
items:
12263+
$ref: '#/components/schemas/Dataset'
12264+
type: array
12265+
required:
12266+
- data
12267+
type: object
12268+
DatasetResponseSingle:
12269+
description: Response containing a single dataset object.
12270+
properties:
12271+
data:
12272+
$ref: '#/components/schemas/Dataset'
12273+
required:
12274+
- data
12275+
type: object
1218112276
Date:
1218212277
description: Date as Unix timestamp in milliseconds.
1218312278
example: 1722439510282
@@ -15636,6 +15731,38 @@ components:
1563615731
$ref: '#/components/schemas/FastlyServiceData'
1563715732
type: array
1563815733
type: object
15734+
FiltersPerProduct:
15735+
description: Product-specific filters for the dataset.
15736+
properties:
15737+
filters:
15738+
description: 'Defines the list of tag-based filters used to restrict access
15739+
to telemetry data for a specific product.
15740+
15741+
These filters act as access control rules. Each filter must follow the
15742+
tag query syntax used by
15743+
15744+
Datadog (such as `@tag.key:value`), and only one tag or attribute may
15745+
be used to define the access strategy
15746+
15747+
per telemetry type.'
15748+
example:
15749+
- '@application.id:ABCD'
15750+
items:
15751+
example: '@application.id:ABCD'
15752+
type: string
15753+
type: array
15754+
product:
15755+
description: 'Name of the product the dataset is for. Possible values are
15756+
''apm'', ''rum'', ''synthetics'',
15757+
15758+
''metrics'', ''logs'', ''sd_repoinfo'', ''error_tracking'', ''cloud_cost'',
15759+
and ''ml_obs''.'
15760+
example: logs
15761+
type: string
15762+
required:
15763+
- product
15764+
- filters
15765+
type: object
1563915766
Finding:
1564015767
description: A single finding without the message and resource configuration.
1564115768
properties:
@@ -47544,6 +47671,173 @@ paths:
4754447671
tags:
4754547672
- Dashboard Lists
4754647673
x-codegen-request-body-name: body
47674+
/api/v2/datasets:
47675+
get:
47676+
description: Get all datasets that have been configured for an organization.
47677+
operationId: GetAllDatasets
47678+
responses:
47679+
'200':
47680+
content:
47681+
application/json:
47682+
schema:
47683+
$ref: '#/components/schemas/DatasetResponseMulti'
47684+
description: OK
47685+
'403':
47686+
$ref: '#/components/responses/NotAuthorizedResponse'
47687+
'429':
47688+
$ref: '#/components/responses/TooManyRequestsResponse'
47689+
security:
47690+
- apiKeyAuth: []
47691+
appKeyAuth: []
47692+
- AuthZ: []
47693+
summary: Get all datasets
47694+
tags:
47695+
- Datasets
47696+
x-permission:
47697+
operator: OPEN
47698+
permissions: []
47699+
post:
47700+
description: Create a dataset with the configurations in the request.
47701+
operationId: CreateDataset
47702+
requestBody:
47703+
content:
47704+
application/json:
47705+
example:
47706+
data:
47707+
attributes:
47708+
name: Test RUM Dataset
47709+
principals:
47710+
- role:23bacb30-1c59-11f0-a596-da7ad0900002
47711+
product_filters:
47712+
- filters:
47713+
- '@application.id:application_123'
47714+
product: rum
47715+
type: dataset
47716+
schema:
47717+
$ref: '#/components/schemas/DatasetCreateRequest'
47718+
description: Dataset payload
47719+
required: true
47720+
responses:
47721+
'200':
47722+
content:
47723+
application/json:
47724+
schema:
47725+
$ref: '#/components/schemas/DatasetResponseSingle'
47726+
description: OK
47727+
'400':
47728+
$ref: '#/components/responses/BadRequestResponse'
47729+
'403':
47730+
$ref: '#/components/responses/NotAuthorizedResponse'
47731+
'409':
47732+
$ref: '#/components/responses/ConflictResponse'
47733+
'429':
47734+
$ref: '#/components/responses/TooManyRequestsResponse'
47735+
security:
47736+
- apiKeyAuth: []
47737+
appKeyAuth: []
47738+
- AuthZ: []
47739+
summary: Create a dataset
47740+
tags:
47741+
- Datasets
47742+
x-codegen-request-body-name: body
47743+
x-permission:
47744+
operator: OPEN
47745+
permissions: []
47746+
/api/v2/datasets/{dataset_id}:
47747+
delete:
47748+
description: Deletes the dataset associated with the ID.
47749+
operationId: DeleteDataset
47750+
parameters:
47751+
- $ref: '#/components/parameters/DatasetID'
47752+
responses:
47753+
'204':
47754+
description: No Content
47755+
'400':
47756+
$ref: '#/components/responses/BadRequestResponse'
47757+
'403':
47758+
$ref: '#/components/responses/NotAuthorizedResponse'
47759+
'404':
47760+
$ref: '#/components/responses/NotFoundResponse'
47761+
'429':
47762+
$ref: '#/components/responses/TooManyRequestsResponse'
47763+
security:
47764+
- apiKeyAuth: []
47765+
appKeyAuth: []
47766+
- AuthZ: []
47767+
summary: Delete a dataset
47768+
tags:
47769+
- Datasets
47770+
x-permission:
47771+
operator: OPEN
47772+
permissions: []
47773+
get:
47774+
description: Retrieves the dataset associated with the ID.
47775+
operationId: GetDataset
47776+
parameters:
47777+
- $ref: '#/components/parameters/DatasetID'
47778+
responses:
47779+
'200':
47780+
content:
47781+
application/json:
47782+
schema:
47783+
$ref: '#/components/schemas/DatasetResponseSingle'
47784+
description: OK
47785+
'400':
47786+
$ref: '#/components/responses/BadRequestResponse'
47787+
'403':
47788+
$ref: '#/components/responses/NotAuthorizedResponse'
47789+
'404':
47790+
$ref: '#/components/responses/NotFoundResponse'
47791+
'429':
47792+
$ref: '#/components/responses/TooManyRequestsResponse'
47793+
security:
47794+
- apiKeyAuth: []
47795+
appKeyAuth: []
47796+
- AuthZ: []
47797+
summary: Get a single dataset by ID
47798+
tags:
47799+
- Datasets
47800+
x-permission:
47801+
operator: OPEN
47802+
permissions: []
47803+
put:
47804+
description: Edits the dataset associated with the ID.
47805+
operationId: EditDataset
47806+
parameters:
47807+
- $ref: '#/components/parameters/DatasetID'
47808+
requestBody:
47809+
content:
47810+
application/json:
47811+
schema:
47812+
$ref: '#/components/schemas/DatasetEditRequest'
47813+
description: Dataset payload
47814+
required: true
47815+
responses:
47816+
'200':
47817+
content:
47818+
application/json:
47819+
schema:
47820+
$ref: '#/components/schemas/DatasetResponseSingle'
47821+
description: OK
47822+
'400':
47823+
$ref: '#/components/responses/BadRequestResponse'
47824+
'403':
47825+
$ref: '#/components/responses/NotAuthorizedResponse'
47826+
'404':
47827+
$ref: '#/components/responses/NotFoundResponse'
47828+
'429':
47829+
$ref: '#/components/responses/TooManyRequestsResponse'
47830+
security:
47831+
- apiKeyAuth: []
47832+
appKeyAuth: []
47833+
- AuthZ: []
47834+
summary: Edits a dataset
47835+
tags:
47836+
- Datasets
47837+
x-codegen-request-body-name: body
47838+
x-permission:
47839+
operator: OPEN
47840+
permissions: []
4754747841
/api/v2/deletion/data/{product}:
4754847842
post:
4754947843
description: Creates a data deletion request by providing a query and a timeframe
@@ -65102,6 +65396,14 @@ tags:
6510265396
the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data`
6510365397
and `rum_delete_data` permissions respectively.
6510465398
name: Data Deletion
65399+
- description: 'Data Access Controls in Datadog is a feature that allows administrators
65400+
and access managers to regulate
65401+
65402+
access to sensitive data. By defining Restricted Datasets, you can ensure that
65403+
only specific teams or roles can
65404+
65405+
view certain types of telemetry (for example, logs, traces, metrics, and RUM data).'
65406+
name: Datasets
6510565407
- description: 'Configure your Datadog Email Domain Allowlist directly through the
6510665408
Datadog API.
6510765409

examples/v2/datasets/CreateDataset.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Create a dataset returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.DatasetsApi(configuration);
9+
10+
const params: v2.DatasetsApiCreateDatasetRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
createdAt: undefined,
15+
name: "Security Audit Dataset",
16+
principals: ["role:86245fce-0a4e-11f0-92bd-da7ad0900002"],
17+
productFilters: [
18+
{
19+
filters: ["@application.id:ABCD"],
20+
product: "logs",
21+
},
22+
],
23+
},
24+
id: "123e4567-e89b-12d3-a456-426614174000",
25+
type: "dataset",
26+
},
27+
},
28+
};
29+
30+
apiInstance
31+
.createDataset(params)
32+
.then((data: v2.DatasetResponseSingle) => {
33+
console.log(
34+
"API called successfully. Returned data: " + JSON.stringify(data)
35+
);
36+
})
37+
.catch((error: any) => console.error(error));

0 commit comments

Comments
 (0)