openapi: 3.0.1 info: description: 分析模型开放接口 title: 神策分析 version: '' servers: - url: /api/v3/analytics/v1 paths: /model/segmentation/report: post: description: 查询事件分析报告 operationId: QuerySegmentationReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SegmentationReportRequest' description: 查询事件分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: date: DATE 小程序显示的总次数: DOUBLE 自定义指标1: DOUBLE user.vehicle_system: STRING rollup_rows: - - '2022-07-11 00:00:00' - 432.0 - '37' - '1' column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-07-11 00:00:00' - 144.0 - '37' - '1' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SegmentationReportResponseHttpApiResult' description: sensorsdata.analytics.v1.SegmentationReportResponse summary: 查询事件分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.SegmentationReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.SegmentationReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: SegmentationReportRequest /model/funnel/report: post: description: 查询漏斗分析报告 operationId: QueryFunnelReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.FunnelReportRequest' description: 查询漏斗分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: date: DATE wastage_user_step_1: INT convert_user_step_2: INT convert_user_step_1: INT funnel_root: STRING funnel_level_2: STRING funnel_level_1: STRING wastage_user_step_2: INT convert_rate_step_2: DOUBLE completion_rate: DOUBLE total_user: INT convert_rate_step_1: DOUBLE median_converted_time_step_2: DOUBLE median_converted_time_step_1: DOUBLE completion_converted_user: INT column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-07-03 00:00:00' - 13.0 - 2.0 - 8.0 - $AppStart - $AppClick - $AppViewScreen - 6.0 - 25.0 - 9.52 - 21.0 - 38.1 - 2490.0 - 89087.0 - 2.0 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.FunnelReportResponseHttpApiResult' description: sensorsdata.analytics.v1.FunnelReportResponse summary: 查询漏斗分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.FunnelReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.FunnelReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: FunnelReportRequest /model/retention/report: post: description: 查询留存分析报告 operationId: QueryRetentionReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.RetentionReportRequest' description: 查询留存分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: date: DATE retention_rate_date_period_0: DOUBLE retention_rate_date_period_1: DOUBLE retention_rate_date_period_2: DOUBLE retention_rate_date_period_7: DOUBLE retention_rate_date_period_3: DOUBLE retention_rate_date_period_4: DOUBLE retention_rate_date_period_5: DOUBLE retention_rate_date_period_6: DOUBLE measure_date_period_0: DOUBLE retention_user_date_period_3: LONG measure_date_period_1: DOUBLE retention_user_date_period_2: LONG retention_user_date_period_1: LONG retention_user_date_period_0: LONG measure_date_period_4: DOUBLE retention_user_date_period_7: LONG measure_date_period_5: DOUBLE retention_user_date_period_6: LONG measure_date_period_2: DOUBLE retention_user_date_period_5: LONG measure_date_period_3: DOUBLE retention_user_date_period_4: LONG measure_date_period_6: DOUBLE measure_date_period_7: DOUBLE initial_user: LONG column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-07-01' - '48.43' - '2.03' - '2.13' - '2.74' - '2.74' - '1.93' - '3.15' - '3.15' - 281.0 - 27.0 - 10.0 - 21.0 - 20.0 - 477.0 - 8.0 - 27.0 - 17.0 - 31.0 - 19.0 - 31.0 - 10.0 - 19.0 - 24.0 - 14.0 - 985.0 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.RetentionReportResponseHttpApiResult' description: sensorsdata.analytics.v1.RetentionReportResponse summary: 查询留存分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.RetentionReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.RetentionReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: RetentionReportRequest /model/interval/report: post: description: 查询间隔分析报告 operationId: QueryIntervalReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.IntervalReportRequest' description: 查询间隔分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: date: DATE uniqavg_cnt: DOUBLE by_field: STRING '25': DOUBLE cnt: DOUBLE people: DOUBLE min_time: DOUBLE uniqavg_time: DOUBLE '90': DOUBLE max_time: DOUBLE '50': DOUBLE '75': DOUBLE avg_time: DOUBLE '10': DOUBLE column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-07-01' - 1.03 - 中国 - 7550.0 - 68.0 - 66.0 - 328.0 - 16686.77 - 31590.0 - 45802.0 - 17462.0 - 24248.0 - 16419.93 - 2236.0 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.IntervalReportResponseHttpApiResult' description: sensorsdata.analytics.v1.IntervalReportResponse summary: 查询间隔分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.IntervalReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.IntervalReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: IntervalReportRequest /model/addiction/report: post: description: 查询分布分析报告 operationId: QueryAddictionReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.AddictionReportRequest' description: 查询分布分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: by_field: 陕西省 metadata_columns: by_value: STRING addiction_rate_bucket_3: DOUBLE total_user: INT bucket_region_1: STRING addiction_rate_bucket_2: DOUBLE addiction_rate_bucket_1: DOUBLE bucket_region_2: STRING total_measure: DOUBLE bucket_region_3: STRING addiction_user_bucket_3: INT addiction_user_bucket_1: INT addiction_user_bucket_2: INT addiction_measure_bucket_2: DOUBLE addiction_measure_bucket_3: DOUBLE addiction_measure_bucket_1: DOUBLE column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-07-01' - 0.0 - 989.0 - '[1, 3)' - 4.35 - 95.65 - '[3, 5)' - 662.0 - '[5, 10)' - 0 - 946 - 43.0 - 18.0 - 0.0 - 644.0 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.AddictionReportResponseHttpApiResult' description: sensorsdata.analytics.v1.AddictionReportResponse summary: 查询分布分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.AddictionReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.AddictionReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AddictionReportRequest /model/path/analytics/report: post: description: 查询用户路径分析报告 operationId: QueryUserPathReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPathReportRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: nodes: - values: - struct_value: {} data_sufficient_update_time: '2022-09-29 10:30:00' truncate_rows: - 10 - 20 - 30 report_update_time: '2022-09-29 10:30:00' truncated: false truncate_col: false sampling_factor: 64 data_update_time: '2022-09-29 10:30:00' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPathReportResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPathReportResponse summary: 查询用户路径分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPathReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UserPathReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UserPathReportRequest /model/user-analytics/report: post: description: 查询属性分析报告 operationId: QueryUserPropertyReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPropertyReportRequest' description: 查询属性分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: user.vehicle_year: DOUBLE user.vehicle_type: STRING value: LONG column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - 3 - 高性能跑车 - 1287.0 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPropertyReportResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPropertyReportResponse summary: 查询属性分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPropertyReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UserPropertyReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UserPropertyReportRequest /model/attribution/report: post: description: 查询归因分析报告 operationId: QueryAttributionReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.AttributionReportRequest' description: 查询归因分析报告接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: click_times: LONG conversion_value_rate: DOUBLE goal_conversion: DOUBLE converted_number: LONG event_name: STRING converted_user_number: LONG event.$Anything.$province: STRING column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - 51.0 - 2.05 - 21.0 - 18.0 - $AppClick - 16.0 - 内蒙古自治区 request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.AttributionReportResponseHttpApiResult' description: sensorsdata.analytics.v1.AttributionReportResponse summary: 查询归因分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.AttributionReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.AttributionReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AttributionReportRequest /model/ltv/report: post: description: 查询 LTV 分析报告 operationId: QueryLtvReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.LtvReportRequest' description: 查询 LTV 分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: date: DATE percent_ltv_0: STRING measure_name: STRING initial_user: LONG amount_ltv_0: STRING column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-10-13' - '0' - activityview的LTV_AVG - 1228.0 - '0.75' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.LtvReportResponseHttpApiResult' description: sensorsdata.analytics.v1.LtvReportResponse summary: 查询 LTV 分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.LtvReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.LtvReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: LtvReportRequest /model/session/report: post: description: 查询 SESSION 分析报告 operationId: QuerySessionReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionReportRequest' description: 查询 session 分析报告请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: metadata_columns: date: DATE 小程序显示的总次数: DOUBLE 自定义指标1: DOUBLE user.vehicle_system: STRING column_infos: - column_name: by_value data_type: STRING - column_name: addiction_rate_bucket_3 data_type: DOUBLE - column_name: total_user data_type: INT - column_name: bucket_region_1 data_type: STRING - column_name: addiction_rate_bucket_2 data_type: DOUBLE - column_name: addiction_rate_bucket_1 data_type: DOUBLE - column_name: bucket_region_2 data_type: STRING - column_name: total_measure data_type: DOUBLE - column_name: bucket_region_3 data_type: STRING - column_name: addiction_user_bucket_3 data_type: INT - column_name: addiction_user_bucket_1 data_type: INT - column_name: addiction_user_bucket_2 data_type: INT - column_name: addiction_measure_bucket_2 data_type: DOUBLE - column_name: addiction_measure_bucket_3 data_type: DOUBLE - column_name: addiction_measure_bucket_1 data_type: DOUBLE truncated: false detail_rows: - - '2022-07-11 00:00:00' - 144.0 - '37' - '1' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionReportResponseHttpApiResult' description: sensorsdata.analytics.v1.SessionReportResponse summary: 查询 SESSION 分析报告 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.SessionReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.SessionReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: SessionReportRequest /model/segmentation/users: post: description: 查询事件分析用户明细 operationId: QuerySegmentationUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SegmentationUserDetailRequest' description: 查询事件分析用户明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询事件分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.SegmentationUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: SegmentationUserDetailRequest /model/session/users: post: description: 查询 session 分析用户明细 operationId: QuerySessionUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionUserDetailRequest' description: 查询 session 分析用户明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询 session 分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.SessionUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: SessionUserDetailRequest /model/funnel/users: post: description: 查询漏斗分析用户明细 operationId: QueryFunnelUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.FunnelUserDetailRequest' description: 查询漏斗分析用户明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询漏斗分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.FunnelUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: FunnelUserDetailRequest /model/retention/users: post: description: 查询留存分析用户明细 operationId: QueryRetentionUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.RetentionUserDetailRequest' description: 查询留存分析用户明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询留存分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.RetentionUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: RetentionUserDetailRequest /model/addiction/users: post: description: 查询分布分析用户明细 operationId: QueryAddictionUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.AddictionUserDetailRequest' description: 查询分布分析用户明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询分布分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.AddictionUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: AddictionUserDetailRequest /model/user-path/users: post: description: 查询用户路径分析用户明细 operationId: QueryUserPathUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPathUserDetailRequest' required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询用户路径分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UserPathUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UserPathUserDetailRequest /model/ltv/users: post: description: 查询 LTV 分析用户明细 operationId: QueryLtvUsers parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.LtvUserDetailRequest' description: 查询 LTV 分析用户明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询 LTV 分析用户明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.LtvUserDetailRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: LtvUserDetailRequest /model/user/list: post: description: 查询用户列表明细 operationId: QueryUserList parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserListRequest' description: 用户列表明细接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 users: - id: '-8961289991947891759' first_id: 7tpEmL7hMALkIinn second_id: '' distinct_id: '' column_names: - $id - vehicle_type - vehicle_system profiles: vehicle_type: 四门轿车 $id: '-8961289991947891759' vehicle_system: '7' request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponseHttpApiResult' description: sensorsdata.analytics.v1.UserPageResponse summary: 查询用户列表明细 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserPageResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UserListRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UserListRequest /model/sql/query: post: description: 自定义 sql 查询 operationId: SqlQuery parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SqlQueryRequest' description: 自定义 sql 查询接口的参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: data: - 56.0.2924.87 - 媒介2 - '1027.000' - iPad Air2 - iOS - 1.0 - 5G - 1.0 - 127.0.0.1 - '1130.000' - 广告词4 - referrer3 - '612.000' - path4 - 广东省 - url3 - '352.000' - 19174.0 - 咨询经销商 - 中国移动 - '9.0' - '1663900415616.000' - 设备指纹模糊匹配 - 1.0 - host1 - 广州市 - '476.000' - '845.000' - 新浪 - Chrome - '2.0' - Android - '544.000' - 12.0 - 中国 - 广告4 - -8565168885686534000 - TJeqKhv3ETtFcvJB - 标题5 - 内容1 - Apple - '2022-07-01 03:31:07.904' - 1.0 columns: - $browser_version - $utm_medium - $viewport_position - $dimension_dict_$model - $os - $is_first_time - $network_type - $wifi - $ip - $screen_height - $utm_term - $referrer - $viewport_height - $url_path - $province - $url - $share_depth - day - $element_content - $carrier - $os_version - $receive_time - $utm_matching_type - $is_first_day - $referrer_host - $city - $viewport_width - $screen_width - $utm_source - $browser - $app_version - $lib - $event_duration - event_id - $country - $utm_campaign - user_id - distinct_id - $title - $utm_content - $dimension_dict_$manufacturer - time - $resume_from_background request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SqlQueryResponseHttpApiResult' description: sensorsdata.analytics.v1.SqlQueryResponse summary: 自定义 sql 查询 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.SqlQueryResponse isServerStreaming: true requestClass: com.sensorsdata.analytics.v1.SqlQueryRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: SqlQueryRequest /model/user/behavior: post: description: 用户行为列表查询 operationId: QueryUserBehavior parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserBehaviorRequest' description: 查询用户行为序列接口请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: page: current_page: 1 page_count: 1 total: 2 events: - distinct_id: 02ta9OJYJVXcDbqs user_id: '-3966990756759511917' event: realnameview time: '2022-09-29 00:26:10.878' properties: $ip: 127.0.0.1 $lib: Android $event_duration: 293 $element_content: 召回查询 $share_depth: 355 $referrer: referrer4 $referrer_host: host4 $country: 美国 $screen_width: 1100 $screen_height: 631 $utm_content: 内容2 $utm_campaign: 广告1 $utm_medium: 媒介3 $utm_term: 广告词2 $utm_source: B站 $app_version: '2.0' $os: iOS $os_version: '9.0' $wifi: 1 $resume_from_background: 0 $is_first_day: 0 $is_first_time: 0 $browser: Safari $browser_version: 55.0.2883.95 $utm_matching_type: Cookie数据精确匹配模式 $province: 南达科他 $city: 苏福尔斯 $network_type: 4G $viewport_width: 991 $viewport_position: 17 $viewport_height: 429 $manufacturer: Apple $model: iPhone6s plus $carrier: 中国联通 $url: url1 $url_path: path4 $title: 标题2 profiles: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserBehaviorResponseHttpApiResult' description: sensorsdata.analytics.v1.UserBehaviorResponse summary: 用户行为列表查询 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.UserBehaviorResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UserBehaviorRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UserBehaviorRequest /model/rfm/report: post: description: rfm分析查询 operationId: QueryRfmReport parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmAnalysisReportRequest' description: 创建 RFM 分析并返回报告与分布结果的请求参数描述 required: false responses: default: content: application/json: example: code: SUCCESS data: report: data_sufficient_update_time: '2025-12-07 10:30:00' rfm_count: 876 total_count: 1000 report_update_time: '2025-12-07 10:30:00' id: 9 total_sum: recency: list_value: {} struct_value: {} unknown_count: 124 data_update_time: '2025-12-07 10:30:00' distributions: - result: data_sufficient_update_time: '2025-12-07 10:30:00' rfm_count: 876 report_update_time: '2025-12-07 10:30:00' rfm_id: 9 rows: - {} data_update_time: '2025-12-07 10:30:00' type: RFM request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmAnalysisReportResponseHttpApiResult' description: sensorsdata.analytics.v1.RfmAnalysisReportResponse summary: rfm分析查询 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.RfmAnalysisReportResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.RfmAnalysisReportRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: RfmAnalysisReportRequest /model/session/list: get: description: 获取全量 session 列表 operationId: ListSessions parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string responses: default: content: application/json: example: code: SUCCESS data: sessions: - start_event: realname stop_event: finishdrive update_time: '' create_time: '' user_name: 张三 session_interval_seconds: 60 name: session cname: session名字 comment: 备注 events: - realname - finishdrive - signfinish is_event_split: false request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionDefineListResponseHttpApiResult' description: sensorsdata.analytics.v1.SessionDefineListResponse summary: 获取全量 session 列表 x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.SessionDefineListResponse isServerStreaming: false grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false /model/session/create: post: description: 创建 session operationId: CreateSession parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UpdateSessionRequest' description: session 定义 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionResponseHttpApiResult' description: sensorsdata.analytics.v1.SessionResponse summary: 创建 session x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.SessionResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UpdateSessionRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpdateSessionRequest /model/session/update: post: description: 更新 session operationId: UpdateSession parameters: - description: 全局唯一的密钥,用于验证和授权访问 API 接口 in: header name: api-key required: true schema: type: string - description: 项目名, 指定请求所属项目 in: header name: sensorsdata-project required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.UpdateSessionRequest' description: session 定义 required: false responses: default: content: application/json: example: code: SUCCESS data: {} request_id: '1' schema: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionResponseHttpApiResult' description: sensorsdata.analytics.v1.SessionResponse summary: 更新 session x-sd-openapi: responseClass: com.sensorsdata.analytics.v1.SessionResponse isServerStreaming: false requestClass: com.sensorsdata.analytics.v1.UpdateSessionRequest grpcServiceBase: com.sensorsdata.analytics.v1.ModelServiceGrpc.ModelServiceImplBase internalDesc: classes in template for grpc service dynamic invoking isClientStreaming: false x-codegen-request-body-name: UpdateSessionRequest components: schemas: sensorsdata.analytics.v1.RetentionReportRequest: description: 查询留存分析报告请求参数描述 properties: from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string duration: description: 观测数,表示获取往后 N 个时间单位的留存 example: 7 format: int32 type: integer first_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' second_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' measures: description: 同时显示第三个指标 example: '[{"event_name":"$MPShow","aggregator":"general","filter":{}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array user_filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string extend_over_end_date: description: (可选)后续事件是否可以超出时间区间 type: boolean sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer is_wastage: description: 是否计算流失,false为计算留存,true为计算流失 example: false type: boolean use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - duration - first_event - from_date - second_event - to_date - unit title: RetentionReportRequest type: object sensorsdata.analytics.v1.RfmRule.LayerParamsEntry: description: '' properties: key: description: '' type: string value: description: '' type: string title: LayerParamsEntry type: object sensorsdata.analytics.v1.RfmDistributionQuery.BucketParamsEntry: description: '' properties: key: description: '' type: string value: $ref: '#/components/schemas/sensorsdata.common.ListValue' title: BucketParamsEntry type: object sensorsdata.analytics.v1.RfmReport: description: RFM 报告摘要 properties: id: description: RFM 分析 ID example: 9 format: int32 type: integer total_count: description: 圈选人群人数 example: 1000 format: int32 type: integer rfm_count: description: RFM 覆盖人数 example: 876 format: int32 type: integer unknown_count: description: 未知人数 example: 124 format: int32 type: integer total_sum: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmValueModel' average: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmValueModel' sql_lists: description: 人群 SQL 列表 items: type: string type: array report_update_time: description: 返回结果产生的时间 example: '2025-12-07 10:30:00' type: string data_sufficient_update_time: description: 查询涉及事件数据的最后超过 1% 的更新时间 example: '2025-12-07 10:30:00' type: string data_update_time: description: 当前数据的更新时间 example: '2025-12-07 10:30:00' type: string title: RfmReport type: object sensorsdata.analytics.v1.AddictionReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.AddictionReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.AddictionReportResponseHttpApiResult type: object sensorsdata.analytics.v1.ApiRequestFilter: description: '' properties: relation: description: '' enum: - FILTER_RELATION_UNSPECIFIED - AND - OR example: OR type: string conditions: description: '' example: '[{"field":"event.$Anything.country","function":"equal","params":["中国"]},{"field":"event.$Anything.city","function":"contain","params":["北京"]}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestElementCondition' type: array filters: description: '' example: '[{"conditions":[{"field":"event.$Anything.country","function":"notContain","params":["韩国","日本"]},{"field":"event.$Anything.city","function":"rlike","params":[".*"]}],"relation":"AND"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' type: array title: ApiRequestFilter type: object sensorsdata.analytics.v1.LtvReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.LtvReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.LtvReportResponseHttpApiResult type: object sensorsdata.common.ErrorContext: description: 发生错误时,系统快照信息 properties: origin_stack: description: 上游异常的 stack,由系统截获 type: string origin_cause: description: 上游异常的 cause by,由系统截获 type: string origin_code: description: 上游异常的错误简码 type: string origin_complete_code: description: 上游异常的完整错误码 type: string error_extend_desc: description: 本次异常的辅助说明,可传入 type: string title: ErrorContext type: object sensorsdata.analytics.v1.UserPathReportRequest.SingleEventWithFiltersEntry: description: '' properties: key: description: '' type: string value: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' title: SingleEventWithFiltersEntry type: object sensorsdata.analytics.v1.LtvReportRequest: description: 查询 LTV 分析报告请求参数描述 properties: from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string duration: description: 观测数,表示获取往后 N 个时间单位的 LTV example: 7 format: int32 type: integer start_sign: $ref: '#/components/schemas/sensorsdata.analytics.v1.LtvUserStartSign' measures: description: 营收事件信息,用户在神策分析-ltv分析页面上定义的营收事件 example: '[{"event_name":"activityview","aggregator":"average","name":"activityview的LTV_AVG","profit_rate":100}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer need_show_ltv_columns: description: 需要显示的 ltv 列 example: 0,1,2,3,4,5,6,7,15,30 type: string time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - duration - from_date - measures - start_sign - to_date - unit title: LtvReportRequest type: object sensorsdata.analytics.v1.RfmDistributionResult: description: 单个分布查询结果 properties: type: description: 请求的分布类型 enum: - DISTRIBUTION_TYPE_UNSPECIFIED - R - F - M - RF - RM - FM - RFM example: RFM type: string result: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmDistributionResponse' title: RfmDistributionResult type: object sensorsdata.analytics.v1.ApiRequestElementCondition: description: '' properties: field: description: '' type: string function: description: '' type: string params: description: '' items: description: google.protobuf.Value 支持各种 JSON 值 properties: {} type: object type: array title: ApiRequestElementCondition type: object sensorsdata.analytics.v1.ApiRequestEventWithFilter: description: '' properties: event_name: description: 事件名称 example: event.$AppClick type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_field: description: 查看维度 example: event.$AppClick.country type: string relevance_field: description: '' type: string title: ApiRequestEventWithFilter type: object sensorsdata.analytics.v1.UserBehaviorResponse: description: 查询用户行为序列接口返回结果结构描述 properties: events: description: 用户行为事件列表 example: '[{"distinct_id":"02ta9OJYJVXcDbqs","user_id":"-3966990756759511917","event":"realnameview","time":"2022-09-29 00:26:10.878","properties":{"$ip":"127.0.0.1","$lib":"Android","$event_duration":293,"$element_content":"召回查询","$share_depth":355,"$referrer":"referrer4","$referrer_host":"host4","$country":"美国","$screen_width":1100,"$screen_height":631,"$utm_content":"内容2","$utm_campaign":"广告1","$utm_medium":"媒介3","$utm_term":"广告词2","$utm_source":"B站","$app_version":"2.0","$os":"iOS","$os_version":"9.0","$wifi":1,"$resume_from_background":0,"$is_first_day":0,"$is_first_time":0,"$browser":"Safari","$browser_version":"55.0.2883.95","$utm_matching_type":"Cookie数据精确匹配模式","$province":"南达科他","$city":"苏福尔斯","$network_type":"4G","$viewport_width":991,"$viewport_position":17,"$viewport_height":429,"$manufacturer":"Apple","$model":"iPhone6s plus","$carrier":"中国联通","$url":"url1","$url_path":"path4","$title":"标题2"},"profiles":{}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.EventInfo' type: array page: $ref: '#/components/schemas/sensorsdata.analytics.v1.PageInfo' title: UserBehaviorResponse type: object sensorsdata.analytics.v1.SegmentationReportResponse: description: 查询事件分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: date: DATE 小程序显示的总次数: DOUBLE 自定义指标1: DOUBLE user.vehicle_system: STRING type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-07-11 00:00:00",144.0,"37","1"]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array rollup_rows: description: 合计数据行(新增字段)。仅 detail_and_rollup=true 且 rollup=false 时返回,列顺序与 metadata_columns 一致;其余请求不返回该字段,保证向下兼容。 example: '[["2022-07-11 00:00:00",432.0,"37","1"]]' items: items: properties: {} type: object type: array type: array title: SegmentationReportResponse type: object sensorsdata.analytics.v1.RetentionReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.SessionReportResponse: description: 查询 session 分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: date: DATE 小程序显示的总次数: DOUBLE 自定义指标1: DOUBLE user.vehicle_system: STRING type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-07-11 00:00:00",144.0,"37","1"]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: SessionReportResponse type: object sensorsdata.analytics.v1.UserPathReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.RetentionReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.RetentionReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.RetentionReportResponseHttpApiResult type: object sensorsdata.analytics.v1.SessionDefineListResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionDefineListResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.SessionDefineListResponseHttpApiResult type: object sensorsdata.analytics.v1.SqlQueryRequest: description: 自定义 sql 查询接口的参数描述 properties: sql: description: 查询 sql example: select * from events type: string limit: description: 最大返回条数 example: '100' type: string request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string required: - sql title: SqlQueryRequest type: object sensorsdata.analytics.v1.SingleSessionDefine: description: session 定义 properties: id: description: session ID format: int32 type: integer name: description: session 名称 example: session type: string cname: description: session 中文名称 example: session名字 type: string events: description: session 事件列表 example: '["realname", "finishdrive", "signfinish"]' items: type: string type: array session_interval_seconds: description: session间隔时间(单位秒) example: 60 format: int32 type: integer is_event_split: description: 是否开启事件切割 example: false type: boolean start_event: description: session开始事件 (开启事件切割时必填) example: realname type: string stop_event: description: session结束事件 (开启事件切割时必填) example: finishdrive type: string comment: description: 备注说明 example: 备注 type: string create_time: description: 创建时间 format: date-time type: string update_time: description: 更新时间 format: date-time type: string user_name: description: 所属人名称 example: 张三 type: string title: SingleSessionDefine type: object sensorsdata.analytics.v1.RetentionReportResponse: description: 查询留存分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: date: DATE retention_rate_date_period_0: DOUBLE retention_rate_date_period_1: DOUBLE retention_rate_date_period_2: DOUBLE retention_rate_date_period_7: DOUBLE retention_rate_date_period_3: DOUBLE retention_rate_date_period_4: DOUBLE retention_rate_date_period_5: DOUBLE retention_rate_date_period_6: DOUBLE measure_date_period_0: DOUBLE retention_user_date_period_3: LONG measure_date_period_1: DOUBLE retention_user_date_period_2: LONG retention_user_date_period_1: LONG retention_user_date_period_0: LONG measure_date_period_4: DOUBLE retention_user_date_period_7: LONG measure_date_period_5: DOUBLE retention_user_date_period_6: LONG measure_date_period_2: DOUBLE retention_user_date_period_5: LONG measure_date_period_3: DOUBLE retention_user_date_period_4: LONG measure_date_period_6: DOUBLE measure_date_period_7: DOUBLE initial_user: LONG type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-07-01","48.43","2.03","2.13","2.74","2.74","1.93","3.15","3.15",281.0,27.0,10.0,21.0,20.0,477.0,8.0,27.0,17.0,31.0,19.0,31.0,10.0,19.0,24.0,14.0,985.0]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: RetentionReportResponse type: object sensorsdata.analytics.v1.SqlQueryResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.SqlQueryResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.SqlQueryResponseHttpApiResult type: object sensorsdata.analytics.v1.EventInfo.ProfilesEntry: description: '' properties: key: description: '' type: string value: description: '' properties: {} type: object title: ProfilesEntry type: object sensorsdata.analytics.v1.RfmFactorGroupRule: description: 因子的分层规则 properties: aggregate_function: description: 分层方式 enum: - AGGREGATE_FUNCTION_UNSPECIFIED - LESS_EQUAL - GREATER_EQUAL - COUNT_RANK_DESC - COUNT_RANK_ASC example: GREATER_EQUAL type: string unit: description: 单位,可选;用于 topN / topPercent 场景 enum: - UNIT_UNSPECIFIED - PERCENTAGE - COUNT example: PERCENTAGE type: string variable: description: 变量,如 AVERAGE/MIN/MAX example: AVERAGE type: string value: description: 阈值,可选 format: double type: number level: description: 分层值,通常 0=低,1=高 example: 1 format: int32 type: integer title: RfmFactorGroupRule type: object sensorsdata.analytics.v1.IntervalReportRequest: description: 查询间隔分析报告请求参数描述 properties: filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' first_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' second_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string measure_type: description: '' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string extend_over_end_date: description: '' type: boolean rollup_date: description: '' type: boolean use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean quantiles: description: 间隔分析的指标,查询那些间隔类数据,10:P10, 25:下四分位,50:中位数,75:上四分位,90:p90 example: '[10,25]' items: format: int32 type: integer type: array bucket_params: description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: '{"event.$Anything.$event_duration":["40","50"]}' items: description: google.protobuf.Value 支持各种 JSON 值 properties: {} type: object type: array sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string by_event: description: 分组事件,按初始行为事件分组还是后续行为事件分组,first/second example: first type: string by_field: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '"event.$AppStart.$country"' type: string rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - first_event - from_date - quantiles - second_event - to_date - unit title: IntervalReportRequest type: object sensorsdata.analytics.v1.FunnelReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.LookbackWindow: description: '' properties: unit: description: '' type: string value: description: '' format: int32 type: integer title: LookbackWindow type: object sensorsdata.analytics.v1.ApiFunnelDefine: description: '' properties: steps: description: 漏斗步骤 example: '[{"event_name":"$AppStart"},{"event_name":"$AppViewScreen"},{"event_name":"$AppClick"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' type: array max_convert_time: description: 窗口期,单位秒 example: 10080 format: int32 type: integer title: ApiFunnelDefine type: object sensorsdata.analytics.v1.AttributionEvent: description: '' properties: events: description: '' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.AttributionEventElement' type: array filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: '' items: type: string type: array bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: Map> type: object title: AttributionEvent type: object sensorsdata.analytics.v1.AttributionReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.EventInfo.PropertyCnamesEntry: description: '' properties: key: description: '' type: string value: description: '' type: string title: PropertyCnamesEntry type: object sensorsdata.common.HttpApiResult: properties: code: type: string message: type: string request_id: type: string data: properties: {} type: object error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: HttpApiResult type: object sensorsdata.analytics.v1.SliceUserElementFilter: description: '' properties: slice_by_value: description: 当前节点分组属性值 example: 陕西省 type: string slice_event_name: description: 当前节点事件 example: $AppStart type: string title: SliceUserElementFilter type: object sensorsdata.analytics.v1.UserPageResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPageResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.UserPageResponseHttpApiResult type: object sensorsdata.analytics.v1.UserPathReportResponse: description: '' properties: nodes: description: nodes 代表节点,节点里每个大括号里代表一层,如下一共是五层,id 里 0 代表第一层 items: items: properties: {} type: object type: array type: array links: description: 每层数据到下一层的流失、留存详情。每个大括号[] 代表一层,如下以第一层为例 items: items: properties: {} type: object type: array type: array truncate_rows: description: 用户路径各个列的具体信息 example: '[10,20,30]' items: format: int32 type: integer type: array truncate_col: description: 列是否有截断 example: false type: boolean report_update_time: description: 全量缓存更新时间 example: '2022-09-29 10:30:00' type: string data_update_time: description: 查询涉及事件数据的最后更新时间 example: '2022-09-29 10:30:00' type: string data_sufficient_update_time: description: 查询涉及事件数据量变化超过 5% 的最后更新时间 example: '2022-09-29 10:30:00' type: string truncated: description: 查询是否截断 example: false type: boolean sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer title: UserPathReportResponse type: object sensorsdata.analytics.v1.IntervalReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.RetentionReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.UserPathReportRequest: description: '' properties: source_type: description: 选择起始事件或者结束事件,起始事件是initial_event, 结束事件是termination_event example: initial_event type: string source_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' event_names: description: 参与分析的事件 example: '["$AppStart","$AppViewScreen","$AppClick"]' items: type: string type: array by_fields: description: 事件分组,可以按照所选择的参与事件的属性进行分组 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array col_limit: description: (可选)列数量的限制 example: 5 format: int32 type: integer row_limit: description: (可选)每列节点数限制 example: 10 format: int32 type: integer from_date: description: 查询开始时间 example: '2022-09-29' type: string to_date: description: 查询结束时间 example: '2022-09-29' type: string user_filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: (可选)事件分组,所选择分组的事件属性如果是数值型的可以进行自定义分组展示数据,为空的话是默认区间 type: object sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer session_interval: description: session 间隔时间 example: 1800 format: int32 type: integer use_cache: description: '' type: boolean filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' single_event_with_filter: additionalProperties: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' description: (可选)参与分析事件的单事件筛选条件,key 为事件名;已废弃,请使用 single_event_with_filters type: object request_id: description: 请求 ID example: '12345696321548954' type: string single_event_with_filters: additionalProperties: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' description: (可选)参与分析事件的单事件筛选条件,key 为事件名 type: object required: - col_limit - event_names - from_date - row_limit - source_event - source_type - to_date title: UserPathReportRequest type: object sensorsdata.analytics.v1.UserPageResponse: description: 查询用户明细接口返回结果结构描述 properties: users: description: 用户列表 example: '[{"id":"-8961289991947891759","first_id":"7tpEmL7hMALkIinn","second_id":"","distinct_id":"","column_names":["$id","vehicle_type","vehicle_system"],"profiles":{"vehicle_type":"四门轿车","$id":"-8961289991947891759","vehicle_system":"7"}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserDetail' type: array page: $ref: '#/components/schemas/sensorsdata.analytics.v1.PageInfo' title: UserPageResponse type: object sensorsdata.analytics.v1.SessionResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.SessionResponseHttpApiResult type: object sensorsdata.analytics.v1.AttributionEventElement.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.AddictionReportResponse: description: 查询分布分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean by_field: description: 查看维度 example: 陕西省 type: string metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: by_value: STRING addiction_rate_bucket_3: DOUBLE total_user: INT bucket_region_1: STRING addiction_rate_bucket_2: DOUBLE addiction_rate_bucket_1: DOUBLE bucket_region_2: STRING total_measure: DOUBLE bucket_region_3: STRING addiction_user_bucket_3: INT addiction_user_bucket_1: INT addiction_user_bucket_2: INT addiction_measure_bucket_2: DOUBLE addiction_measure_bucket_3: DOUBLE addiction_measure_bucket_1: DOUBLE type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-07-01",0.0,989.0,"[1, 3)",4.35,95.65,"[3, 5)",662.0,"[5, 10)",0,946,43.0,18.0,0.0,644.0]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: AddictionReportResponse type: object sensorsdata.analytics.v1.SessionDefineListResponse: description: session 列表 properties: sessions: description: '' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.SingleSessionDefine' type: array title: SessionDefineListResponse type: object sensorsdata.analytics.v1.LinkEvent: description: '' properties: event_name: description: '' example: event.$AppClick type: string link_properties: $ref: '#/components/schemas/sensorsdata.analytics.v1.LinkProperty' filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' title: LinkEvent type: object sensorsdata.analytics.v1.AttributionEvent.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.SessionResponse: description: session返回结构 properties: id: description: '' format: int32 type: integer title: SessionResponse type: object sensorsdata.analytics.v1.AttributionReportRequest: description: 查询归因分析报告接口请求参数描述 properties: from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean direct_conversion: description: 是否直接转化是否参与归因计算 example: false type: boolean sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer target_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' link_events: description: 关联事件 example: '[]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.LinkEvent' type: array attribution_events: $ref: '#/components/schemas/sensorsdata.analytics.v1.AttributionEvent' filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' model_type: description: 归因分析模型,first:首次触点归因,last:末次触点归因,linear:线性归因,position:未知归因,time_decay:事件衰减归因 example: first type: string lookback_window: $ref: '#/components/schemas/sensorsdata.analytics.v1.LookbackWindow' request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - attribution_events - from_date - lookback_window - model_type - target_event - to_date title: AttributionReportRequest type: object sensorsdata.analytics.v1.AddictionReportRequest: description: 查询分布分析报告请求参数描述 properties: event_name: description: 需要进行分布分析的事件名称 example: event.$AppClick type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' user_filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer unit: description: 时间单位,可以是 DAY/WEEK/MONTH enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string measure_type: description: 测量类型,可以是 times/period, period是当按小时数或者天数进行分布分析时使用 example: times type: string result_bucket_params: description: 分桶方式,当查看维度的数据类型是数值时,可使用此参数进行数据切片 example: '["5","10","15"]' items: description: google.protobuf.Value 支持各种 JSON 值 properties: {} type: object type: array request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean addition_measures: description: 同时显示的指标 example: '[{"event_name":"$Anything","aggregator":"general"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array by_field: description: 查看维度 example: event.$Anything.$province type: string rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer measure: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - event_name - from_date - measure_type - to_date - unit title: AddictionReportRequest type: object sensorsdata.analytics.v1.SessionReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.SessionReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.SessionReportResponseHttpApiResult type: object sensorsdata.analytics.v1.UserPropertyReportRequest: description: 查询属性分析报告请求参数描述 properties: measures: description: 要查询的指标集合 example: '[{"aggregator":"count","field":""}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer x_axis_field: description: 横轴分组指标 example: user.$country type: string use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object required: - measures title: UserPropertyReportRequest type: object sensorsdata.analytics.v1.RfmValueModel: description: R/F/M 三个值的模型 properties: recency: $ref: '#/components/schemas/sensorsdata.common.Value' frequency: $ref: '#/components/schemas/sensorsdata.common.Value' monetary: $ref: '#/components/schemas/sensorsdata.common.Value' title: RfmValueModel type: object sensorsdata.analytics.v1.UserPathReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPathReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.UserPathReportResponseHttpApiResult type: object sensorsdata.analytics.v1.LtvUserDetailRequest: description: 查询 LTV 分析用户明细接口请求参数描述 properties: start_sign: $ref: '#/components/schemas/sensorsdata.analytics.v1.LtvUserStartSign' measures: description: 营收事件信息,用户在神策分析-ltv分析页面上定义的营收事件 example: '[{"event_name":"activityview","aggregator":"average","name":"activityview的LTV_AVG","profit_rate":100}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array detail_and_rollup: description: '' type: boolean duration: description: 观测数,表示获取往后 N 个时间单位的 LTV example: 7 format: int32 type: integer slice_date: description: 查看哪天的用户明细 example: '2022-09-27' type: string rollup_date: description: '' type: boolean filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object sort_by_field: description: '' type: string page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回,false 则只返回基本的 id 列 example: true type: boolean slice_by_values: description: 查看哪个分组的用户明细,by_fields中有很多值, 需要看哪些值的用户,可以通过此参数设置 example: '["自驾游\n音乐\nDIY\n节日"]' items: type: string type: array time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - duration - from_date - measures - page_index - page_size - start_sign - to_date - unit title: LtvUserDetailRequest type: object sensorsdata.common.ListValue: description: '' properties: values: description: '' items: $ref: '#/components/schemas/sensorsdata.common.Value' type: array title: ListValue type: object sensorsdata.analytics.v1.RfmFactorComputeRule: description: 因子的计算规则 properties: type: description: 规则类型 enum: - RULE_TYPE_UNSPECIFIED - EVENT_MEASURE_BASED - PROFILE_BASED example: EVENT_MEASURE_BASED type: string rule: description: '' properties: {} type: object title: RfmFactorComputeRule type: object sensorsdata.analytics.v1.FunnelUserDetailRequest: description: 查询漏斗分析用户明细接口请求参数描述 properties: funnel: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiFunnelDefine' filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array slice_by_values: description: 查看哪个分组的用户明细,by_fields中有很多值, 需要看哪些值的用户,可以通过此参数设置 example: '["自驾游\n音乐\nDIY\n节日"]' items: type: string type: array by_field_steps: description: 查看维度映射关系, 如果配置此参数, 需要和 “field” 请求参数中的步骤保持一致。 example: '[0,0]' items: format: int32 type: integer type: array filter_field_steps: description: 指定筛选条件针对的步骤,0 为第一步骤,-1 为用筛选条件为用户属性/用户分群, 如果配置此参数, 需要和 “field” 请求参数中的步骤保持一致。 example: '[0,0]' items: format: int32 type: integer type: array slice_step: description: 用户明细的步骤,从 0 开始 example: 1 format: int32 type: integer slice_wastage_user: description: true 表示查看流失用户明细,false 表示转化用户 example: false type: boolean profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回,false 则只返回基本的 id 列 example: true type: boolean page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string calculation_caliber: description: 是否次数漏斗 example: count type: string time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string unit: description: 时间单位,可以是 DAY/WEEK/MONTH enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string funnel_id: description: 漏斗 ID example: 123 format: int32 type: integer required: - from_date - funnel - page_index - page_size - to_date title: FunnelUserDetailRequest type: object sensorsdata.analytics.v1.RfmDistributionResponse: description: RFM 分布结果 properties: rfm_id: description: RFM 分析 ID example: 9 format: int32 type: integer rfm_count: description: RFM 覆盖人数 example: 876 format: int64 type: integer rows: description: 分布行数据 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmDistributionRow' type: array report_update_time: description: 返回结果产生的时间 example: '2025-12-07 10:30:00' type: string data_sufficient_update_time: description: 查询涉及事件数据的最后超过 1% 的更新时间 example: '2025-12-07 10:30:00' type: string data_update_time: description: 当前数据的更新时间 example: '2025-12-07 10:30:00' type: string title: RfmDistributionResponse type: object sensorsdata.analytics.v1.ColumnMetaData: description: '' properties: column_name: description: 列名称 example: click_times type: string data_type: description: 元数据类型 enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG example: LONG type: string title: ColumnMetaData type: object sensorsdata.analytics.v1.LtvReportResponse: description: 查询 LTV 分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: date: DATE percent_ltv_0: STRING measure_name: STRING initial_user: LONG amount_ltv_0: STRING type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-10-13","0","activityview的LTV_AVG",1228.0,"0.75"]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: LtvReportResponse type: object sensorsdata.analytics.v1.SessionReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.LinkProperty: description: '' properties: current_event_property: description: '' type: string target_event_property: description: '' type: string title: LinkProperty type: object sensorsdata.analytics.v1.FunnelReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.LtvUserDetailRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.FunnelReportResponse: description: 查询漏斗分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: date: DATE wastage_user_step_1: INT convert_user_step_2: INT convert_user_step_1: INT funnel_root: STRING funnel_level_2: STRING funnel_level_1: STRING wastage_user_step_2: INT convert_rate_step_2: DOUBLE completion_rate: DOUBLE total_user: INT convert_rate_step_1: DOUBLE median_converted_time_step_2: DOUBLE median_converted_time_step_1: DOUBLE completion_converted_user: INT type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-07-03 00:00:00",13.0,2.0,8.0,"$AppStart","$AppClick","$AppViewScreen",6.0,25.0,9.52,21.0,38.1,2490.0,89087.0,2.0]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: FunnelReportResponse type: object sensorsdata.analytics.v1.UserBehaviorResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserBehaviorResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.UserBehaviorResponseHttpApiResult type: object sensorsdata.analytics.v1.UserPathReportRequest.SingleEventWithFilterEntry: description: '' properties: key: description: '' type: string value: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' title: SingleEventWithFilterEntry type: object sensorsdata.analytics.v1.SegmentationReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.FunnelReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.FunnelReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.FunnelReportResponseHttpApiResult type: object sensorsdata.analytics.v1.FunnelReportRequest: description: 查询漏斗分析报告请求参数描述 properties: funnel: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiFunnelDefine' from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array extend_over_end_date: description: 是否限制漏斗所有步骤在事件窗口内,true:不限制,false:限制(将首步骤之后的步骤的发生时间限定在时间区间内) example: false type: boolean by_field_step: description: (可选)分组的步骤 id,如果为 -1 表示用户属性/分群名,0 表示第一步骤事件属性, format: int32 type: integer sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer filter_field_steps: description: 指定筛选条件针对的步骤,0 为第一步骤,-1 为用筛选条件为用户属性/用户分群, 如果配置此参数, 需要和 “field” 请求参数中的步骤保持一致。 example: '[0,0]' items: format: int32 type: integer type: array request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean calculation_caliber: description: 是否次数漏斗 example: count type: string limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object by_field_steps: description: 查看维度映射关系, 如果配置此参数, 需要和 “field” 请求参数中的步骤保持一致。 example: '[0,0]' items: format: int32 type: integer type: array time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string funnel_id: description: 漏斗 ID example: 123 format: int32 type: integer required: - from_date - to_date title: FunnelReportRequest type: object sensorsdata.common.Value: description: '' properties: null_value: description: '' enum: - NULL_VALUE type: string number_value: description: '' format: double type: number string_value: description: '' type: string bool_value: description: '' type: boolean int64_value: description: '' format: int64 type: integer int32_value: description: '' format: int32 type: integer struct_value: $ref: '#/components/schemas/sensorsdata.common.Struct' list_value: $ref: '#/components/schemas/sensorsdata.common.ListValue' title: Value type: object sensorsdata.analytics.v1.RfmAnalysisReportResponse: description: 创建 RFM 分析并返回报告与分布结果的响应描述 properties: report: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmReport' distributions: description: 分布结果列表 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmDistributionResult' type: array title: RfmAnalysisReportResponse type: object sensorsdata.analytics.v1.UserListRequest: description: 用户列表明细接口请求参数描述 properties: filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string required: - page_index - page_size title: UserListRequest type: object sensorsdata.analytics.v1.SessionReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.common.Struct: description: '' properties: fields: additionalProperties: $ref: '#/components/schemas/sensorsdata.common.Value' description: '' type: object title: Struct type: object sensorsdata.analytics.v1.AddictionReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.RfmAnalysisReportRequest: description: 创建 RFM 分析并返回报告与分布结果的请求参数描述 properties: group: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmAnalysisGroup' rfm_rule: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmRule' sample_factor: description: 抽样因子,64为全量,32为二分之一抽样 example: 64 format: int32 type: integer distributions: description: 需要一并返回的分布查询列表 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmDistributionQuery' type: array request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - group - rfm_rule title: RfmAnalysisReportRequest type: object sensorsdata.analytics.v1.SessionReportRequest: description: 查询 session 分析报告请求参数描述 properties: measures: description: 要查询的指标集合 example: '[{"event_name":"$MPShow","aggregator":"general","filter":{}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' session_name: description: session 名称 example: zqr_test_session type: string by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object rollup: description: 查询汇总或者明细数据, true:汇总,false:明细 example: true type: boolean sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer approx: description: 使用近似计算 example: true type: boolean hll_precision: description: '' format: int32 type: integer approx_total: description: '' type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string split_by_day: description: session 是否强制按天切割 example: true type: boolean subject_id: description: 多主体 ID example: $country type: string required: - from_date - measures - session_name - to_date - unit title: SessionReportRequest type: object sensorsdata.analytics.v1.SegmentationUserDetailRequest: description: 查询事件分析用户明细接口请求参数描述 properties: measures: description: 要查询的指标集合 example: '[{"event_name":"$MPShow","aggregator":"general","filter":{}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array slice_by_values: description: 查看哪个分组的用户明细,by_fields中有很多值, 需要看哪些值的用户,可以通过此参数设置 example: '["自驾游\n音乐\nDIY\n节日"]' items: type: string type: array rollup_date: description: 是否查询合计数据 example: true type: boolean unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回,false 则只返回基本的 id 列 example: true type: boolean row_limit: description: 限制展示的行数 format: int32 type: integer col_limit: description: 限制展示的列数 format: int32 type: integer page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer slice_date: description: 查看哪天的用户明细 example: '2022-09-27' type: string time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - from_date - measures - page_index - page_size - to_date - unit title: SegmentationUserDetailRequest type: object sensorsdata.analytics.v1.UserDetail.ProfilesEntry: description: '' properties: key: description: '' type: string value: description: '' properties: {} type: object title: ProfilesEntry type: object sensorsdata.common.Struct.FieldsEntry: description: '' properties: key: description: '' type: string value: $ref: '#/components/schemas/sensorsdata.common.Value' title: FieldsEntry type: object sensorsdata.analytics.v1.LtvReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.EventInfo.ProfileCnamesEntry: description: '' properties: key: description: '' type: string value: description: '' type: string title: ProfileCnamesEntry type: object sensorsdata.analytics.v1.SegmentationReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.SegmentationReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.SegmentationReportResponseHttpApiResult type: object sensorsdata.analytics.v1.AddictionUserDetailRequest: description: 查询分布分析用户明细接口请求参数描述 properties: event_name: description: 需要进行分布分析的事件名称 example: event.$AppClick type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' rollup_date: description: 是否查询合计数据 type: boolean by_field: description: 用户明细列表的分组信息 example: event.$Anything.$province type: string slice_by_value: description: 查看哪个分组的用户明细 example: 陕西省 type: string slice_freq: description: 查看事件触发次数为多少的用户明细列表 example: 10 format: int32 type: integer profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array unit: description: 时间单位,可以是 DAY/WEEK/MONTH enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回,false 则只返回基本的 id 列 example: true type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string slice_max_freq: description: 最大间隔 example: 50 format: int32 type: integer measure_type: description: 测量类型,可以是 times/period, period是当按小时数或者天数进行分布分析时使用 example: times type: string measure: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - event_name - from_date - page_index - page_size - to_date - unit title: AddictionUserDetailRequest type: object sensorsdata.analytics.v1.RetentionUserDetailRequest: description: 查询留存分析用户明细接口请求参数描述 properties: first_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' second_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer is_wastage: description: 是否流失用户,默认留存用户,false 为留存,true 为流失 example: false type: boolean profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array duration: description: 观测数,表示获取往后 N 个时间单位的留存 example: 7 format: int32 type: integer unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string by_events: description: '' items: type: string type: array by_field: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '"event.$AppStart.$country"' type: string slice_by_value: description: 查看哪个分组的用户明细 example: 陕西省 type: string slice_interval: description: 查看第几天留存的用户明细,0 表示当天,null 表示全部 example: '3' type: string detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回,false 则只返回基本的 id 列 example: true type: boolean page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string extend_over_end_date: description: (可选)后续事件是否可以超出时间区间 example: true type: boolean slice_date: description: 查看哪天的用户明细 example: '2022-09-27' type: string time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - duration - first_event - from_date - page_index - page_size - second_event - to_date - unit title: RetentionUserDetailRequest type: object sensorsdata.analytics.v1.AttributionEventElement: description: '' properties: event_name: description: '' type: string by_fields: description: '' items: type: string type: array link_events: description: '' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.LinkEvent' type: array bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: Map> type: object filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' title: AttributionEventElement type: object sensorsdata.analytics.v1.LtvReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.RfmDistributionRow: description: RFM 分布行 properties: by_values: $ref: '#/components/schemas/sensorsdata.common.ListValue' values: $ref: '#/components/schemas/sensorsdata.common.ListValue' title: RfmDistributionRow type: object sensorsdata.analytics.v1.AttributionReportResponse: description: 查询归因分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: click_times: LONG conversion_value_rate: DOUBLE goal_conversion: DOUBLE converted_number: LONG event_name: STRING converted_user_number: LONG event.$Anything.$province: STRING type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[[51.0,2.05,21.0,18.0,"$AppClick",16.0,"内蒙古自治区"]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: AttributionReportResponse type: object sensorsdata.analytics.v1.AttributionReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.AttributionReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.AttributionReportResponseHttpApiResult type: object sensorsdata.analytics.v1.RfmDistributionQuery: description: 单个分布查询参数 properties: type: description: 分布类型 enum: - DISTRIBUTION_TYPE_UNSPECIFIED - R - F - M - RF - RM - FM - RFM example: RFM type: string show_lines: description: 展示行数;双维分布时可传两个值 example: '[7]' items: format: int32 type: integer type: array sort_type: description: 排序方式 enum: - SORT_TYPE_UNSPECIFIED - DESC - ASC example: DESC type: string bucket_params: additionalProperties: $ref: '#/components/schemas/sensorsdata.common.ListValue' description: 分桶规则,key 只允许 R/F/M;null 表示默认区间,[null] 表示离散值,[1,10] 表示自定义区间 example: F: - null M: - '1' - '10' type: object title: RfmDistributionQuery type: object sensorsdata.analytics.v1.LtvUserStartSign: description: '' properties: start_event: description: 初始事件名 type: string start_time_field: description: 初始时属性名 type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' title: LtvUserStartSign type: object sensorsdata.analytics.v1.RfmAnalysisGroup: description: RFM 分析的人群范围 properties: group_component_type: description: 人群组件类型 enum: - GROUP_COMPONENT_TYPE_UNSPECIFIED - QUICK_COMPONENT - CUSTOMIZED_RULE - QUERY_RESULT - GROUP_BASED - ALL_USER example: GROUP_BASED type: string rule: description: 人群规则,沿用现有 RFM 接口 JSON 结构透传 example: '{"operator":"INTERSECT","groups":[{"type":"PROFILE_FILTER_BASED","profile_user_group":{"condition":{"operator":"AND","compound_conditions":[{"operator":"OR","conditions":[{"function":"IS_TRUE","params":[{"param_type":"FIELD","field":"user.user_segment_xxx"}]}]}}]}}]}' properties: {} type: object title: RfmAnalysisGroup type: object sensorsdata.analytics.v1.ApiRequestMeasure: description: '' properties: event_name: description: 事件名称 example: event.$AppClick type: string aggregator: description: 聚合方式 example: general type: string field: description: '' type: string expression: description: '' type: string expression_filters: description: '' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' type: array filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' name: description: 自定义指标名称 example: 小程序显示的用户数 type: string events: description: 自定义指标中关联的 events example: '["event.$AppClick", "event.$AppStart"]' items: type: string type: array params: description: '' items: description: google.protobuf.Value 支持各种 JSON 值 properties: {} type: object type: array split: description: '' type: boolean profit_rate: description: '' format: float type: number by_session: description: '' type: boolean expression_denominator_without_group: description: '' type: boolean atom_measure_without_group: description: '' type: boolean show_cname: description: '' type: string title: ApiRequestMeasure type: object sensorsdata.analytics.v1.IntervalReportResponse: description: 查询间隔分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: date: DATE uniqavg_cnt: DOUBLE by_field: STRING '25': DOUBLE cnt: DOUBLE people: DOUBLE min_time: DOUBLE uniqavg_time: DOUBLE '90': DOUBLE max_time: DOUBLE '50': DOUBLE '75': DOUBLE avg_time: DOUBLE '10': DOUBLE type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[["2022-07-01",1.03,"中国",7550.0,68.0,66.0,328.0,16686.77,31590.0,45802.0,17462.0,24248.0,16419.93,2236.0]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: IntervalReportResponse type: object sensorsdata.analytics.v1.UserBehaviorRequest: description: 查询用户行为序列接口请求参数描述 properties: users: description: 需要查询行为序列的用户的 ID example: '["-8961289991947891759"]' items: type: string type: array from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string distinct_id: description: false 表示 users参数指定的是神策内部的神策 ID(即 events 表中的 user_id 字段和 users 表中的ID 字段),true 表示传入的是 distinct_id example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string page_size: description: 默认值30,表示每页展示事件数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer sort_by_time_asc: description: '是否根据事件发生时间正排序,true: order by time asc; false: order by time desc' example: true type: boolean restrict_returned_properties: description: 为 true 时按 event_property_allowlist 裁剪每条事件返回的 event properties;用户属性 profiles 始终全量返回,不作裁剪。未设置或为 false 时保持原有行为(事件属性亦全量),保证前向兼容 example: false type: boolean event_property_allows: description: 当 restrict_returned_properties 为 true 时生效:仅返回本列表中出现、且该条事件的 properties 中实际存在的键(求交集);空列表表示不输出任何事件自定义属性(仍保留 distinct_id、user_id、event、time) example: '["$ip","$city","custom_col"]' items: type: string type: array required: - event_property_allows - from_date - to_date - users title: UserBehaviorRequest type: object sensorsdata.analytics.v1.SegmentationReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.UserPropertyReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.UserPropertyReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.UserPropertyReportResponseHttpApiResult type: object sensorsdata.analytics.v1.IntervalReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.IntervalReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.IntervalReportResponseHttpApiResult type: object sensorsdata.analytics.v1.UserPropertyReportRequest.BucketParamsEntry: description: '' properties: key: description: '' type: string value: description: '' items: properties: {} type: object type: array title: BucketParamsEntry type: object sensorsdata.analytics.v1.SqlQueryResponse: description: 自定义 sql 查询接口的返回结构描述 properties: columns: description: 查询列 example: '["$browser_version","$utm_medium","$viewport_position","$dimension_dict_$model","$os","$is_first_time","$network_type","$wifi","$ip","$screen_height","$utm_term","$referrer","$viewport_height","$url_path","$province","$url","$share_depth","day","$element_content","$carrier","$os_version","$receive_time","$utm_matching_type","$is_first_day","$referrer_host","$city","$viewport_width","$screen_width","$utm_source","$browser","$app_version","$lib","$event_duration","event_id","$country","$utm_campaign","user_id","distinct_id","$title","$utm_content","$dimension_dict_$manufacturer","time","$resume_from_background"]' items: type: string type: array data: $ref: '#/components/schemas/sensorsdata.common.ListValue' title: SqlQueryResponse type: object sensorsdata.analytics.v1.UpdateSessionRequest: description: session 定义 properties: id: description: session ID format: int32 type: integer name: description: session 名称,注意name必须是全小写,接口内部逻辑会强制转小写处理 example: session type: string cname: description: session 中文名称 example: session名字 type: string events: description: session 事件列表 example: '["realname", "finishdrive", "signfinish"]' items: type: string type: array session_interval_seconds: description: session间隔时间(单位秒) example: 60 format: int32 type: integer is_event_split: description: 是否开启事件切割 example: false type: boolean start_event: description: session开始事件 (开启事件切割时必填) example: realname type: string stop_event: description: session结束事件 (开启事件切割时必填) example: finishdrive type: string comment: description: 备注说明 example: 备注 type: string required: - cname - events - name - session_interval_seconds title: UpdateSessionRequest type: object sensorsdata.analytics.v1.RfmFactorRule: description: 单个 R/F/M 因子规则 properties: factor_type: description: 因子类型 enum: - FACTOR_TYPE_UNSPECIFIED - RECENCY - FREQUENCY - MONETARY example: RECENCY type: string factor_rule: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmFactorComputeRule' factor_group_rules: description: 因子的高低分层规则 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmFactorGroupRule' type: array title: RfmFactorRule type: object sensorsdata.analytics.v1.RfmRule: description: RFM 规则 properties: rfm_factors: description: RFM 因子规则 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmFactorRule' type: array layer_params: additionalProperties: description: '' type: string description: 8 个分层编码与名称映射 example: '110': 一般价值客户 '000': 一般挽留客户 '011': 重点保持客户 '100': 一般发展客户 '111': 高价值客户 '001': 重点挽留客户 '101': 重点发展客户 '010': 一般保持客户 type: object title: RfmRule type: object sensorsdata.analytics.v1.EventInfo: description: '' properties: distinct_id: description: 用户标识 ID 可变 example: 02ta9OJYJVXcDbqs type: string user_id: description: 神策用户 ID example: '-8961289991947891759' type: string event: description: 事件名 example: $AppClick type: string time: description: 触发时间 example: '2022-09-29 00:26:10.878' type: string properties: additionalProperties: description: '' properties: {} type: object description: 属性列表 type: object profiles: additionalProperties: description: '' properties: {} type: object description: 用户属性 type: object event_cname: description: 事件展示名(与 OpenAPI 事件元数据中的 cname 解析规则一致,含 i18n);未知事件时回退为事件名 event example: 应用点击 type: string property_cnames: additionalProperties: description: '' type: string description: 事件自定义属性的展示名:key 与 properties 的键一致,value 为该属性的展示名;未知属性时 value 与 key 相同 type: object profile_cnames: additionalProperties: description: '' type: string description: 用户属性的展示名:key 与 profiles 的键一致;未知属性时 value 与 key 相同 type: object title: EventInfo type: object sensorsdata.analytics.v1.PageInfo: description: '' properties: current_page: description: '' format: int32 type: integer page_count: description: '' format: int32 type: integer total: description: '' format: int32 type: integer title: PageInfo type: object sensorsdata.analytics.v1.EventInfo.PropertiesEntry: description: '' properties: key: description: '' type: string value: description: '' properties: {} type: object title: PropertiesEntry type: object sensorsdata.common.ErrorCause: properties: error_cause: description: 致错原因1 example: 参数异常1 type: string action_suggestion: description: 操作建议,针对该原因,建议的解决方式 example: 检测入参的数据类型1 type: string title: ErrorCause type: object sensorsdata.common.ErrorInfo: properties: code: description: 具体的错误码 example: XX-D-F-2-1 type: string description: description: 错误描述 example: 前端参数校验异常,PARAMETER_FORMAT_ERROR(quantiles=[10, -90] is not include [0, 100]) type: string system_response: description: 致错的可能原因列表 example: 系统终止了查询处理 type: string error_causes: items: $ref: '#/components/schemas/sensorsdata.common.ErrorCause' type: array context: $ref: '#/components/schemas/sensorsdata.common.ErrorContext' title: ErrorInfo type: object sensorsdata.analytics.v1.UserPropertyReportResponse.MetadataColumnsEntry: description: '' properties: key: description: '' type: string value: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string title: MetadataColumnsEntry type: object sensorsdata.analytics.v1.UserDetail: description: '' properties: id: description: 神策用户 ID example: '-8961289991947891759' type: string first_id: description: firstId example: 7tpEmL7hMALkIinn type: string second_id: description: secondId example: '' type: string distinct_id: description: distinctId example: 02ta9OJYJVXcDbqs type: string column_names: description: 字段名 items: type: string type: array profiles: additionalProperties: description: '' properties: {} type: object description: 属性明细 type: object title: UserDetail type: object sensorsdata.analytics.v1.RfmAnalysisReportResponseHttpApiResult: properties: code: type: string message: type: string request_id: type: string data: $ref: '#/components/schemas/sensorsdata.analytics.v1.RfmAnalysisReportResponse' error_info: $ref: '#/components/schemas/sensorsdata.common.ErrorInfo' title: sensorsdata.analytics.v1.RfmAnalysisReportResponseHttpApiResult type: object sensorsdata.analytics.v1.UserPathUserDetailRequest: description: '' properties: filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' slice_element_filters: description: 当前节点信息 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.SliceUserElementFilter' type: array next_slice_element_filters: description: 后续节点信息 items: $ref: '#/components/schemas/sensorsdata.analytics.v1.SliceUserElementFilter' type: array session_level: description: 当前节点在第几层 example: 1 format: int32 type: integer source_type: description: 起始事件 example: event type: string source_event: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestEventWithFilter' event_names: description: 参与分析的事件 example: '["$AppStart","$AppViewScreen","$AppClick"]' items: type: string type: array by_fields: description: 按照属性进行分组展示 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array session_interval: description: session 时长 example: 1800 format: int64 type: integer detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回, example: false type: boolean is_aggregate: description: 当前节点是否是聚合节点, 聚合节点界面会展示更多 example: true type: boolean edge_type: description: 可以是WASTAGE,RETENTION和ALL,分别表示流失节点,后续事件统计,该节点合计人数 example: WASTAGE type: string is_next_aggregate: description: 下一个节点是否是聚合节点,聚合节点界面会展示更多 example: true type: boolean page_size: description: 默认值30,表示每页展示用户数,可不加 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer limit: description: 限制返回的条数 example: 10000 format: int32 type: integer use_cache: description: 是否使用缓存 type: boolean request_id: description: 请求ID example: '12345696321548954' type: string from_date: description: 查询开始日期 example: '2022-09-29' type: string to_date: description: 查询结束日期 example: '2022-09-29' type: string col_limit: description: (可选)列数量的限制 format: int32 type: integer row_limit: description: (可选)每列节点数限制 format: int32 type: integer sort_by_field: description: '' type: string required: - event_names - from_date - page_index - page_size - source_event - source_type - to_date title: UserPathUserDetailRequest type: object sensorsdata.analytics.v1.UserPropertyReportResponse: description: 查询属性分析报告返回结构描述 properties: truncated: description: 查询是否截断 example: false type: boolean metadata_columns: additionalProperties: description: '' enum: - META_DATA_TYPE_UNSPECIFIED - DOUBLE - STRING - BOOLEAN - DATE - INT - LONG type: string description: 本次查询的返回的数据列信息 example: user.vehicle_year: DOUBLE user.vehicle_type: STRING value: LONG type: object detail_rows: description: 本次查询的返回的详细数据(目前对于数值类型统一按浮点数格式返回 例如:10.0) example: '[[3,"高性能跑车",1287.0]]' items: items: properties: {} type: object type: array type: array column_infos: description: 本次查询的返回的数据列的元数据信息 example: '[{"column_name":"by_value","data_type":"STRING"},{"column_name":"addiction_rate_bucket_3","data_type":"DOUBLE"},{"column_name":"total_user","data_type":"INT"},{"column_name":"bucket_region_1","data_type":"STRING"},{"column_name":"addiction_rate_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_rate_bucket_1","data_type":"DOUBLE"},{"column_name":"bucket_region_2","data_type":"STRING"},{"column_name":"total_measure","data_type":"DOUBLE"},{"column_name":"bucket_region_3","data_type":"STRING"},{"column_name":"addiction_user_bucket_3","data_type":"INT"},{"column_name":"addiction_user_bucket_1","data_type":"INT"},{"column_name":"addiction_user_bucket_2","data_type":"INT"},{"column_name":"addiction_measure_bucket_2","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_3","data_type":"DOUBLE"},{"column_name":"addiction_measure_bucket_1","data_type":"DOUBLE"}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ColumnMetaData' type: array title: UserPropertyReportResponse type: object sensorsdata.analytics.v1.SegmentationReportRequest: description: 查询事件分析报告请求参数描述 properties: measures: description: 要查询的指标集合 example: '[{"event_name":"$MPShow","aggregator":"general","filter":{}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array bucket_params: additionalProperties: description: '' items: properties: {} type: object type: array description: 分桶条件,对数值型属性进行分组时,可以自定义分桶条件,如果不设置的话,是默认区间 example: event.$Anything.$event_duration: - '40' - '50' type: object rollup: description: 查询汇总或明细。true:detail_rows 返回合计;false:detail_rows 返回明细。向下兼容:除「detail_and_rollup=true 且 rollup=false」外,行为与改造前完全一致;rollup=true 时忽略 detail_and_rollup。 example: true type: boolean sampling_factor: description: 抽样因子,64为全量,32为2分之1抽样 example: 64 format: int32 type: integer approx: description: 使用近似计算 example: true type: boolean hll_precision: description: '' format: int32 type: integer approx_total: description: '' type: boolean limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string detail_and_rollup: description: 是否同时返回明细与合计(唯一新增能力)。仅当本字段为 true 且 rollup=false 时生效:detail_rows=明细,rollup_rows=合计。false/未传,或与 rollup=true 同时出现时:忽略本字段,完全按 rollup 老逻辑,不返回 rollup_rows。 example: false type: boolean arith_rollup: description: 分组汇总时的合计方式。true:加权合计/快速总和;false:去重合计/精准合计。未传时默认 false(去重/精准合计),与改造前行为一致,保证向下兼容。 example: false type: boolean required: - from_date - measures - to_date - unit title: SegmentationReportRequest type: object sensorsdata.analytics.v1.SessionUserDetailRequest: description: 查询 session 分析用户明细接口请求参数描述 properties: measures: description: 要查询的指标集合 example: '[{"event_name":"$MPShow","aggregator":"general","filter":{}}]' items: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestMeasure' type: array filter: $ref: '#/components/schemas/sensorsdata.analytics.v1.ApiRequestFilter' by_fields: description: 按什么维度查看,一般是事件属性、用户属性等维度 example: '["event.$AppStart.$country","event.$AppStart.$province"]' items: type: string type: array slice_by_values: description: 查看哪个分组的用户明细,by_fields中有很多值, 需要看哪些值的用户,可以通过此参数设置 example: '["自驾游\n音乐\nDIY\n节日"]' items: type: string type: array rollup_date: description: 是否查询合计数据 example: true type: boolean unit: description: 查看的时间粒度,可以是,HOUR:按小时,DAY:按天,WEEK:按周,MONTH:按月,YEAR:按年 enum: - UNIT_TYPE_UNSPECIFIED - HOUR - DAY - WEEK - MONTH - YEAR - QUARTER - MINUTE - SECOND example: DAY type: string profiles: description: 指定哪些用户属性,为空表示所有用户属性 example: '["user.$id","user.vehicle_type","user.vehicle_system"]' items: type: string type: array detail: description: 是否展示详情,如果 true,则会按照 profile 中的列返回,false 则只返回基本的 id 列 example: true type: boolean row_limit: description: 限制展示的行数 format: int32 type: integer col_limit: description: 限制展示的列数 format: int32 type: integer page_size: description: 默认值30,表示每页展示用户数 example: 30 format: int32 type: integer page_index: description: 请求的页数 example: 2 format: int32 type: integer use_cache: description: 是否使用缓存,若缓存中找不到相应数据,则从数据库读出 example: false type: boolean request_id: description: 本次请求 ID, 方便后续追踪问题 example: '12345696321548954' type: string from_date: description: 查询日期范围的开始时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string to_date: description: 查询日期范围的结束时间,格式为 yyyy-MM-dd example: '2022-09-29' type: string limit: description: 用户设定的返回的最大行数,如果为 null,表示自动计算一个适合前端展示的值。如果为 -1,表示在可能得情况下返回尽量多的数据。 example: 10000 format: int32 type: integer slice_date: description: 查看哪天的用户明细 example: '2022-09-27' type: string session_name: description: session 名称 example: zqr_test_session type: string split_by_day: description: session 是否强制按天切割 example: true type: boolean time_zone_mode: description: 使用哪种时区模式,取值范围参考枚举 TimeZoneMode enum: - TIME_ZONE_MODE_UNSPECIFIED - CUSTOMER - SERVER example: SERVER type: string server_time_zone: description: 指定使用的服务器时区,格式为 UTC+偏移量,例如:UTC+10:00 example: UTC+10:00 type: string subject_id: description: 多主体 ID example: $country type: string required: - from_date - measures - page_index - page_size - session_name - to_date - unit title: SessionUserDetailRequest type: object x-sd-openapi-service-name: Model x-sd-openapi-service-name-hyphen: model x-sd-openapi-app-name: analytics x-sd-openapi-service-name-zh_cn: 分析模型 x-original-swagger-version: '2.0'