Query Generic Time Series Data

Fetches time-bucketed data from a specified table, allowing for dynamic aggregations, filtering, and pivoting.

This powerful and flexible endpoint can be used to generate data for charts and dashboards. It supports a wide range of aggregation functions, including percentiles and histograms.

Key Features:

  • Dynamic Metrics & Aggregations: Specify multiple columns and aggregation functions.
  • Pivoting: Create pivot-table-like results using the pivot_on parameter.
  • Advanced Aggregations: Includes count, sum, avg, min, max, stddev, variance, median, percentiles (p50, p99.9), and histogram.
  • Time Bucketing: Group data into intervals (e.g., 1 hour, 1 day). The API ensures a continuous time series by filling gaps with null or 0 values.
  • Filtering: Apply standard filters on columns. Supported operators include $eq, $ne, $gt, $gte, $lt, $lte, $like, and $in.
  • Result Limiting: The API returns a maximum of 10,000 time buckets per request.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
enum
required

The name of the database table to query.

Query Params
string

A comma-separated list of numeric columns on which to perform aggregations. This parameter is required unless the aggregation is exclusively count. When using pivot_on, exactly one metric is required.

string
Defaults to count

A comma-separated list of aggregation functions to apply to each metric. Defaults to count. Supported functions:

  • count: Number of records.
  • sum: Sum of the values.
  • avg: Average of the values.
  • min: Minimum value.
  • max: Maximum value.
  • stddev (or std): Sample standard deviation.
  • variance (or var): Sample variance.
  • median: The 50th percentile (equivalent to p50).
  • pX: Continuous percentile, where X is a number between 0 and 100 (e.g., p50, p95, p99.9).
  • histogram: Generates a fixed-bucket histogram (requires histogram_* parameters).
string
Defaults to 1 day

The time bucket for the aggregation (e.g., 1 day, 1 hour, 30 minute). Defaults to 1 day.

date-time

The start of the time range for the query (inclusive), in ISO 8601 format. Defaults to 7 days ago.

date-time

The end of the time range for the query (inclusive), in ISO 8601 format. Defaults to the current time.

date-time

The start of the time range for the query (exclusive), in ISO 8601 format.

date-time

The end of the time range for the query (exclusive), in ISO 8601 format.

string

The column to pivot on. When used, the query will generate a separate series for each unique value in this column.

  • Functionality: This is required to enable any pivoting (pivot_values or pivot_top_n).
  • Limit: The number of unique pivot values returned is capped at 100.
string

A comma-separated list of specific values to pivot on. This provides manual control over which series are returned.

  • Precedence: If pivot_values is provided, pivot_top_n is ignored.
  • Limit: A maximum of 100 values can be provided.
integer
1 to 100
Defaults to 10

An integer (1-100) to automatically pivot on the top N most frequent items in the pivot_on column.

  • Behavior: This is ignored if pivot_values is specified. If neither is provided, it defaults to 10.
  • Use Case: Ideal for high-cardinality fields like device_id where you want to see the most significant actors (e.g., the top 5 most error-prone devices).
number

The lower bound for the histogram. Required if aggregation=histogram.

number

The upper bound for the histogram. Required if aggregation=histogram.

integer

The number of buckets for the histogram. Required if aggregation=histogram.

Responses

400

The request was malformed or contained invalid parameters.

403

You are forbidden from accessing this resource

500

An unexpected error was encountered.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json