Skip to main content
Run a measures-and-dimensions query against your event stream. Wraps POST /api/query. See Run an analytics query for the full request and response reference.

Usage

Required flags

Optional flags

Shared flags

All query commands (query, query-attribution, query-cohort) support these:

Examples

Filters

--filter takes a canonical Filter JSON object. The shape is a recursive { and | or | not } group tree with leaves of the form { field, op, value }:
Field ids are namespaced (orders.*, channel.*, attribution.*, events.*, emq.*) and each one is only valid in certain contexts. Run upstack filters --detail to list every field with its operators and applicable contexts before constructing a filter.

Save a query for reuse

See upstack saved for the full reference.

See also

  • upstack query-channel-details — for channel entity breakdowns (one row per campaign, ad set, or ad), use --dimensions campaign|adset|ad there instead; upstack query --dimensions is for event dimensions such as utm_source.
  • upstack query-ads — flat one-row-per-ad listing with optional daily metrics and a compare period.