Skip to content

Commit fe5b19f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add RUM rate limit configuration v2 endpoints (#1682)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 97a134c commit fe5b19f

25 files changed

Lines changed: 2457 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,23 @@ components:
15931593
required: true
15941594
schema:
15951595
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
1596+
RumRateLimitScopeIDParameter:
1597+
description: |-
1598+
The identifier of the scope the rate limit configuration applies to.
1599+
For the `application` scope, this is the RUM application ID.
1600+
in: path
1601+
name: scope_id
1602+
required: true
1603+
schema:
1604+
example: cd73a516-a481-4af5-8352-9b577465c77b
1605+
type: string
1606+
RumRateLimitScopeTypeParameter:
1607+
description: The type of scope the rate limit configuration applies to.
1608+
in: path
1609+
name: scope_type
1610+
required: true
1611+
schema:
1612+
$ref: "#/components/schemas/RumRateLimitScopeType"
15961613
RumRetentionFilterIDParameter:
15971614
description: Retention filter ID.
15981615
in: path
@@ -75032,6 +75049,179 @@ components:
7503275049
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
7503375050
type: array
7503475051
type: object
75052+
RumRateLimitAdaptiveConfig:
75053+
description: The configuration used when `mode` is `adaptive`.
75054+
properties:
75055+
max_retention_rate:
75056+
description: The maximum fraction of sessions to retain, in the range `(0, 1]`.
75057+
example: 0.5
75058+
exclusiveMinimum: true
75059+
format: double
75060+
maximum: 1
75061+
minimum: 0
75062+
type: number
75063+
required:
75064+
- max_retention_rate
75065+
type: object
75066+
RumRateLimitConfigAttributes:
75067+
description: The RUM rate limit configuration properties.
75068+
properties:
75069+
adaptive:
75070+
$ref: "#/components/schemas/RumRateLimitAdaptiveConfig"
75071+
custom:
75072+
$ref: "#/components/schemas/RumRateLimitCustomConfig"
75073+
mode:
75074+
$ref: "#/components/schemas/RumRateLimitMode"
75075+
org_id:
75076+
description: The ID of the organization the rate limit configuration belongs to.
75077+
example: 2
75078+
format: int64
75079+
type: integer
75080+
updated_at:
75081+
description: The date the rate limit configuration was last updated.
75082+
example: "2026-03-04T15:37:54.951447Z"
75083+
type: string
75084+
updated_by:
75085+
description: The handle of the user who last updated the rate limit configuration.
75086+
example: test@example.com
75087+
type: string
75088+
required:
75089+
- mode
75090+
- org_id
75091+
type: object
75092+
RumRateLimitConfigData:
75093+
description: The RUM rate limit configuration object.
75094+
properties:
75095+
attributes:
75096+
$ref: "#/components/schemas/RumRateLimitConfigAttributes"
75097+
id:
75098+
description: The identifier of the scope the rate limit configuration applies to.
75099+
example: cd73a516-a481-4af5-8352-9b577465c77b
75100+
type: string
75101+
type:
75102+
$ref: "#/components/schemas/RumRateLimitConfigType"
75103+
required:
75104+
- id
75105+
- type
75106+
- attributes
75107+
type: object
75108+
RumRateLimitConfigResponse:
75109+
description: The RUM rate limit configuration response.
75110+
properties:
75111+
data:
75112+
$ref: "#/components/schemas/RumRateLimitConfigData"
75113+
required:
75114+
- data
75115+
type: object
75116+
RumRateLimitConfigType:
75117+
default: rum_rate_limit_config
75118+
description: The type of the resource, always `rum_rate_limit_config`.
75119+
enum:
75120+
- rum_rate_limit_config
75121+
example: rum_rate_limit_config
75122+
type: string
75123+
x-enum-varnames: ["RUM_RATE_LIMIT_CONFIG"]
75124+
RumRateLimitConfigUpdateAttributes:
75125+
description: The RUM rate limit configuration properties to create or update.
75126+
properties:
75127+
adaptive:
75128+
$ref: "#/components/schemas/RumRateLimitAdaptiveConfig"
75129+
custom:
75130+
$ref: "#/components/schemas/RumRateLimitCustomConfig"
75131+
mode:
75132+
$ref: "#/components/schemas/RumRateLimitMode"
75133+
required:
75134+
- mode
75135+
type: object
75136+
RumRateLimitConfigUpdateData:
75137+
description: The RUM rate limit configuration to create or update.
75138+
properties:
75139+
attributes:
75140+
$ref: "#/components/schemas/RumRateLimitConfigUpdateAttributes"
75141+
id:
75142+
description: |-
75143+
The identifier of the scope the rate limit configuration applies to.
75144+
Must match `scope_id` in the path.
75145+
example: cd73a516-a481-4af5-8352-9b577465c77b
75146+
type: string
75147+
type:
75148+
$ref: "#/components/schemas/RumRateLimitConfigType"
75149+
required:
75150+
- id
75151+
- type
75152+
- attributes
75153+
type: object
75154+
RumRateLimitConfigUpdateRequest:
75155+
description: The body of a request to create or update a RUM rate limit configuration.
75156+
properties:
75157+
data:
75158+
$ref: "#/components/schemas/RumRateLimitConfigUpdateData"
75159+
required:
75160+
- data
75161+
type: object
75162+
RumRateLimitCustomConfig:
75163+
description: The configuration used when `mode` is `custom`.
75164+
properties:
75165+
daily_reset_time:
75166+
description: The time of day when the daily quota resets, in `HH:MM` 24-hour format.
75167+
example: "08:00"
75168+
pattern: "^([01]\\d|2[0-3]):[0-5]\\d$"
75169+
type: string
75170+
daily_reset_timezone:
75171+
description: The timezone offset used for the daily reset time, in `±HH:MM` format.
75172+
example: "+09:00"
75173+
pattern: "^[+-](0\\d|1[0-4]):[0-5]\\d$"
75174+
type: string
75175+
quota_reached_action:
75176+
$ref: "#/components/schemas/RumRateLimitQuotaReachedAction"
75177+
session_limit:
75178+
description: The maximum number of sessions allowed within the window.
75179+
example: 1000000
75180+
format: int64
75181+
minimum: 1
75182+
type: integer
75183+
window_type:
75184+
$ref: "#/components/schemas/RumRateLimitWindowType"
75185+
required:
75186+
- window_type
75187+
- session_limit
75188+
- daily_reset_time
75189+
- daily_reset_timezone
75190+
- quota_reached_action
75191+
type: object
75192+
RumRateLimitMode:
75193+
description: |-
75194+
The rate limit mode. `custom` enforces a fixed session limit, while
75195+
`adaptive` dynamically adjusts retention.
75196+
enum:
75197+
- custom
75198+
- adaptive
75199+
example: custom
75200+
type: string
75201+
x-enum-varnames: ["CUSTOM", "ADAPTIVE"]
75202+
RumRateLimitQuotaReachedAction:
75203+
description: The action to take when the session quota is reached.
75204+
enum:
75205+
- stop
75206+
- slowdown
75207+
example: stop
75208+
type: string
75209+
x-enum-varnames: ["STOP", "SLOWDOWN"]
75210+
RumRateLimitScopeType:
75211+
default: application
75212+
description: The type of scope the rate limit configuration applies to.
75213+
enum:
75214+
- application
75215+
example: application
75216+
type: string
75217+
x-enum-varnames: ["APPLICATION"]
75218+
RumRateLimitWindowType:
75219+
description: The window type over which the session limit is enforced.
75220+
enum:
75221+
- daily
75222+
example: daily
75223+
type: string
75224+
x-enum-varnames: ["DAILY"]
7503575225
RumRetentionFilterAttributes:
7503675226
description: The object describing attributes of a RUM retention filter.
7503775227
properties:
@@ -154163,6 +154353,142 @@ paths:
154163154353
tags:
154164154354
- Rum Metrics
154165154355
x-codegen-request-body-name: body
154356+
/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}:
154357+
delete:
154358+
description: Delete the RUM rate limit configuration for a given scope.
154359+
operationId: DeleteRumRateLimitConfig
154360+
parameters:
154361+
- $ref: "#/components/parameters/RumRateLimitScopeTypeParameter"
154362+
- $ref: "#/components/parameters/RumRateLimitScopeIDParameter"
154363+
responses:
154364+
"204":
154365+
description: No Content
154366+
"400":
154367+
$ref: "#/components/responses/BadRequestResponse"
154368+
"403":
154369+
$ref: "#/components/responses/NotAuthorizedResponse"
154370+
"404":
154371+
$ref: "#/components/responses/NotFoundResponse"
154372+
"429":
154373+
$ref: "#/components/responses/TooManyRequestsResponse"
154374+
summary: Delete a RUM rate limit configuration
154375+
tags:
154376+
- Rum Rate Limit
154377+
x-unstable: |-
154378+
**Note**: This endpoint is in preview and is subject to change.
154379+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
154380+
get:
154381+
description: Get the RUM rate limit configuration for a given scope.
154382+
operationId: GetRumRateLimitConfig
154383+
parameters:
154384+
- $ref: "#/components/parameters/RumRateLimitScopeTypeParameter"
154385+
- $ref: "#/components/parameters/RumRateLimitScopeIDParameter"
154386+
responses:
154387+
"200":
154388+
content:
154389+
application/json:
154390+
examples:
154391+
default:
154392+
value:
154393+
data:
154394+
attributes:
154395+
custom:
154396+
daily_reset_time: "08:00"
154397+
daily_reset_timezone: "+09:00"
154398+
quota_reached_action: stop
154399+
session_limit: 1000000
154400+
window_type: daily
154401+
mode: custom
154402+
org_id: 2
154403+
updated_at: "2026-03-04T15:37:54.951447Z"
154404+
updated_by: test@example.com
154405+
id: cd73a516-a481-4af5-8352-9b577465c77b
154406+
type: rum_rate_limit_config
154407+
schema:
154408+
$ref: "#/components/schemas/RumRateLimitConfigResponse"
154409+
description: OK
154410+
"400":
154411+
$ref: "#/components/responses/BadRequestResponse"
154412+
"403":
154413+
$ref: "#/components/responses/NotAuthorizedResponse"
154414+
"404":
154415+
$ref: "#/components/responses/NotFoundResponse"
154416+
"429":
154417+
$ref: "#/components/responses/TooManyRequestsResponse"
154418+
summary: Get a RUM rate limit configuration
154419+
tags:
154420+
- Rum Rate Limit
154421+
x-unstable: |-
154422+
**Note**: This endpoint is in preview and is subject to change.
154423+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
154424+
put:
154425+
description: |-
154426+
Create or update the RUM rate limit configuration for a given scope.
154427+
Returns the rate limit configuration object when the request is successful.
154428+
operationId: UpdateRumRateLimitConfig
154429+
parameters:
154430+
- $ref: "#/components/parameters/RumRateLimitScopeTypeParameter"
154431+
- $ref: "#/components/parameters/RumRateLimitScopeIDParameter"
154432+
requestBody:
154433+
content:
154434+
application/json:
154435+
examples:
154436+
default:
154437+
value:
154438+
data:
154439+
attributes:
154440+
custom:
154441+
daily_reset_time: "08:00"
154442+
daily_reset_timezone: "+09:00"
154443+
quota_reached_action: stop
154444+
session_limit: 1000000
154445+
window_type: daily
154446+
mode: custom
154447+
id: cd73a516-a481-4af5-8352-9b577465c77b
154448+
type: rum_rate_limit_config
154449+
schema:
154450+
$ref: "#/components/schemas/RumRateLimitConfigUpdateRequest"
154451+
description: The definition of the RUM rate limit configuration to create or update.
154452+
required: true
154453+
responses:
154454+
"200":
154455+
content:
154456+
application/json:
154457+
examples:
154458+
default:
154459+
value:
154460+
data:
154461+
attributes:
154462+
custom:
154463+
daily_reset_time: "08:00"
154464+
daily_reset_timezone: "+09:00"
154465+
quota_reached_action: stop
154466+
session_limit: 1000000
154467+
window_type: daily
154468+
mode: custom
154469+
org_id: 2
154470+
updated_at: "2026-03-04T21:52:53.526022Z"
154471+
updated_by: test@example.com
154472+
id: cd73a516-a481-4af5-8352-9b577465c77b
154473+
type: rum_rate_limit_config
154474+
schema:
154475+
$ref: "#/components/schemas/RumRateLimitConfigResponse"
154476+
description: OK
154477+
"400":
154478+
$ref: "#/components/responses/BadRequestResponse"
154479+
"403":
154480+
$ref: "#/components/responses/NotAuthorizedResponse"
154481+
"404":
154482+
$ref: "#/components/responses/NotFoundResponse"
154483+
"429":
154484+
$ref: "#/components/responses/TooManyRequestsResponse"
154485+
summary: Create or update a RUM rate limit configuration
154486+
tags:
154487+
- Rum Rate Limit
154488+
x-codegen-request-body-name: body
154489+
x-unstable: |-
154490+
**Note**: This endpoint is in preview and is subject to change.
154491+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
154166154492
/api/v2/rum/events:
154167154493
get:
154168154494
description: |-
@@ -180112,6 +180438,9 @@ tags:
180112180438
description: Find out more at
180113180439
url: https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/
180114180440
name: Rum Metrics
180441+
- description: |-
180442+
Manage RUM rate limit configurations for your organization's RUM applications.
180443+
name: Rum Rate Limit
180115180444
- description: Manage heatmap snapshots for RUM replay sessions. Create, update, delete, and retrieve snapshots to visualize user interactions on specific views.
180116180445
name: Rum Replay Heatmaps
180117180446
- description: Create and manage playlists of RUM replay sessions. Organize, categorize, and share collections of replay sessions for analysis and collaboration.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Delete a RUM rate limit configuration returns "No Content" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_rum_rate_limit::RumRateLimitAPI;
4+
use datadog_api_client::datadogV2::model::RumRateLimitScopeType;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.DeleteRumRateLimitConfig", true);
10+
let api = RumRateLimitAPI::with_config(configuration);
11+
let resp = api
12+
.delete_rum_rate_limit_config(
13+
RumRateLimitScopeType::APPLICATION,
14+
"cd73a516-a481-4af5-8352-9b577465c77b".to_string(),
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}

0 commit comments

Comments
 (0)