Skip to main content

RUM Ingestion API

Endpoints for Real User Monitoring data ingestion.

POST /rum/events

Ingest RUM events (typically called by the SDK):

curl -X POST https://api.simplr-ai.com/v1/rum/events \
-H "X-API-Key: sk_live_xxxxx" \
-d '{
"session_id": "sess_abc123",
"events": [
{
"type": "view",
"timestamp": "2024-01-15T10:30:00Z",
"view": {
"name": "Dashboard",
"url": "/dashboard"
}
},
{
"type": "error",
"timestamp": "2024-01-15T10:30:05Z",
"error": {
"message": "TypeError: Cannot read property",
"stack": "...",
"type": "TypeError"
}
}
]
}'

GET /rum/usage

Get RUM usage statistics:

curl https://api.simplr-ai.com/v1/rum/usage \
-H "X-API-Key: sk_live_xxxxx"

Response:

{
"success": true,
"content": {
"sessions_this_month": 4523,
"events_this_month": 156789,
"credits_used_this_month": 5234
}
}

Event Types

TypeDescription
session_startSession began
session_endSession ended
viewPage/view changed
actionUser action (click, scroll)
errorJavaScript error
resourceNetwork request
vitalCore Web Vital
long_taskLong task detected
logCustom log