Query Analytics
Execute a flexible analytics query against RUM data.
Metrics: lcp, fcp, cls, inp, ttfb, tbt, page_load_time, requests,
visitors (distinct visitors; identity=stitch|session picks the backing
identifier, stitch preferred), etc.
Aggregations: count, avg, p50, p75, p90, p95, p99, min, max, sum
Grouping: By time intervals (hour, day, week, month) and/or dimensions (browser, device_type, country, etc.)
Filters: site_id, browser, device_type, country, url (with wildcards), etc.
Comparison: Set compare_to to compare with previous_period, previous_week, or previous_month
Limits:
- Max 90 days time range
- Max 10 metrics per query
- Max 2 GROUP BY dimensions
- Max 10,000 rows per response
Authorization
bearerAuth API token generated from the fastmon dashboard (Account → API Token). Send as Authorization: Bearer fm_... or paste the full token (including the fm_ prefix) into the Authorize dialog.
In: header
Path Parameters
uuidRequest Body
application/json
Main request schema for analytics queries.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/analytics/query" \ -H "Content-Type: application/json" \ -d '{ "time_range": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }, "metrics": [ "string" ] }'{ "data": [ { "timestamp": "2019-08-24T14:15:22Z", "dimensions": { "property1": "string", "property2": "string" }, "metrics": [ { "metric": "string", "aggregation": "count", "value": 0 } ], "beacons": 0, "comparison": { "metrics": [ { "metric": "string", "aggregation": "count", "value": 0 } ], "beacons": 0, "change_percent": 0 } } ], "meta": { "total_rows": 0, "returned_rows": 0, "execution_time_ms": 0, "query_hash": "string", "time_range": {}, "comparison_time_range": {}, "applied_filters": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}{ "error": { "code": "string", "message": "string", "request_id": "string", "doc_url": "string", "details": {} }}