--entity-level (required) | adaccount|campaign|adsquad|ad | Which level of the hierarchy to pull stats for |
--entity-id | <id> | Required for campaign/adsquad/ad. For adaccount, omit it: it defaults to the ad account this workspace is connected to, and any other account is refused. |
--granularity | TOTAL|DAY|HOUR|LIFETIME=DAY | DAY needs start_time/end_time within 31 days; HOUR within 7 days; TOTAL/LIFETIME need no date range (LIFETIME is finalized-only data). |
--breakdown | ad|adsquad|campaign | One call per parent: ‘ad’ at any level, ‘adsquad’ on a campaign, ‘campaign’ on an ad account. |
--fields | '<json>' | Metric names, e.g. impressions, swipes, spend, video_views_5s |
--start-time | <start-time> | ISO 8601, required for DAY/HOUR granularity |
--end-time | <end-time> | ISO 8601, required for DAY/HOUR granularity |
--dimension | GEO|DEMO|INTEREST|DEVICE | Insights breakdown dimension (DAY/TOTAL/LIFETIME only) |
--pivot | '<json>' | Pivot fields for the chosen dimension, e.g. gender,age_bucket for DEMO |
--swipe-up-attribution-window | 1_DAY|7_DAY|28_DAY | Default 28_DAY |
--view-attribution-window | none|1_HOUR|3_HOUR|6_HOUR|1_DAY|7_DAY | Default 1_DAY |