menu
Is this helpful?

# 事件分析模型 API

调用方法请参见Open API文档中的调用方法描述。

可阅读使用手册中 事件分析 了解使用场景。

# 事件分析查询

接口URL

/open/event-analyze?token=xxx

请求方式

POST

Content-Type

application/json

请求Query参数

参数名 示例值 参数类型 是否必填 参数描述
token xxx String 查询密钥

# 请求Body参数

{
    "eventView": {
        "comparedByTime": true,
        "comparedStartTime": "2021-12-14 00:00:00",
        "comparedEndTime": "2021-12-20 23:59:59",
        "comparedRecentDay": "8-14",
        "startTime": "2021-12-21 00:00:00",
        "endTime": "2021-12-27 23:59:59",
        "recentDay": "1-7",
        "timeParticleSize": "day",
        "eventSplit": {
            "event": {
                "eventDesc": "登录",
                "eventName": "login"
            },
            "groupByProp": {
                "columnDesc": "浏览器",
                "columnName": "browser",
                "propertyRange": "",
                "tableType": "event"
            }
        },
        "groupBy": [{
            "columnDesc": "品牌",
            "columnName": "brand",
            "propertyRange": "",
            "specifiedClusterDate": "2021-12-28",
            "tableType": "event"
        }],
        "relation": "and",
        "filts": [{
            "columnDesc": "品牌",
            "columnName": "brand",
            "comparator": "equal",
            "filterType": "SIMPLE",
            "ftv": ["苹果", "小米"],
            "specifiedClusterDate": "2021-12-28",
            "tableType": "event",
            "timeUnit": ""
        }],
        "queryFeature": {
            "approximateOn": true,
            "globalQueryOn": false
        }
    },
    "events": [{
        "analysis": "TOTAL_TIMES",
        "analysisParams": "",
        "eventName": "login",
        "eventNameDisplay": "登录的总次数",
        "eventSplitIndexes": [0],
        "eventUuid": "7FonAy-G",
        "filts": [],
        "quota": "",
        "relation": "and",
        "type": "normal"
    }, {
        "analysis": "TRIG_USER_NUM",
        "analysisParams": "",
        "eventName": "activity_attend",
        "eventNameDisplay": "参加活动的触发用户数",
        "eventUuid": "K9A5NDAz",
        "filts": [{
            "columnDesc": "app版本",
            "columnName": "app_version",
            "comparator": "notNull",
            "filterType": "SIMPLE",
            "ftv": [],
            "specifiedClusterDate": "2021-12-28",
            "tableType": "event",
            "timeUnit": ""
        }],
        "quota": "",
        "quotaEntities": [{
            "index": 0,
            "taIdMeasure": {
                "columnDesc": "用户唯一ID",
                "columnName": "#user_id",
                "tableType": "event"
            }
        }],
        "relation": "and",
        "type": "normal"
    }, {
        "customEvent": "logout.PER_CAPITA_TIMES",
        "customFilters": [],
        "eventName": "自定义指标",
        "eventNameDisplay": "",
        "eventSplitIndexes": [],
        "eventUuid": "gxqT19xz",
        "filts": [],
        "format": "float",
        "quota": "",
        "quotaEntities": [{
            "index": 0,
            "taIdMeasure": {
                "columnDesc": "邮箱",
                "columnName": "email",
                "tableType": "user"
            }
        }],
        "quotaTimeRanges": [{
            "index": 0,
            "params": ["1"],
            "type": "THIS_WEEK"
        }],
        "relation": "and",
        "type": "customized"
    }],
    "projectId": 377,
    "useSameResultKey": false,
    "useCache": true,
    "limit": 1000,
    "timeoutSeconds": 10,
    "zoneOffset": 10
}

提示

入参由多部分组成其中:基础参数必选;时间对比参数、事件拆分参数、分组项参数、全局筛选项参数、查询配置项参数可选;普通分析指标和自定义分析指标二选一。

# 请求参数说明

$$参数名 示例值 参数类型 是否必填 参数描述
eventView - Object 指标公共属性部分
eventView.comparedByTime true Boolean 是否对比时间,TRUE:是,FALSE:否
eventView.comparedStartTime 2021-12-14 00:00:00 String 对比时间开始时间(格式:yyyy-MM-dd HH:mm:ss),对比时间相对时间为空时有效
eventView.comparedEndTime 2021-12-20 23:59:59 String 对比时间结束时间(格式:yyyy-MM-dd HH:mm:ss),对比时间相对时间为空时有效
eventView.comparedRecentDay 8-14 String 对比时间相对时间(comparedByTime为TRUE时,此项不可与对比时间起始时间和对比时间结束时间同时为空)
eventView.startTime 2021-12-21 00:00:00 String 起始时间(格式:yyyy-MM-dd HH:mm:ss),相对时间为空时有效
eventView.endTime 2021-12-27 23:59:59 String 结束时间(格式:yyyy-MM-dd HH:mm:ss),相对时间为空时有效
eventView.recentDay 1-7 String 相对时间(此项不可与起始时间和结束时间同时为空)
eventView.relation and String 逻辑关系,and:逻辑与,or:逻辑或
eventView.timeParticleSize day String 分析的时间单位
  • minute:按1分钟

  • minute5:按5分钟(v3.5开始支持)

  • minute10:按10分钟(v3.5开始支持)

  • hour:按小时

  • day:按天

  • week:按周

  • month:按月

  • total:总计

eventView.eventSplit - Object 事件拆分信息
eventView.eventSplit.event - Object 事件拆分事件信息
eventView.eventSplit.event.eventDesc 登录 String 事件拆分指标显示名
eventView.eventSplit.event.eventName login String 事件拆分指标事件名
eventView.eventSplit.groupByProp - Object 事件拆分指标分组信息
eventView.eventSplit.groupByProp.columnDesc 浏览器 String 事件拆分分组字段显示名
eventView.eventSplit.groupByProp.columnName browser String 事件拆分分组字段字段名
eventView.eventSplit.groupByProp.propertyRange String 事件拆分分组属性区间
eventView.eventSplit.groupByProp.tableType event String 表类型枚举值
eventView.groupBy - List 分组属性,可以有零个或者多个
eventView.groupBy.columnName brand String 字段名
eventView.groupBy.columnDesc 品牌 String 字段显示名
eventView.groupBy.propertyRange String 自定义属性区间
eventView.groupBy.propertyRangeType String 属性区间类型,对数值型属性进行分组时,可以为自定义分桶条件
  • def:默认区间,由系统自动划分

  • discrete:每个值为一个独立的分组

  • user_defined:用户自定义。自定义内容设置在 propertyRange 中

eventView.groupBy.specifiedClusterDate 2021-12-28 String 指定对应日期的标签历史版本
eventView.groupBy.tableType event String 表类型枚举值
eventView.filts - List 全局筛选项
eventView.filts.columnDesc 品牌 String 字段显示名
eventView.filts.columnName brand String 字段名
eventView.filts.comparator equal String 参考: 模型查询API的筛选表达式
eventView.filts.filterType SIMPLE String 过滤模式,SIMPLE:简单,COMPOUND:复合,默认SIMPLE
eventView.filts.ftv ["苹果", "小米"] List 用于属性比较边界的字面常量
eventView.filts.specifiedClusterDate 2021-12-28 String 指定对应日期的标签历史版本
eventView.filts.tableType event String 表类型枚举值
eventView.filts.timeUnit String 属性对比值单位,仅对relativeEvent*有效:day,hour,minute
eventView.queryFeature - Object 查询配置
eventView.queryFeature.approximateOn true Boolean 是否开启近似计算
events - List 事件指标列表
events.analysis TRIG_USER_NUM String 分析角度,聚合操作,具体见事件聚合类型枚举值
events.analysisParams String 分析角度参数(analysis为PERCENTILE时不能为空,取值范围:1-100,代表几分位)
events.eventName activity_attend String 事件名称,特别的,可以使用 anyEvent 表示任意事件
events.eventNameDisplay 参加活动的触发用户数 String 事件显示名
events.metricName retention_rate_1 String 查询的指标,代表固化的分析口径。 根据指标查询时,events.eventName可设置为自定义指标
events.eventUuid K9A5NDAz String 事件UUID,用来标识事件唯一
events.filts - List 条件列表列表
events.filts.columnDesc app版本 String 字段显示名
events.filts.columnName app_version String 字段名称
events.filts.comparator notNull String 参考:模型查询API的筛选表达式
events.filts.filterType SIMPLE String 过滤模式,SIMPLE:简单,COMPOUND:复合,默认SIMPLE
events.filts.ftv [] List 用于属性比较的边界字面常量
events.filts.specifiedClusterDate 2021-12-28 String 指定对应日期的标签历史版本
events.filts.tableType event String 表类型枚举值
events.filts.timeUnit String 过滤时间单位
events.quota String 指标属性(配合analysis,意思是哪个属性的哪个分析角度)
events.quotaDesc String 指标属性显示名
events.quotaEntities - List 分析事件指标对应的主体列表
events.quotaEntities.index 0 Integer 分析事件指标对应的主体下标
events.quotaEntities.taIdMeasure - Object 查询ID体系配置
events.quotaEntities.taIdMeasure.columnDesc 用户唯一ID String 字段显示名
events.quotaEntities.taIdMeasure.columnName #user_id String 字段名称
events.quotaEntities.taIdMeasure.tableType event String 表类型枚举值
events.relation and String 逻辑关系,and:逻辑与,or:逻辑或
events.type normal String normal:普通分析 customized:自定义公式
events.customEvent logout.PER_CAPITA_TIMES String 公式表达式,由分析项或数值常量的加减乘除构成。分析项有两种形式: eventName.columnName.analysis 或 eventName.analysis。 公式中含分析指标的时候用固定前缀+指标名称的方式,比如: $metric.metricName/eventName.columnName.analysis或者 $metric.metricName1/$metric.metricName2
events.customFilters [] List 公式表达式过滤项列表
events.eventName 自定义指标 String 指标事件名称,可以使用 anyEvent 表示任意事件
events.eventNameDisplay String 自定义指标显示名
events.eventSplitIndexes [] List 参与事件拆分的项
events.format float String 展示数据的选项 float:两位小数,float3:三位小数,float4:四位小数,percent:百分比
events.quota String 指标属性(配合analysis,意思是哪个属性的哪个分析角度)
events.quotaDesc String 指标属性显示名
events.quotaEntities - List 分析事件指标对应的主体列表
events.quotaEntities.index 0 Integer 分析事件指标对应的主体下标
events.quotaEntities.taIdMeasure - Object 查询ID体系配置
events.quotaEntities.taIdMeasure.columnDesc 邮箱 String 字段显示名
events.quotaEntities.taIdMeasure.columnName email String 字段名称
events.quotaEntities.taIdMeasure.tableType user String 表类型枚举值
events.quotaTimeRanges [] List 指标时间段信息列表
events.quotaTimeRanges.index 0 Integer 时间段下标
events.quotaTimeRanges.params ["1"] List 时间段参数,当 events.quotaTimeRanges.type 为 TIME_RANGE 时,params 为["-3", "4"],表示过去 3 天到未来 4 天
events.quotaTimeRanges.type THIS_WEEK String 时间段类型 LAST_DAYS:过去几天,RECENT_DAYS:最近几天,THIS_WEEK:当周,THIS_MONTH:当月,TIME_RANGE:时间范围
events.relation and String 逻辑关系,and:逻辑与,or:逻辑或
events.type customized String normal:普通分析 customized:自定义公式
projectId 377 Integer 项目Id
useSameResultKey false Boolean 当事件名相同时,是否使用相同事件名 true:使用相同事件名 false:事件名相同时,添加前缀编号
useCache true Boolean 使用缓存,可选参数,默认为true
limit 1000 Integer 每分析对象的分组数上限,可选参数,默认为1000,最大为10000
timeoutSeconds 10 Integer 请求超时参数,超时则取消查询任务
zoneOffset 10 Integer 时区

# 成功响应示例

{
    "data": {
        "result_generate_time": "2021-12-30 11:15:41", 
        "union_groups": [
            [
                "Safari", 
                "苹果"
            ], 
            [
                "Firefox", 
                "小米"
            ], 
            [
                "微信内置浏览器", 
                "苹果"
            ], 
            [
                "总体", 
                "苹果"
            ], 
            [
                "总体", 
                "小米"
            ]
        ], 
        "x": [
            "2021-12-23", 
            "2021-12-24", 
            "2021-12-25", 
            "2021-12-26", 
            "2021-12-27", 
            "2021-12-28", 
            "2021-12-29"
        ], 
        "x_compared": [
            "2021-12-16", 
            "2021-12-17", 
            "2021-12-18", 
            "2021-12-19", 
            "2021-12-20", 
            "2021-12-21", 
            "2021-12-22"
        ], 
        "y": [
            {
                "login.TOTAL_TIMES": [
                    {
                        "group_cols": [
                            "Safari", 
                            "苹果"
                        ], 
                        "group_num": 3, 
                        "values": [
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "447", 
                            "980", 
                            "1584", 
                            "321", 
                            "285", 
                            "74", 
                            "0"
                        ]
                    }, 
                    {
                        "group_cols": [
                            "Firefox", 
                            "小米"
                        ], 
                        "group_num": 3, 
                        "values": [
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "291", 
                            "818", 
                            "1128", 
                            "272", 
                            "219", 
                            "58", 
                            "0"
                        ]
                    }, 
                    {
                        "group_cols": [
                            "微信内置浏览器", 
                            "苹果"
                        ], 
                        "group_num": 3, 
                        "values": [
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "231", 
                            "500", 
                            "764", 
                            "214", 
                            "155", 
                            "35", 
                            "0"
                        ]
                    }
                ]
            }, 
            {
                "activity_attend.TRIG_USER_NUM": [
                    {
                        "group_cols": [
                            "总体", 
                            "苹果"
                        ], 
                        "group_num": 2, 
                        "values": [
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "640", 
                            "811", 
                            "1251", 
                            "1253", 
                            "720", 
                            "113", 
                            "0"
                        ]
                    }, 
                    {
                        "group_cols": [
                            "总体", 
                            "小米"
                        ], 
                        "group_num": 2, 
                        "values": [
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "277", 
                            "439", 
                            "600", 
                            "666", 
                            "364", 
                            "59", 
                            "0"
                        ]
                    }
                ]
            }, 
            {
                "自定义指标": [
                    {
                        "group_cols": [
                            "总体", 
                            "苹果"
                        ], 
                        "group_num": 2, 
                        "values": [
                            "1", 
                            "1", 
                            "1", 
                            "1", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "1.01", 
                            "1.01", 
                            "1.01", 
                            "1.01", 
                            "1", 
                            "1", 
                            "1"
                        ]
                    }, 
                    {
                        "group_cols": [
                            "总体", 
                            "小米"
                        ], 
                        "group_num": 2, 
                        "values": [
                            "1", 
                            "1", 
                            "1", 
                            "1", 
                            "0", 
                            "0", 
                            "0"
                        ], 
                        "values_compared": [
                            "1.01", 
                            "1.01", 
                            "1.01", 
                            "1.01", 
                            "1", 
                            "1", 
                            "1"
                        ]
                    }
                ]
            }
        ]
    }, 
    "return_code": 0, 
    "return_message": "success"
}

# 响应参数说明

$$参数名 示例值 参数类型 参数描述
data - Object 返回结果
data.result_generate_time 2021-12-29 12:00:00 String 查询结果生成时间
data.union_groups ["苹果"] List 所有分组集合
data.x ["2021-12-23"] List X轴时间
data.x_compared ["2021-12-16"] List X轴对比时间
data.y - List Y轴数据列表
data.y.{指标名称} - List Y轴指标信息列表
data.y.{指标名称}.group_cols ["苹果"] List Y轴指标分组
data.y.{指标名称}.group_num 3 Integer Y轴指标分组数量
data.y.{指标名称}.values ["0"] List Y轴指标数值
data.y.{指标名称}.values_compared ["447"] List Y轴时间对比指标数值
return_code 0 Integer 返回码
return_message success String 返回信息

错误响应示例

{
    "return_code": -1008,
    "return_message": "参数(token)为空"
}
参数名 示例值 参数类型 参数描述
return_code -1008 Integer 返回码
return_message 参数(token)为空 String 返回信息

curl 示例

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"projectId": 377,"useSameResultKey": false,"useCache": true,"limit": 1000,"eventView": {"comparedByTime": true,"comparedStartTime": "2021-12-14 00:00:00","comparedEndTime": "2021-12-20 23:59:59","comparedRecentDay": "8-14","startTime": "2021-12-21 00:00:00","endTime": "2021-12-27 23:59:59","recentDay": "1-7","relation": "and","timeParticleSize": "day","eventSplit": {"event": {"eventDesc": "登录","eventName": "login"},"groupByProp": {"columnDesc": "浏览器","columnName": "browser","propertyRange": "","tableType": "event"}},"groupBy": [{"columnDesc": "品牌","columnName": "brand","propertyRange": "","specifiedClusterDate": "2021-12-28","tableType": "event"}],"filts": [{"columnDesc": "品牌","columnName": "brand","comparator": "equal","filterType": "SIMPLE","ftv": ["苹果", "小米"],"specifiedClusterDate": "2021-12-28","tableType": "event","timeUnit": ""}],"queryFeature": {"approximateOn": true,"globalQueryOn": false}},"events": [{"analysis": "TOTAL_TIMES","analysisParams": "","eventName": "login","eventNameDisplay": "登录的总次数","eventSplitIndexes": [0],"eventUuid": "7FonAy-G","filts": [],"quota": "","relation": "and","type": "normal"}, {"analysis": "TRIG_USER_NUM","analysisParams": "","eventName": "activity_attend","eventNameDisplay": "参加活动的触发用户数","eventUuid": "K9A5NDAz","filts": [{"columnDesc": "app版本","columnName": "app_version","comparator": "notNull","filterType": "SIMPLE","ftv": [],"specifiedClusterDate": "2021-12-28","tableType": "event","timeUnit": ""}],"quota": "","quotaEntities": [{"index": 0,"taIdMeasure": {"columnDesc": "用户唯一ID","columnName": "#user_id","tableType": "event"}}],"relation": "and","type": "normal"}, {"customEvent": "logout.PER_CAPITA_TIMES","customFilters": [],"eventName": "自定义指标","eventNameDisplay": "","eventSplitIndexes": [],"eventUuid": "gxqT19xz","filts": [],"format": "float","quota": "","quotaEntities": [{"index": 0,"taIdMeasure": {"columnDesc": "邮箱","columnName": "email","tableType": "user"}}],"quotaTimeRanges": [{"index": 0,"params": ["1"],"type": "THIS_WEEK"}],"relation": "and","type": "customized"}]}' 'http://ta2:8992/open/event-analyze?token=bTOzKiTIozG4e19FgXphcA8dDV3DIY8RwdHTO7aSnBsRqSNaIk19BnBMecJDWibD'

# 事件分析全量下载

接口URL

/open/streaming-download/event-analyze?token=xxx

请求方式

POST

Content-Type

application/json

请求Query参数

参数名 示例值 参数类型 是否必填 参数描述
token xxx String 查询密钥

# 请求Body参数

{
    "eventView": {
            "endTime": "2022-03-07 16:32:12",
            "filts": [{
                    "columnDesc": "等级",
                    "columnName": "level",
                    "comparator": "greater",
                    "filterType": "SIMPLE",
                    "ftv": ["1"],
                    "specifiedClusterDate": "2022-03-08",
                    "tableType": "event",
                    "timeUnit": ""
            }],
            "groupBy": [{
                    "columnDesc": "channel",
                    "columnName": "channel",
                    "propertyRange": "",
                    "specifiedClusterDate": "2022-03-08",
                    "tableType": "event"
            }],
            "recentDay": "1-7",
            "relation": "and",
            "startTime": "2022-03-01 16:32:12",
            "timeParticleSize": "day"
    },
    "events": [{
            "analysis": "TOTAL_TIMES",
            "analysisParams": "",
            "eventName": "LogOut",
            "eventNameDisplay": "LogOut的总次数",
            "eventUuid": "QgfCSkCw",
            "filts": [],
            "quota": "",
            "relation": "and",
            "type": "normal"
    }],
    "projectId": 319,
    "zoneOffset": 10
}

# 请求参数说明

$$参数名 示例值 参数类型 是否必填 参数描述
projectId 0 String 参数描述
eventView - Object 参数内容与事件分析查询接口一致
events List 参数内容与事件分析查询接口一致
zoneOffset 10 Integer 时区

提示

请求参数可以直接从TE系统 事件分析页面导出

# 响应

同TE系统事件分析全量下载

# 事件分析用户列表

接口URL

/open/event-user-list?token=xxx

请求方式

POST

Content-Type

application/json

请求Query参数

参数名 示例值 参数类型 是否必填 参数描述
token xxx String 查询密钥

# 请求Body参数

{
  "projectId": 0,
  "eventView": {
    "startTime": "2019-11-24 00:00:00",
    "endTime": "2019-11-26 00:00:00",
    "recentDay": "1-3",
    "timeParticleSize": "day",
    "groupBy": [
      {
        "columnName": "#city",
        "tableType": "event"
      }
    ]
  },
  "events": [
    {
      "analysis": "TRIG_USER_NUM",
      "eventName": "consume_item",
      "quota": "#vp@dailyTask",
      "relation": "and",
      "type": "normal",
      "filts": [
      {
          "columnName": "user_level",
          "comparator": "equal",
          "ftv": [
            "5"
          ],
          "tableType": "user"
        }
      ],
    }
  ],
  "sliceDate": "2019-11-26",
  "eventIndex": 0,
  "sliceGroupVal": [
    "北京市"
  ],
  "timeoutSeconds": 10,
  "zoneOffset": 10
}

# 请求参数说明

$$参数名 示例值 参数类型 是否必填 参数描述
projectId 0 String 参数描述
eventView - Object 参数内容与事件分析查询接口一致
events List 参数内容与事件分析查询接口一致
sliceDate "2019-11-26" String 哪个日期进行下钻
sliceGroupVal ["北京市"] List 哪个分组进行下钻
eventIndex 0 int 第几个指标进行下钻,从0开始
timeoutSeconds 10 Integer 请求超时参数,超时则取消查询任务
zoneOffset 10 Integer 时区

# 成功响应示例

{
  "data": {
    "datalist": [
      {
        "#account_id": "e78107482",
        "#distinct_id": "e145056682",
        "user_level": 5,
        "register_time": "2019-11-26 14:36:13",
        "diamond_num": 1006,
        "latest_login_time": "2019-11-26 15:45:16",
        "channel": "app store",
        "#user_id": 33474682
      },
      {
        "#account_id": "d7819213",
        "#distinct_id": "d14521393",
        "user_level": 5,
        "register_time": "2019-11-26 23:25:14",
        "diamond_num": 858,
        "first_recharge_time": "2019-11-26 23:29:56",
        "latest_login_time": "2019-11-26 23:32:48",
        "channel": "app store",
        "#user_id": 3351093
      }
    ],
    "columMeta": {
      "#account_id": "账户ID",
      "#distinct_id": "访客ID",
      "user_level": "用户等级",
      "register_time": "注册时间",
      "diamond_num": "当前拥有钻石数",
      "first_recharge_time": "首次充值时间",
      "latest_login_time": "最后登录时间",
      "channel": "渠道"
    }
  },
  "return_code": 0,
  "return_message": "success"
}

# 响应参数说明

$$参数名 示例值 参数类型 参数描述
return_code 0 Integer 返回码
return_message success String 返回信息
data - Object 返回结果
data.datalist - List 用户信息
data.columMeta - Map 字段含义映射

错误响应示例

{
    "return_code": -1008,
    "return_message": "参数(token)为空"
}
参数名 示例值 参数类型 参数描述
return_code -1008 Integer 返回码
return_message 参数(token)为空 String 返回信息

# 事件分析用户列表下载

接口URL

/open/streaming-download/event-user-list?token=xxx

请求方式

POST

Content-Type

application/json

请求Query参数

参数名 示例值 参数类型 是否必填 参数描述
token xxx String 查询密钥

# 请求Body参数

{
    "eventView": {
        "comparedByTime": false,
        "comparedRecentDay": "",
        "endTime": "2022-03-07 16:32:12",
        "filts": [
            {
                "columnDesc": "等级",
                "columnName": "level",
                "comparator": "greater",
                "filterType": "SIMPLE",
                "ftv": [
                    "1"
                ],
                "specifiedClusterDate": "2022-03-08",
                "tableType": "event",
                "timeUnit": ""
            }
        ],
        "groupBy": [
            {
                "columnDesc": "channel",
                "columnName": "channel",
                "propertyRange": "",
                "specifiedClusterDate": "2022-03-08",
                "tableType": "event"
            }
        ],
        "recentDay": "1-7",
        "relation": "and",
        "startTime": "2022-03-01 16:32:12",
        "timeParticleSize": "day"
    },
    "events": [
        {
            "analysis": "TRIG_USER_NUM",
            "analysisParams": "",
            "eventName": "LogOut",
            "eventNameDisplay": "LogOut的触发AlertA数",
            "eventUuid": "QgfCSkCw",
            "filts": [],
            "quota": "",
            "quotaEntities": [
                {
                    "index": 0,
                    "taIdMeasure": {
                        "columnDesc": "用户唯一ID",
                        "columnName": "#user_id",
                        "tableType": "event"
                    }
                }
            ],
            "relation": "and",
            "type": "normal"
        }
    ],
    "projectId": 319,
    "sliceDate": "2022-03-01",
    "eventIndex": 0,
    "sliceGroupVal": [
        "AppStore"
    ],
    "selectedColumns": [
        "#account_id",
        "#distinct_id",
        "accountid"
    ],
    "zoneOffset": 10
}

# 请求参数说明

$$参数名 示例值 参数类型 是否必填 参数描述
projectId 0 String 参数描述
eventView - Object 参数内容与事件分析查询接口一致
events List 参数内容与事件分析查询接口一致
sliceDate "2019-11-26" String 哪个日期进行下钻
sliceGroupVal ["北京市"] List 哪个分组进行下钻
eventIndex 0 int 第几个指标进行下钻,从0开始
selectedColumns ["#account_id"] List 所需下载的列
zoneOffset 10 Integer 时区

提示

请求参数可以直接从TE系统 事件分析页面导出参数主体结构,然后加上sliceDate、eventIndex、eventDate、sliceGroupVal、selectedColumns这几个参数,具体参数值可以从页面接口抓取

# 响应

同TE系统事件分析用户列表下载

# 事件分析通用枚举

# 事件聚合类型枚举值

描述 是否需要属性
TOTAL_TIMES 总次数
TRIG_USER_NUM 触发用户数
PER_CAPITA_TIMES 人均次数
SUM 数值总和
AVG 数值平均值
PER_CAPITA_NUM 人均值
MAX 数值最大值
MIN 数值最小值
DISTINCT 去重数
TRUE 为真数
FALSE 为假数
IS_NOT_EMPTY 不为空数
IS_EMPTY 为空数
ARRAY_DISTINCT 列表整体去重数
ARRAY_SET_DISTINCT 元素集合去重数
ARRAY_ITEM_DISTINCT 列表元素去重数
MEDIAN 中位数
PERCENTILE 分位数