Skip to content

Commit ad7b184

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d4a4f48 of spec repo
1 parent a12da75 commit ad7b184

20 files changed

Lines changed: 1812 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21475,6 +21475,162 @@ components:
2147521475
data:
2147621476
$ref: "#/components/schemas/DatasetResponse"
2147721477
type: object
21478+
DatasetRestrictionOwnershipMode:
21479+
description: |-
21480+
Controls how dataset ownership is determined. `disabled` turns off ownership-based access
21481+
entirely. `team_tag_based` assigns dataset ownership based on the team tags applied to the
21482+
data, allowing team members to see their own team's datasets.
21483+
enum:
21484+
- disabled
21485+
- team_tag_based
21486+
example: "team_tag_based"
21487+
type: string
21488+
x-enum-varnames:
21489+
- DISABLED
21490+
- TEAM_TAG_BASED
21491+
DatasetRestrictionPrincipal:
21492+
description: |-
21493+
A user or role that is exempt from dataset restrictions and retains unrestricted
21494+
access to all datasets for the product type.
21495+
properties:
21496+
id:
21497+
description: The unique identifier of the principal (a user UUID or role ID).
21498+
example: "abc123"
21499+
type: string
21500+
name:
21501+
description: The human-readable display name of the principal as shown in the Datadog UI.
21502+
example: "Datadog Admin Role"
21503+
type: string
21504+
type:
21505+
description: |-
21506+
The kind of principal, such as `user` for an individual user account or `role`
21507+
for a Datadog role.
21508+
example: "role"
21509+
type: string
21510+
required:
21511+
- type
21512+
- id
21513+
- name
21514+
type: object
21515+
DatasetRestrictionResponse:
21516+
description: Response containing the updated dataset restriction.
21517+
properties:
21518+
data:
21519+
$ref: "#/components/schemas/DatasetRestrictionResponseData"
21520+
required:
21521+
- data
21522+
type: object
21523+
DatasetRestrictionResponseAttributes:
21524+
description: |-
21525+
The current configuration of a dataset restriction, including restriction mode,
21526+
ownership mode, and exempt principals.
21527+
properties:
21528+
ownership_mode:
21529+
$ref: "#/components/schemas/DatasetRestrictionOwnershipMode"
21530+
restriction_key:
21531+
description: Internal key used by the restriction enforcement system to identify this restriction rule.
21532+
type: string
21533+
restriction_mode:
21534+
$ref: "#/components/schemas/DatasetRestrictionRestrictionMode"
21535+
unrestricted_principals:
21536+
description: |-
21537+
Principals (users or roles) that are exempt from this restriction and retain
21538+
full data access regardless of the restriction mode.
21539+
items:
21540+
$ref: "#/components/schemas/DatasetRestrictionPrincipal"
21541+
type: array
21542+
required:
21543+
- restriction_mode
21544+
type: object
21545+
DatasetRestrictionResponseData:
21546+
description: A single dataset restriction configuration for one product type.
21547+
properties:
21548+
attributes:
21549+
$ref: "#/components/schemas/DatasetRestrictionResponseAttributes"
21550+
id:
21551+
description: The Datadog product type this restriction applies to (for example, `rum`, `apm`, or `logs`).
21552+
example: "rum"
21553+
type: string
21554+
type:
21555+
$ref: "#/components/schemas/DatasetRestrictionsType"
21556+
required:
21557+
- type
21558+
- id
21559+
- attributes
21560+
type: object
21561+
DatasetRestrictionRestrictionMode:
21562+
description: |-
21563+
Controls the default data visibility for the product type. `standard` makes data visible
21564+
to all users with appropriate product access. `default_hide` hides data by default and
21565+
requires explicit grants for each dataset.
21566+
enum:
21567+
- standard
21568+
- default_hide
21569+
example: "default_hide"
21570+
type: string
21571+
x-enum-varnames:
21572+
- STANDARD
21573+
- DEFAULT_HIDE
21574+
DatasetRestrictionUpdateRequest:
21575+
description: Payload for updating a dataset restriction configuration.
21576+
properties:
21577+
data:
21578+
$ref: "#/components/schemas/DatasetRestrictionUpdateRequestData"
21579+
required:
21580+
- data
21581+
type: object
21582+
DatasetRestrictionUpdateRequestAttributes:
21583+
description: |-
21584+
Editable attributes of a dataset restriction. Only `restriction_mode` is required;
21585+
omitted optional fields retain their current values.
21586+
properties:
21587+
ownership_mode:
21588+
$ref: "#/components/schemas/DatasetRestrictionOwnershipMode"
21589+
restriction_mode:
21590+
$ref: "#/components/schemas/DatasetRestrictionRestrictionMode"
21591+
unrestricted_principals:
21592+
description: |-
21593+
Principal identifiers (users or roles) that are exempt from the restriction and
21594+
can always access all datasets for this product type.
21595+
items:
21596+
description: A unique identifier of a user or role principal.
21597+
type: string
21598+
type: array
21599+
required:
21600+
- restriction_mode
21601+
type: object
21602+
DatasetRestrictionUpdateRequestData:
21603+
description: Data object for a dataset restriction update.
21604+
properties:
21605+
attributes:
21606+
$ref: "#/components/schemas/DatasetRestrictionUpdateRequestAttributes"
21607+
type:
21608+
$ref: "#/components/schemas/DatasetRestrictionsType"
21609+
required:
21610+
- type
21611+
- attributes
21612+
type: object
21613+
DatasetRestrictionsListResponse:
21614+
description: |-
21615+
Response containing the list of all dataset restriction configurations for the
21616+
organization, one per product type.
21617+
properties:
21618+
data:
21619+
description: An array of dataset restriction objects, one for each configured product type.
21620+
items:
21621+
$ref: "#/components/schemas/DatasetRestrictionResponseData"
21622+
type: array
21623+
required:
21624+
- data
21625+
type: object
21626+
DatasetRestrictionsType:
21627+
description: JSON:API resource type for dataset restrictions.
21628+
enum:
21629+
- dataset_restrictions
21630+
example: "dataset_restrictions"
21631+
type: string
21632+
x-enum-varnames:
21633+
- DATASET_RESTRICTIONS
2147821634
DatasetType:
2147921635
default: dataset
2148021636
description: Resource type, always set to `dataset`.
@@ -97608,6 +97764,126 @@ paths:
9760897764
x-unstable: |-
9760997765
**Note**: This endpoint is in preview and is subject to change.
9761097766
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
97767+
/api/v2/dataset_restrictions:
97768+
get:
97769+
description: |-
97770+
Retrieve all dataset restriction configurations for the organization.
97771+
Returns one restriction object per configured product type (for example, RUM, APM, or Logs),
97772+
including the current restriction mode, ownership mode, and any unrestricted principals.
97773+
Requires the `user_access_read` permission.
97774+
operationId: ListDatasetRestrictions
97775+
responses:
97776+
"200":
97777+
content:
97778+
application/json:
97779+
examples:
97780+
default:
97781+
value:
97782+
data:
97783+
- attributes:
97784+
restriction_mode: "standard"
97785+
id: "rum"
97786+
type: "dataset_restrictions"
97787+
- attributes:
97788+
ownership_mode: "team_tag_based"
97789+
restriction_mode: "default_hide"
97790+
id: "apm"
97791+
type: "dataset_restrictions"
97792+
schema:
97793+
$ref: "#/components/schemas/DatasetRestrictionsListResponse"
97794+
description: OK
97795+
"403":
97796+
content:
97797+
application/json:
97798+
schema:
97799+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97800+
description: Forbidden
97801+
"404":
97802+
content:
97803+
application/json:
97804+
schema:
97805+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97806+
description: Not Found
97807+
"429":
97808+
$ref: "#/components/responses/TooManyRequestsResponse"
97809+
summary: List dataset restrictions
97810+
tags:
97811+
- Dataset Restrictions
97812+
x-unstable: |-
97813+
**Note**: This endpoint is in preview and is subject to change.
97814+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
97815+
/api/v2/dataset_restrictions/{product_type}:
97816+
post:
97817+
description: |-
97818+
Update the dataset restriction configuration for a specific product type.
97819+
Sets the restriction mode, optional ownership mode, and the list of principals
97820+
that are exempt from restrictions. Requires the `user_access_manage` permission.
97821+
Changes are audited and take effect immediately.
97822+
operationId: UpdateDatasetRestriction
97823+
parameters:
97824+
- description: The Datadog product type to configure restrictions for (for example, `rum`, `apm`, or `logs`).
97825+
example: "rum"
97826+
in: path
97827+
name: product_type
97828+
required: true
97829+
schema:
97830+
type: string
97831+
requestBody:
97832+
content:
97833+
application/json:
97834+
examples:
97835+
default:
97836+
value:
97837+
data:
97838+
attributes:
97839+
ownership_mode: "team_tag_based"
97840+
restriction_mode: "default_hide"
97841+
type: "dataset_restrictions"
97842+
schema:
97843+
$ref: "#/components/schemas/DatasetRestrictionUpdateRequest"
97844+
required: true
97845+
responses:
97846+
"200":
97847+
content:
97848+
application/json:
97849+
examples:
97850+
default:
97851+
value:
97852+
data:
97853+
attributes:
97854+
ownership_mode: "team_tag_based"
97855+
restriction_mode: "default_hide"
97856+
id: "rum"
97857+
type: "dataset_restrictions"
97858+
schema:
97859+
$ref: "#/components/schemas/DatasetRestrictionResponse"
97860+
description: OK
97861+
"400":
97862+
content:
97863+
application/json:
97864+
schema:
97865+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97866+
description: Bad Request
97867+
"403":
97868+
content:
97869+
application/json:
97870+
schema:
97871+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97872+
description: Forbidden
97873+
"404":
97874+
content:
97875+
application/json:
97876+
schema:
97877+
$ref: "#/components/schemas/JSONAPIErrorResponse"
97878+
description: Not Found
97879+
"429":
97880+
$ref: "#/components/responses/TooManyRequestsResponse"
97881+
summary: Update a dataset restriction
97882+
tags:
97883+
- Dataset Restrictions
97884+
x-unstable: |-
97885+
**Note**: This endpoint is in preview and is subject to change.
97886+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
9761197887
/api/v2/datasets:
9761297888
get:
9761397889
description: Get all datasets that have been configured for an organization.
@@ -146011,6 +146287,11 @@ tags:
146011146287
- description: |-
146012146288
The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively.
146013146289
name: Data Deletion
146290+
- description: |-
146291+
Configure dataset-level access restrictions per Datadog product type. Dataset restrictions
146292+
control whether data is visible by default or hidden until explicitly granted, and how
146293+
ownership-based access is determined.
146294+
name: Dataset Restrictions
146014146295
- description: |-
146015146296
Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate
146016146297
access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List dataset restrictions returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_dataset_restrictions".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::DatasetRestrictionsAPI.new
8+
p api_instance.list_dataset_restrictions()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Update a dataset restriction returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_dataset_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::DatasetRestrictionsAPI.new
8+
9+
body = DatadogAPIClient::V2::DatasetRestrictionUpdateRequest.new({
10+
data: DatadogAPIClient::V2::DatasetRestrictionUpdateRequestData.new({
11+
attributes: DatadogAPIClient::V2::DatasetRestrictionUpdateRequestAttributes.new({
12+
ownership_mode: DatadogAPIClient::V2::DatasetRestrictionOwnershipMode::TEAM_TAG_BASED,
13+
restriction_mode: DatadogAPIClient::V2::DatasetRestrictionRestrictionMode::DEFAULT_HIDE,
14+
unrestricted_principals: [],
15+
}),
16+
type: DatadogAPIClient::V2::DatasetRestrictionsType::DATASET_RESTRICTIONS,
17+
}),
18+
})
19+
p api_instance.update_dataset_restriction("product_type", body)

features/scenarios_model_mapping.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,6 +2305,10 @@
23052305
"token" => "String",
23062306
"body" => "SecureEmbedUpdateRequest",
23072307
},
2308+
"v2.UpdateDatasetRestriction" => {
2309+
"product_type" => "String",
2310+
"body" => "DatasetRestrictionUpdateRequest",
2311+
},
23082312
"v2.CreateDataset" => {
23092313
"body" => "DatasetCreateRequest",
23102314
},
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
@endpoint(dataset-restrictions) @endpoint(dataset-restrictions-v2)
2+
Feature: Dataset Restrictions
3+
Configure dataset-level access restrictions per Datadog product type.
4+
Dataset restrictions control whether data is visible by default or hidden
5+
until explicitly granted, and how ownership-based access is determined.
6+
7+
Background:
8+
Given a valid "apiKeyAuth" key in the system
9+
And a valid "appKeyAuth" key in the system
10+
And an instance of "DatasetRestrictions" API
11+
12+
@generated @skip @team:DataDog/access-policies-lifecycle
13+
Scenario: List dataset restrictions returns "Not Found" response
14+
Given operation "ListDatasetRestrictions" enabled
15+
And new "ListDatasetRestrictions" request
16+
When the request is sent
17+
Then the response status is 404 Not Found
18+
19+
@generated @skip @team:DataDog/access-policies-lifecycle
20+
Scenario: List dataset restrictions returns "OK" response
21+
Given operation "ListDatasetRestrictions" enabled
22+
And new "ListDatasetRestrictions" request
23+
When the request is sent
24+
Then the response status is 200 OK
25+
26+
@generated @skip @team:DataDog/access-policies-lifecycle
27+
Scenario: Update a dataset restriction returns "Bad Request" response
28+
Given operation "UpdateDatasetRestriction" enabled
29+
And new "UpdateDatasetRestriction" request
30+
And request contains "product_type" parameter from "REPLACE.ME"
31+
And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}}
32+
When the request is sent
33+
Then the response status is 400 Bad Request
34+
35+
@generated @skip @team:DataDog/access-policies-lifecycle
36+
Scenario: Update a dataset restriction returns "Not Found" response
37+
Given operation "UpdateDatasetRestriction" enabled
38+
And new "UpdateDatasetRestriction" request
39+
And request contains "product_type" parameter from "REPLACE.ME"
40+
And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}}
41+
When the request is sent
42+
Then the response status is 404 Not Found
43+
44+
@generated @skip @team:DataDog/access-policies-lifecycle
45+
Scenario: Update a dataset restriction returns "OK" response
46+
Given operation "UpdateDatasetRestriction" enabled
47+
And new "UpdateDatasetRestriction" request
48+
And request contains "product_type" parameter from "REPLACE.ME"
49+
And body with value {"data": {"attributes": {"ownership_mode": "team_tag_based", "restriction_mode": "default_hide", "unrestricted_principals": []}, "type": "dataset_restrictions"}}
50+
When the request is sent
51+
Then the response status is 200 OK

0 commit comments

Comments
 (0)