Skip to content

Update a recording rule: fields left out keep their value, the result is validated whole, and the SDK config is published.

PUT
/rum/{app_id}/rules/{rule_id}
curl --request PUT \
--url https://api.siteqwality.com/rum/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "capture": "analyze", "enabled": true, "sample_rate": 1, "auto_sample": true, "conditions": [ { "op": "contains", "value": "example", "kind": "url" } ], "min_duration_ms": 1, "require_interaction": true, "position": 1 }'
app_id
required
string format: uuid

RUM application identifier

rule_id
required
string format: uuid

Recording rule identifier

Media type application/json

Body of PUT /rum/{app_id}/rules/{rule_id}. Every field is optional: one left out keeps its stored value, and the result is validated as a whole.

object
name
string | null
capture
One of:
null
enabled
boolean | null
sample_rate
number | null format: double
auto_sample
boolean | null
conditions

Replaces the whole list when given.

array | null
One of:

The page URL, checked on each view. regex values use the common subset of the Rust and JavaScript syntaxes, at most 256 characters, with no nested quantifiers.

object
op
required
string
Allowed values: contains starts_with regex
value
required
string
kind
required
string
Allowed values: url
min_duration_ms
integer | null format: int32
require_interaction
boolean | null
position
integer | null format: int32

Rule updated

Media type application/json

A recording rule.

object
id
required
string format: uuid
application_id
required
string format: uuid
name
required
string
capture
required

What a matching session records. Replay implies Analyze.

string
Allowed values: analyze replay
enabled
required
boolean
sample_rate
required

The configured rate, 0.00001 to 1. For an Auto rule, the most Auto may set.

number format: double
auto_sample
required

Auto: the rate follows the replay quota, recomputed hourly (Replay rules only).

boolean
effective_sample_rate

The rate the SDK uses when the sampling tick has set one: the Auto rate, or a lowered rate for an error rule when errored sessions alone would exhaust the replay quota.

number | null format: double
effective_rate_at
string | null format: date-time
conditions
required

All must hold. Empty means every session.

Array
One of:

The page URL, checked on each view. regex values use the common subset of the Rust and JavaScript syntaxes, at most 256 characters, with no nested quantifiers.

object
op
required
string
Allowed values: contains starts_with regex
value
required
string
kind
required
string
Allowed values: url
min_duration_ms
required

Sampled recordings upload only once the session is this old. Error conditions bypass it.

integer format: int32
require_interaction
required

Sampled recordings upload only after a user interaction. Error conditions bypass it.

boolean
position
required
integer format: int32
created_by_user_id
string | null format: uuid
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{
"capture": "analyze",
"conditions": [
{
"op": "contains",
"kind": "url"
}
]
}

Invalid rule

Missing or invalid authentication

Application or rule not found

Internal server error

The SDK config could not be published; nothing was changed