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
| Type | Description |
|---|---|
session_start | Session began |
session_end | Session ended |
view | Page/view changed |
action | User action (click, scroll) |
error | JavaScript error |
resource | Network request |
vital | Core Web Vital |
long_task | Long task detected |
log | Custom log |