Skip to main content
POST
/
rum
/
data
/
query
Query RUM data
curl --request POST \
  --url 'https://api.flashcat.cloud/rum/data/query?app_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start_time": 1712620800000,
  "end_time": 1712707200000,
  "queries": [
    {
      "id": "errors_by_type",
      "sql": "SELECT error.type, count(*) AS errors FROM error GROUP BY error.type ORDER BY errors DESC LIMIT 10",
      "format": "table",
      "time_zone": "Asia/Shanghai"
    }
  ]
}
'
{
  "request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
  "data": {
    "errors_by_type": {
      "data": {
        "fields": [
          {
            "name": "error.type",
            "type": "String",
            "nullable": false
          },
          {
            "name": "errors",
            "type": "UInt64",
            "nullable": false
          }
        ],
        "values": [
          [
            "TypeError",
            1523
          ],
          [
            "ReferenceError",
            342
          ]
        ]
      }
    }
  }
}

Restrictions

AspectValue
Rate limits1,000 requests/minute; 50 requests/second per account
PermissionsNone — any valid app_key can call this operation

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 required Unix epoch milliseconds. The maximum time range is 31 days.
  • Use format: table for tabular results, or format: time_series for bucketed time-series results.
  • For time_series, interval defaults to 3600 seconds and max_points defaults to 1226 when omitted.
  • search_after_ctx is returned by paginated table queries and can be sent back to continue scanning.

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

Batch of RUM data queries over a bounded time range.

start_time
integer<int64>
required

Start of the query window, Unix epoch milliseconds.

Example:

1712620800000

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

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
required

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