List ad accounts, campaigns, ad sets, or ads — with optional metric aggregation — from the ads-platform integrations connected to your pixel. WrapsDocumentation Index
Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/query-channel-details — see the
API reference.
The grain is controlled by --dimensions:
- omit it for account grain (the default; one row per ad account across every connected platform — Facebook, Google, TikTok),
- pass exactly one of
campaign,adset, oradfor that grain.
--date-start / --date-end are omitted, the response is an
entity-only listing (no metric aggregation). To scope by ad platform, use a
canonical filter on channel.resource_source (not a dimension).
Usage
Required flags
| Flag | Description |
|---|---|
--granularity <g> | hour, day, week, month, or year. |
Optional flags
| Flag | Description | Default |
|---|---|---|
--dimensions <grain> | campaign, adset, or ad. Omit for account grain. | (account) |
--date-start <YYYY-MM-DD> --date-end <YYYY-MM-DD> | Date range. Required together with --measures (entity-list-only when absent). | |
--measures <m1,m2,...> | Comma-separated measure ids (e.g. channel.spend, channel.impressions, meta.cpm). | |
--filter <json> | Canonical Filter as JSON. | |
--timezone <tz> | IANA timezone. | UTC |
--limit <n> | Max rows returned (1–500). | 50 |
--offset <n> | Skip the first N rows. | 0 |
--sort-by <field> | One of sourceUpdatedAt, sourceCreatedAt, resourceName. | sourceUpdatedAt |
--sort-direction <dir> | asc or desc (case-insensitive). | desc |
upstack query for the shared output /
from-file flags.
Examples
See also
upstack filters— discover valid filter fields, operators, and applicable contexts (everychannel.*field is valid here).upstack measures— list measure ids available across all query endpoints.