Skip to content

Commit 33510f1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6310af2f of spec repo
1 parent 76a8bc5 commit 33510f1

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-09 16:47:20.787625",
8-
"spec_repo_commit": "d0906173"
7+
"regenerated": "2025-07-10 16:48:53.820464",
8+
"spec_repo_commit": "6310af2f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-09 16:47:20.879372",
13-
"spec_repo_commit": "d0906173"
12+
"regenerated": "2025-07-10 16:48:53.913762",
13+
"spec_repo_commit": "6310af2f"
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
@@ -12170,6 +12178,93 @@ components:
1217012178
required:
1217112179
- databaseMonitoringTrigger
1217212180
type: object
12181+
Dataset:
12182+
description: Dataset object.
12183+
properties:
12184+
attributes:
12185+
$ref: '#/components/schemas/DatasetAttributes'
12186+
id:
12187+
description: Unique identifier for the dataset.
12188+
example: 123e4567-e89b-12d3-a456-426614174000
12189+
type: string
12190+
type:
12191+
description: Resource type, always "dataset".
12192+
example: dataset
12193+
type: string
12194+
required:
12195+
- type
12196+
- attributes
12197+
type: object
12198+
DatasetAttributes:
12199+
description: Dataset metadata and configuration(s).
12200+
properties:
12201+
created_at:
12202+
description: Timestamp when the dataset was created.
12203+
format: date-time
12204+
nullable: true
12205+
type: string
12206+
created_by:
12207+
description: ID of the user who created the dataset.
12208+
format: uuid
12209+
type: string
12210+
name:
12211+
description: Name of the dataset.
12212+
example: Security Audit Dataset
12213+
type: string
12214+
principals:
12215+
description: List of access principals, formatted as `principal_type:id`.
12216+
Principal can be 'team' or 'role'.
12217+
example:
12218+
- role:86245fce-0a4e-11f0-92bd-da7ad0900002
12219+
items:
12220+
example: role:86245fce-0a4e-11f0-92bd-da7ad0900002
12221+
type: string
12222+
type: array
12223+
product_filters:
12224+
description: List of product-specific filters.
12225+
items:
12226+
$ref: '#/components/schemas/FiltersPerProduct'
12227+
type: array
12228+
required:
12229+
- name
12230+
- product_filters
12231+
- principals
12232+
type: object
12233+
DatasetCreateRequest:
12234+
description: Create request for a dataset.
12235+
properties:
12236+
data:
12237+
$ref: '#/components/schemas/Dataset'
12238+
required:
12239+
- data
12240+
type: object
12241+
DatasetEditRequest:
12242+
description: Edit request for a dataset.
12243+
properties:
12244+
data:
12245+
$ref: '#/components/schemas/Dataset'
12246+
required:
12247+
- data
12248+
type: object
12249+
DatasetResponseMulti:
12250+
description: Response containing a list of datasets.
12251+
properties:
12252+
data:
12253+
description: The list of datasets returned in response.
12254+
items:
12255+
$ref: '#/components/schemas/Dataset'
12256+
type: array
12257+
required:
12258+
- data
12259+
type: object
12260+
DatasetResponseSingle:
12261+
description: Response containing a single dataset object.
12262+
properties:
12263+
data:
12264+
$ref: '#/components/schemas/Dataset'
12265+
required:
12266+
- data
12267+
type: object
1217312268
Date:
1217412269
description: Date as Unix timestamp in milliseconds.
1217512270
example: 1722439510282
@@ -15628,6 +15723,38 @@ components:
1562815723
$ref: '#/components/schemas/FastlyServiceData'
1562915724
type: array
1563015725
type: object
15726+
FiltersPerProduct:
15727+
description: Product-specific filters for the dataset.
15728+
properties:
15729+
filters:
15730+
description: 'Defines the list of tag-based filters used to restrict access
15731+
to telemetry data for a specific product.
15732+
15733+
These filters act as access control rules. Each filter must follow the
15734+
tag query syntax used by
15735+
15736+
Datadog (such as `@tag.key:value`), and only one tag or attribute may
15737+
be used to define the access strategy
15738+
15739+
per telemetry type.'
15740+
example:
15741+
- '@application.id:ABCD'
15742+
items:
15743+
example: '@application.id:ABCD'
15744+
type: string
15745+
type: array
15746+
product:
15747+
description: 'Name of the product the dataset is for. Possible values are
15748+
''apm'', ''rum'', ''synthetics'',
15749+
15750+
''metrics'', ''logs'', ''sd_repoinfo'', ''error_tracking'', ''cloud_cost'',
15751+
and ''ml_obs''.'
15752+
example: logs
15753+
type: string
15754+
required:
15755+
- product
15756+
- filters
15757+
type: object
1563115758
Finding:
1563215759
description: A single finding without the message and resource configuration.
1563315760
properties:
@@ -47394,6 +47521,173 @@ paths:
4739447521
tags:
4739547522
- Dashboard Lists
4739647523
x-codegen-request-body-name: body
47524+
/api/v2/datasets:
47525+
get:
47526+
description: Get all datasets that have been configured for an organization.
47527+
operationId: GetAllDatasets
47528+
responses:
47529+
'200':
47530+
content:
47531+
application/json:
47532+
schema:
47533+
$ref: '#/components/schemas/DatasetResponseMulti'
47534+
description: OK
47535+
'403':
47536+
$ref: '#/components/responses/NotAuthorizedResponse'
47537+
'429':
47538+
$ref: '#/components/responses/TooManyRequestsResponse'
47539+
security:
47540+
- apiKeyAuth: []
47541+
appKeyAuth: []
47542+
- AuthZ: []
47543+
summary: Get all datasets
47544+
tags:
47545+
- Datasets
47546+
x-permission:
47547+
operator: OPEN
47548+
permissions: []
47549+
post:
47550+
description: Create a dataset with the configurations in the request.
47551+
operationId: CreateDataset
47552+
requestBody:
47553+
content:
47554+
application/json:
47555+
example:
47556+
data:
47557+
attributes:
47558+
name: Test RUM Dataset
47559+
principals:
47560+
- role:23bacb30-1c59-11f0-a596-da7ad0900002
47561+
product_filters:
47562+
- filters:
47563+
- '@application.id:application_123'
47564+
product: rum
47565+
type: dataset
47566+
schema:
47567+
$ref: '#/components/schemas/DatasetCreateRequest'
47568+
description: Dataset payload
47569+
required: true
47570+
responses:
47571+
'200':
47572+
content:
47573+
application/json:
47574+
schema:
47575+
$ref: '#/components/schemas/DatasetResponseSingle'
47576+
description: OK
47577+
'400':
47578+
$ref: '#/components/responses/BadRequestResponse'
47579+
'403':
47580+
$ref: '#/components/responses/NotAuthorizedResponse'
47581+
'409':
47582+
$ref: '#/components/responses/ConflictResponse'
47583+
'429':
47584+
$ref: '#/components/responses/TooManyRequestsResponse'
47585+
security:
47586+
- apiKeyAuth: []
47587+
appKeyAuth: []
47588+
- AuthZ: []
47589+
summary: Create a dataset
47590+
tags:
47591+
- Datasets
47592+
x-codegen-request-body-name: body
47593+
x-permission:
47594+
operator: OPEN
47595+
permissions: []
47596+
/api/v2/datasets/{dataset_id}:
47597+
delete:
47598+
description: Deletes the dataset associated with the ID.
47599+
operationId: DeleteDataset
47600+
parameters:
47601+
- $ref: '#/components/parameters/DatasetID'
47602+
responses:
47603+
'204':
47604+
description: No Content
47605+
'400':
47606+
$ref: '#/components/responses/BadRequestResponse'
47607+
'403':
47608+
$ref: '#/components/responses/NotAuthorizedResponse'
47609+
'404':
47610+
$ref: '#/components/responses/NotFoundResponse'
47611+
'429':
47612+
$ref: '#/components/responses/TooManyRequestsResponse'
47613+
security:
47614+
- apiKeyAuth: []
47615+
appKeyAuth: []
47616+
- AuthZ: []
47617+
summary: Delete a dataset
47618+
tags:
47619+
- Datasets
47620+
x-permission:
47621+
operator: OPEN
47622+
permissions: []
47623+
get:
47624+
description: Retrieves the dataset associated with the ID.
47625+
operationId: GetDataset
47626+
parameters:
47627+
- $ref: '#/components/parameters/DatasetID'
47628+
responses:
47629+
'200':
47630+
content:
47631+
application/json:
47632+
schema:
47633+
$ref: '#/components/schemas/DatasetResponseSingle'
47634+
description: OK
47635+
'400':
47636+
$ref: '#/components/responses/BadRequestResponse'
47637+
'403':
47638+
$ref: '#/components/responses/NotAuthorizedResponse'
47639+
'404':
47640+
$ref: '#/components/responses/NotFoundResponse'
47641+
'429':
47642+
$ref: '#/components/responses/TooManyRequestsResponse'
47643+
security:
47644+
- apiKeyAuth: []
47645+
appKeyAuth: []
47646+
- AuthZ: []
47647+
summary: Get a single dataset by ID
47648+
tags:
47649+
- Datasets
47650+
x-permission:
47651+
operator: OPEN
47652+
permissions: []
47653+
put:
47654+
description: Updates the dataset associated with the ID.
47655+
operationId: UpdateDataset
47656+
parameters:
47657+
- $ref: '#/components/parameters/DatasetID'
47658+
requestBody:
47659+
content:
47660+
application/json:
47661+
schema:
47662+
$ref: '#/components/schemas/DatasetEditRequest'
47663+
description: Dataset payload
47664+
required: true
47665+
responses:
47666+
'200':
47667+
content:
47668+
application/json:
47669+
schema:
47670+
$ref: '#/components/schemas/DatasetResponseSingle'
47671+
description: OK
47672+
'400':
47673+
$ref: '#/components/responses/BadRequestResponse'
47674+
'403':
47675+
$ref: '#/components/responses/NotAuthorizedResponse'
47676+
'404':
47677+
$ref: '#/components/responses/NotFoundResponse'
47678+
'429':
47679+
$ref: '#/components/responses/TooManyRequestsResponse'
47680+
security:
47681+
- apiKeyAuth: []
47682+
appKeyAuth: []
47683+
- AuthZ: []
47684+
summary: Update a dataset
47685+
tags:
47686+
- Datasets
47687+
x-codegen-request-body-name: body
47688+
x-permission:
47689+
operator: OPEN
47690+
permissions: []
4739747691
/api/v2/deletion/data/{product}:
4739847692
post:
4739947693
description: Creates a data deletion request by providing a query and a timeframe
@@ -64798,6 +65092,14 @@ tags:
6479865092
the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data`
6479965093
and `rum_delete_data` permissions respectively.
6480065094
name: Data Deletion
65095+
- description: 'Data Access Controls in Datadog is a feature that allows administrators
65096+
and access managers to regulate
65097+
65098+
access to sensitive data. By defining Restricted Datasets, you can ensure that
65099+
only specific teams or roles can
65100+
65101+
view certain types of telemetry (for example, logs, traces, metrics, and RUM data).'
65102+
name: Datasets
6480165103
- description: 'Configure your Datadog Email Domain Allowlist directly through the
6480265104
Datadog API.
6480365105

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)