query_segmentation_report
Analyze event data with custom metrics, date range, and time granularity, applying filters and dimensions for segmentation.
Instructions
查询事件分析报告。参数直接对应神策 OpenAPI 的 SegmentationReportRequest 结构。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | 查看的时间粒度:HOUR(按小时)、DAY(按天)、WEEK(按周)、MONTH(按月)、YEAR(按年) | |
| limit | No | 返回的最大行数,-1 表示返回尽量多的数据 | |
| filter | No | 全局过滤条件,格式为 {"relation":"AND","conditions":[{"field":"event.$Anything.$country","function":"equal","params":["中国"]}]} | |
| rollup | No | 查询汇总或者明细数据,true 为汇总,false 为明细 | |
| to_date | Yes | 查询日期范围的结束时间,格式为 yyyy-MM-dd,例如 2026-01-31 | |
| measures | Yes | 要查询的指标集合,例如 [{"event_name":"$MPShow","aggregator":"general"}] | |
| by_fields | No | 按什么维度查看,例如 ["event.$Anything.$country", "user.province"] | |
| from_date | Yes | 查询日期范围的开始时间,格式为 yyyy-MM-dd,例如 2026-01-01 | |
| use_cache | No | 是否使用缓存 | |
| sampling_factor | No | 抽样因子,64 为全量,32 为 1/2 抽样 |