Skip to main content
POST
Count facet value distribution

Restrictions

Usage

  • Use POST /rum/field/list with is_facet: true to discover available facet_key values for each scope.
  • The scope must be one of: session, view, action, error, resource, long_task, vital, issue, sourcemap.
  • Pass dql to further filter events before counting. DQL syntax follows the RUM query language.
  • Pass sql with a WHERE-clause only (no SELECT) for SQL-style filtering.
  • Default limit is 100; maximum is 100.
  • Time range is required (start_time / end_time in Unix epoch milliseconds). Maximum span is 31 days.

Authorizations

app_key
string
query
required

App key issued from the Flashduty console under Account → APP Keys. Required on every public API call. Keep it secret — it grants the same access as the owning account.

Body

application/json

Parameters for counting facet value distribution.

end_time
integer<int64>
required

End of the time range, Unix epoch milliseconds. Maximum 31-day span.

Example:

1712707200000

facet_key
string
required

Field key whose value distribution to count; must be a registered field of the given scope. List available fields via POST /rum/field/list.

scope
enum<string>
required

RUM data scope to query. One of:

Available options:
session,
view,
action,
error,
resource,
long_task,
vital,
issue,
sourcemap
start_time
integer<int64>
required

Start of the time range, Unix epoch milliseconds.

Example:

1712620800000

dql
string

RUM DQL filter expression applied before counting.

facet_value
any

When set, filter events where facet_key equals this value before counting. Accepts string, number, or boolean.

kind
enum<string>

Symbol kind, used only when scope is sourcemap and only meaningful for android/harmony: mapping (default) selects ProGuard/R8 mappings or ArkTS sourcemaps, native selects native .so symbols.

Available options:
mapping,
native
limit
integer
default:100

Maximum number of top values to return. Default 100, maximum 100.

Required range: x <= 100
sql
string

SQL WHERE clause (no SELECT) for additional filtering.

type
enum<string>

Symbol-store platform, used only when scope is sourcemap. Defaults to browser when omitted; web and javascript are accepted aliases of browser.

Available options:
browser,
web,
javascript,
android,
ios,
miniprogram,
harmony,
flutter,
electron,
react-native

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.

data
object
required

Top N facet values sorted by count descending.

request_id
string
required

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

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"