Skip to main content
POST
Query RUM data

Time range alignment and caching

So that repeated queries can reuse cached results, the time range of aggregation queries is aligned to a grid:
  • format=time_series: the start is rounded down and the end rounded up to the interval. The number and positions of buckets do not change; the first and last buckets now cover their full interval instead of a partial one.
  • Aggregate (non-time-series) queries: the start is rounded down and the end rounded up to max(1 minute, range ÷ 1226 rounded up to the next standard interval step), for example 24h aligns to 2 minutes, 7d to 10 minutes, and 30d to 1 hour. Ranges shorter than 100 grid steps are neither aligned nor cached. At most one grid step of extra data is included at the start; the end rounds into the future, which holds no data.
  • Detail/list queries (no aggregation, pagination), and queries whose SQL calls functions that depend on when they run, such as now(), are neither aligned nor cached.
Results may be up to 60 seconds stale for the most recent data.

Restrictions

Usage

  • Send 1 to 10 queries in one request; each query id becomes a key in the response object.
  • start_time and end_time are Unix epoch milliseconds, at most 31 days apart. The server adds the time-range and account filters itself; you do not need them in sql.
  • FROM names a RUM scope table: sessions, views, actions, errors, resources, long_tasks, vitals, issues or sourcemaps (the singular form is also accepted). Column names are the field_key values returned by POST /rum/field/list.
  • A query whose top-level AND conditions pin application_id (= or IN) must name applications the caller can read: a private application the caller’s team does not own fails the whole request with AccessDenied, an unknown one with ResourceNotFound, and one request may name at most 50 distinct applications. A query that names no application silently skips the private applications the caller cannot read.
  • Malformed SQL, an invalid time_zone or an out-of-range time window fails the whole request with InvalidParameter. A query that fails later (unknown table or column, invalid search_after_ctx, database error) only sets error on its own entry, with code InternalError; the other queries still return data. A dql the parser rejects also fails only its own entry, with code InvalidParameter and a message naming the query.
  • values is column-major: values[i] holds every row’s value of column fields[i].
  • table queries return at most 1,000 rows; a missing LIMIT or one above 1,000 is replaced with 1,000. A non-aggregate query with ORDER BY and no OFFSET returns search_after_ctx when the page is full — send it back with the same sql to get the next page.
  • time_series queries get a ts column prepended (bucket start, Unix milliseconds), grouped and ordered by it. The bucket width, returned as interval in milliseconds, is the smallest step from a fixed ladder (1, 2, 5, 10, 20, 50, 100, 200, 500 ms; 1, 2, 5, 10, 15, 30 s; 1, 2, 5, 10, 15, 30 min; 1, 2, 3, 6, 12 h; 1, 2, 3, 7 d; 30, 60, 90, 180 d) that is at least both interval and the window length divided by max_points.
  • On large time windows an aggregate query may run on sampled data; the response then carries sampling, and COUNT, SUM and COUNT(DISTINCT) columns are already multiplied by scale_factor. Set disable_sampling: true to always query the full data.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json

Batch of RUM data queries over a bounded time range.

end_time
integer<int64>
required

End of the query window, Unix epoch milliseconds. Maximum 31-day span.

Example:

1712707200000

queries
object[]
required

Queries to execute concurrently. 1 to 10 queries are allowed.

Required array length: 1 - 10 elements
start_time
integer<int64>
required

Start of the query window, Unix epoch milliseconds.

Example:

1712620800000

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

Map from request query ID to that query's result or error.