Skip to content

Commit 57cc499

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 6a02de5 of spec repo (DataDog#3384)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent edc92c8 commit 57cc499

19 files changed

Lines changed: 1622 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,13 @@ components:
15581558
required: true
15591559
schema:
15601560
type: string
1561+
RumPermanentRetentionFilterIDParameter:
1562+
description: The identifier of the permanent RUM retention filter.
1563+
in: path
1564+
name: permanent_rf_id
1565+
required: true
1566+
schema:
1567+
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
15611568
RumRetentionFilterIDParameter:
15621569
description: Retention filter ID.
15631570
in: path
@@ -71551,6 +71558,100 @@ components:
7155171558
$ref: "#/components/schemas/RumMetricResponseData"
7155271559
type: array
7155371560
type: object
71561+
RumPermanentRetentionFilterAttributes:
71562+
description: The attributes of a permanent RUM retention filter.
71563+
properties:
71564+
cross_product_sampling:
71565+
$ref: "#/components/schemas/RumCrossProductSampling"
71566+
description:
71567+
description: A description of what the filter retains.
71568+
example: "All sessions generated by Synthetics are retained at 100%."
71569+
type: string
71570+
editability:
71571+
$ref: "#/components/schemas/RumPermanentRetentionFilterEditability"
71572+
name:
71573+
description: The display name of the permanent retention filter.
71574+
example: "Synthetics Sessions"
71575+
type: string
71576+
type: object
71577+
RumPermanentRetentionFilterData:
71578+
description: A permanent RUM retention filter.
71579+
properties:
71580+
attributes:
71581+
$ref: "#/components/schemas/RumPermanentRetentionFilterAttributes"
71582+
id:
71583+
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
71584+
type:
71585+
$ref: "#/components/schemas/RumPermanentRetentionFilterType"
71586+
type: object
71587+
RumPermanentRetentionFilterEditability:
71588+
description: Indicates which cross-product fields of a permanent RUM retention filter can be updated.
71589+
properties:
71590+
trace_editable:
71591+
description: Whether the APM trace cross-product configuration of the filter can be updated.
71592+
example: true
71593+
type: boolean
71594+
type: object
71595+
RumPermanentRetentionFilterID:
71596+
description: The identifier of a permanent RUM retention filter.
71597+
enum:
71598+
- rum_apm_flat_sampling
71599+
- synthetics_sessions
71600+
- forced_replay_sessions
71601+
example: synthetics_sessions
71602+
type: string
71603+
x-enum-varnames: ["RUM_APM_FLAT_SAMPLING", "SYNTHETICS_SESSIONS", "FORCED_REPLAY_SESSIONS"]
71604+
RumPermanentRetentionFilterResponse:
71605+
description: A permanent RUM retention filter object.
71606+
properties:
71607+
data:
71608+
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
71609+
type: object
71610+
RumPermanentRetentionFilterType:
71611+
default: permanent_retention_filters
71612+
description: The type of the resource. The value should always be `permanent_retention_filters`.
71613+
enum:
71614+
- permanent_retention_filters
71615+
example: permanent_retention_filters
71616+
type: string
71617+
x-enum-varnames: ["PERMANENT_RETENTION_FILTERS"]
71618+
RumPermanentRetentionFilterUpdateAttributes:
71619+
description: The configuration to update on a permanent RUM retention filter.
71620+
properties:
71621+
cross_product_sampling:
71622+
$ref: "#/components/schemas/RumCrossProductSamplingUpdate"
71623+
type: object
71624+
RumPermanentRetentionFilterUpdateData:
71625+
description: The new permanent RUM retention filter configuration to update.
71626+
properties:
71627+
attributes:
71628+
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateAttributes"
71629+
id:
71630+
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
71631+
type:
71632+
$ref: "#/components/schemas/RumPermanentRetentionFilterType"
71633+
required:
71634+
- id
71635+
- type
71636+
- attributes
71637+
type: object
71638+
RumPermanentRetentionFilterUpdateRequest:
71639+
description: The permanent RUM retention filter body to update.
71640+
properties:
71641+
data:
71642+
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateData"
71643+
required:
71644+
- data
71645+
type: object
71646+
RumPermanentRetentionFiltersResponse:
71647+
description: All permanent RUM retention filters for a RUM application.
71648+
properties:
71649+
data:
71650+
description: A list of permanent RUM retention filters.
71651+
items:
71652+
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
71653+
type: array
71654+
type: object
7155471655
RumRetentionFilterAttributes:
7155571656
description: The object describing attributes of a RUM retention filter.
7155671657
properties:
@@ -146732,6 +146833,159 @@ paths:
146732146833
tags:
146733146834
- Rum Retention Filters
146734146835
x-codegen-request-body-name: body
146836+
/api/v2/rum/applications/{app_id}/retention_filters/permanent:
146837+
get:
146838+
description: |-
146839+
Get the list of permanent RUM retention filters for a RUM application.
146840+
Permanent retention filters are predefined filters that cannot be created or deleted.
146841+
For each filter, the `editability` block indicates which cross-product fields can be updated.
146842+
operationId: ListPermanentRetentionFilters
146843+
parameters:
146844+
- $ref: "#/components/parameters/RumApplicationIDParameter"
146845+
responses:
146846+
"200":
146847+
content:
146848+
application/json:
146849+
examples:
146850+
default:
146851+
value:
146852+
data:
146853+
- attributes:
146854+
cross_product_sampling:
146855+
trace_enabled: true
146856+
trace_sample_rate: 100.0
146857+
description: RUM retains all Synthetics sessions.
146858+
editability:
146859+
trace_editable: true
146860+
name: Synthetics Sessions
146861+
id: synthetics_sessions
146862+
type: permanent_retention_filters
146863+
- attributes:
146864+
cross_product_sampling:
146865+
trace_enabled: true
146866+
trace_sample_rate: 100.0
146867+
description: RUM retains all sessions with forced replays.
146868+
editability:
146869+
trace_editable: true
146870+
name: Forced Replay Sessions
146871+
id: forced_replay_sessions
146872+
type: permanent_retention_filters
146873+
- attributes:
146874+
cross_product_sampling:
146875+
trace_enabled: true
146876+
trace_sample_rate: 100.0
146877+
description: Configures APM trace sampling for RUM sessions using flat sampling.
146878+
editability:
146879+
trace_editable: false
146880+
name: RUM APM Flat Sampling
146881+
id: rum_apm_flat_sampling
146882+
type: permanent_retention_filters
146883+
schema:
146884+
$ref: "#/components/schemas/RumPermanentRetentionFiltersResponse"
146885+
description: OK
146886+
"403":
146887+
$ref: "#/components/responses/NotAuthorizedResponse"
146888+
"429":
146889+
$ref: "#/components/responses/TooManyRequestsResponse"
146890+
summary: Get all permanent RUM retention filters
146891+
tags:
146892+
- Rum Retention Filters
146893+
/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}:
146894+
get:
146895+
description: Get a permanent RUM retention filter for a RUM application by its identifier.
146896+
operationId: GetPermanentRetentionFilter
146897+
parameters:
146898+
- $ref: "#/components/parameters/RumApplicationIDParameter"
146899+
- $ref: "#/components/parameters/RumPermanentRetentionFilterIDParameter"
146900+
responses:
146901+
"200":
146902+
content:
146903+
application/json:
146904+
examples:
146905+
default:
146906+
value:
146907+
data:
146908+
attributes:
146909+
cross_product_sampling:
146910+
trace_enabled: true
146911+
trace_sample_rate: 75.0
146912+
description: RUM retains all Synthetics sessions.
146913+
editability:
146914+
trace_editable: true
146915+
name: Synthetics Sessions
146916+
id: synthetics_sessions
146917+
type: permanent_retention_filters
146918+
schema:
146919+
$ref: "#/components/schemas/RumPermanentRetentionFilterResponse"
146920+
description: OK
146921+
"403":
146922+
$ref: "#/components/responses/NotAuthorizedResponse"
146923+
"404":
146924+
$ref: "#/components/responses/NotFoundResponse"
146925+
"429":
146926+
$ref: "#/components/responses/TooManyRequestsResponse"
146927+
summary: Get a permanent RUM retention filter
146928+
tags:
146929+
- Rum Retention Filters
146930+
patch:
146931+
description: |-
146932+
Update the cross-product sampling configuration of a permanent RUM retention filter for a RUM application.
146933+
Only fields marked as editable in the `editability` block of the filter can be updated.
146934+
Updating a non-editable field returns a `400` response.
146935+
operationId: UpdatePermanentRetentionFilter
146936+
parameters:
146937+
- $ref: "#/components/parameters/RumApplicationIDParameter"
146938+
- $ref: "#/components/parameters/RumPermanentRetentionFilterIDParameter"
146939+
requestBody:
146940+
content:
146941+
application/json:
146942+
examples:
146943+
default:
146944+
value:
146945+
data:
146946+
attributes:
146947+
cross_product_sampling:
146948+
trace_enabled: true
146949+
trace_sample_rate: 50.0
146950+
id: synthetics_sessions
146951+
type: permanent_retention_filters
146952+
schema:
146953+
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateRequest"
146954+
description: New configuration of the permanent RUM retention filter.
146955+
required: true
146956+
responses:
146957+
"200":
146958+
content:
146959+
application/json:
146960+
examples:
146961+
default:
146962+
value:
146963+
data:
146964+
attributes:
146965+
cross_product_sampling:
146966+
trace_enabled: true
146967+
trace_sample_rate: 50.0
146968+
description: RUM retains all Synthetics sessions.
146969+
editability:
146970+
trace_editable: true
146971+
name: Synthetics Sessions
146972+
id: synthetics_sessions
146973+
type: permanent_retention_filters
146974+
schema:
146975+
$ref: "#/components/schemas/RumPermanentRetentionFilterResponse"
146976+
description: Updated
146977+
"400":
146978+
$ref: "#/components/responses/BadRequestResponse"
146979+
"403":
146980+
$ref: "#/components/responses/NotAuthorizedResponse"
146981+
"404":
146982+
$ref: "#/components/responses/NotFoundResponse"
146983+
"429":
146984+
$ref: "#/components/responses/TooManyRequestsResponse"
146985+
summary: Update a permanent RUM retention filter
146986+
tags:
146987+
- Rum Retention Filters
146988+
x-codegen-request-body-name: body
146735146989
/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}:
146736146990
delete:
146737146991
description: Delete a RUM retention filter for a RUM application.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get a permanent RUM retention filter returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::RumRetentionFiltersAPI.new
5+
p api_instance.get_permanent_retention_filter("app_id", RumPermanentRetentionFilterID::SYNTHETICS_SESSIONS)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get all permanent RUM retention filters returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::RumRetentionFiltersAPI.new
5+
p api_instance.list_permanent_retention_filters("app_id")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Update a permanent RUM retention filter returns "Updated" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::RumRetentionFiltersAPI.new
5+
6+
body = DatadogAPIClient::V2::RumPermanentRetentionFilterUpdateRequest.new({
7+
data: DatadogAPIClient::V2::RumPermanentRetentionFilterUpdateData.new({
8+
attributes: DatadogAPIClient::V2::RumPermanentRetentionFilterUpdateAttributes.new({
9+
cross_product_sampling: DatadogAPIClient::V2::RumCrossProductSamplingUpdate.new({
10+
trace_enabled: true,
11+
trace_sample_rate: 25.0,
12+
}),
13+
}),
14+
id: DatadogAPIClient::V2::RumPermanentRetentionFilterID::SYNTHETICS_SESSIONS,
15+
type: DatadogAPIClient::V2::RumPermanentRetentionFilterType::PERMANENT_RETENTION_FILTERS,
16+
}),
17+
})
18+
p api_instance.update_permanent_retention_filter("app_id", RumPermanentRetentionFilterID::SYNTHETICS_SESSIONS, body)

features/scenarios_model_mapping.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4506,6 +4506,18 @@
45064506
"app_id" => "String",
45074507
"body" => "RumRetentionFilterCreateRequest",
45084508
},
4509+
"v2.ListPermanentRetentionFilters" => {
4510+
"app_id" => "String",
4511+
},
4512+
"v2.GetPermanentRetentionFilter" => {
4513+
"app_id" => "String",
4514+
"permanent_rf_id" => "RumPermanentRetentionFilterID",
4515+
},
4516+
"v2.UpdatePermanentRetentionFilter" => {
4517+
"app_id" => "String",
4518+
"permanent_rf_id" => "RumPermanentRetentionFilterID",
4519+
"body" => "RumPermanentRetentionFilterUpdateRequest",
4520+
},
45094521
"v2.DeleteRetentionFilter" => {
45104522
"app_id" => "String",
45114523
"rf_id" => "String",

features/v2/rum_retention_filters.feature

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ Feature: Rum Retention Filters
7070
And the response "data.attributes.query" is equal to "custom_query"
7171
And the response "data.attributes.sample_rate" is equal to 25
7272

73+
@generated @skip @team:DataDog/rum-backend
74+
Scenario: Get a permanent RUM retention filter returns "Not Found" response
75+
Given new "GetPermanentRetentionFilter" request
76+
And request contains "app_id" parameter from "REPLACE.ME"
77+
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
78+
When the request is sent
79+
Then the response status is 404 Not Found
80+
81+
@generated @skip @team:DataDog/rum-backend
82+
Scenario: Get a permanent RUM retention filter returns "OK" response
83+
Given new "GetPermanentRetentionFilter" request
84+
And request contains "app_id" parameter from "REPLACE.ME"
85+
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
86+
When the request is sent
87+
Then the response status is 200 OK
88+
7389
@replay-only @team:DataDog/rum-backend
7490
Scenario: Get all RUM retention filters returns "OK" response
7591
Given new "ListRetentionFilters" request
@@ -78,6 +94,13 @@ Feature: Rum Retention Filters
7894
Then the response status is 200 OK
7995
And the response "data" has length 3
8096

97+
@generated @skip @team:DataDog/rum-backend
98+
Scenario: Get all permanent RUM retention filters returns "OK" response
99+
Given new "ListPermanentRetentionFilters" request
100+
And request contains "app_id" parameter from "REPLACE.ME"
101+
When the request is sent
102+
Then the response status is 200 OK
103+
81104
@team:DataDog/rum-backend
82105
Scenario: Order RUM retention filters returns "Bad Request" response
83106
Given new "OrderRetentionFilters" request
@@ -130,3 +153,30 @@ Feature: Rum Retention Filters
130153
And the response "data.attributes.enabled" is equal to true
131154
And the response "data.attributes.query" is equal to "view_query"
132155
And the response "data.attributes.sample_rate" is equal to 100
156+
157+
@generated @skip @team:DataDog/rum-backend
158+
Scenario: Update a permanent RUM retention filter returns "Bad Request" response
159+
Given new "UpdatePermanentRetentionFilter" request
160+
And request contains "app_id" parameter from "REPLACE.ME"
161+
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
162+
And body with value {"data": {"attributes": {"cross_product_sampling": {"trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "synthetics_sessions", "type": "permanent_retention_filters"}}
163+
When the request is sent
164+
Then the response status is 400 Bad Request
165+
166+
@generated @skip @team:DataDog/rum-backend
167+
Scenario: Update a permanent RUM retention filter returns "Not Found" response
168+
Given new "UpdatePermanentRetentionFilter" request
169+
And request contains "app_id" parameter from "REPLACE.ME"
170+
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
171+
And body with value {"data": {"attributes": {"cross_product_sampling": {"trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "synthetics_sessions", "type": "permanent_retention_filters"}}
172+
When the request is sent
173+
Then the response status is 404 Not Found
174+
175+
@generated @skip @team:DataDog/rum-backend
176+
Scenario: Update a permanent RUM retention filter returns "Updated" response
177+
Given new "UpdatePermanentRetentionFilter" request
178+
And request contains "app_id" parameter from "REPLACE.ME"
179+
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
180+
And body with value {"data": {"attributes": {"cross_product_sampling": {"trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "synthetics_sessions", "type": "permanent_retention_filters"}}
181+
When the request is sent
182+
Then the response status is 200 Updated

0 commit comments

Comments
 (0)