Path:/openapi/v1/{app_id}/behaviors/flows
Method: POST
Content-type: application/json
Body:
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
query_type | string | 是 | user_unique_id | 查询口径类型 |
query_id | string | 是 | test_1 | 查询id |
orientation | string | 是 | earlier | 根据时间戳向前或向后查询,可选earlier、later |
timestamp | int | 是 | 1674889321177 | 需要查询的13位毫秒级时间戳 |
count | int | 是 | 1000 | 单次查询多少条行为,建议值为1000,最多支持5000; |
current_earliest_timestamp | int | 否 | null | 已知的最早一条行为发生的时间戳 |
Response:
{ "code": 200, "message": "success", "data": { "flow": [ { "server_time": 1674889013, "time": 1674889013, "event_date": "2023-01-28", "event": "event_1", "app_name": "bytefinder", "app_id": 2174, "user": { "user_unique_id": "test_1", "web_id": "", "ssid": "172020d7-2261-47d8-ae0d-5721d4445f79", ... }, "params": { "$is_login": "已登录", ... }, "items": {}, "local_time_ms": 1674889013000, "event_name": "event_1", "repetition_cnt": 1 }], "is_reorientation": false, "is_earliest": false, "is_latest": false, "general_preset_params": [ "$data_validation_test", ... ], "platform_types": "web" } }
Field | Type | Description |
---|---|---|
flow | list | 行为流 |
is_reorientation | bool | 是否自动重定向到最早一条行为 |
is_latest | bool | 是否已经是最新的行为了 |
is_earliest | bool | 是否已经是最早的行为了 |
general_preset_params | list | 行为流中包含的事件属性中,预置属性的列表 |
platform_types | str | app所属的端类型 |
bc
为创建的 RangersClient, 其初始化请参考使用说明, 各语言的 SDK 都提供了类似的接口
调用(Python)::
body={ "query_id": "test_1", "query_type": "user_unique_id", "count": 1000, "orientation": "earlier", "timestamp": 1674889321177, "current_earliest_timestamp": null } res = bc.data_finder('/openapi/v1/12345/behaviors/flow', body=body) print(res.content)
返回结果:
{ "code": 200, "message": "success", "data": { "flow": [ { "server_time": 1674889013, "time": 1674889013, "event_date": "2023-01-28", "event": "event_1", "app_name": "bytefinder", "app_id": 12345, "user": { "user_unique_id": "test_1", "web_id": "", "ssid": "172020d7-2261-47d8-ae0d-5721d4445f79", "app_channel": "unknown", "user_register_ts": 1670315402, "device_model": "unknown", "ab_version": [], "network_carrier": "unknown", "app_version": "unknown", "network_type": "unknown", "os_version": "unknown", "os_name": "unknown", "package": "unknown", "loc_province_id": "河北", "browser": "unknown", "loc_city_id": "张家口", "language": "unknown", "resolution": "unknown", "app_language": "unknown", "loc_country_id": "中国", "browser_version": "unknown", "user_id": "test_1", "bd_did": "", "brand": "unknown" }, "params": { "$is_login": "已登录", "error_param_code": 0, "error_count": 128, "error_event_code": 1010006, "error_platform": "Android", "error_param_name": "", "error_sdk_version": "6090690", "error_app_id": 168436, "error_event_name": "bav2b_click" }, "items": {}, "local_time_ms": 1674889013000, "event_name": "data_quality_error_statistics", "repetition_cnt": 1 }], "is_reorientation": false, "is_earliest": false, "is_latest": false, "general_preset_params": [ "$data_validation_test", "$event_name", "$event_time", "$is_first_day", "$is_login", "$latest_referrer", "$latest_referrer_host", "$latest_search_keyword", "$latest_traffic_source_type", "$tr_web_ssid", "$user_register_time", "__sdk_platform", "bddid", "event_date", "server_time", "user_register_ts", "user_unique_id", "web_id", "wechat_unionid", "$extra", "referer_full_domain", "$app_channel", "$deeplink_url", "$source_platform", "app_name", "referer_site_name", "referer_type", "scene", "session_duration", "title", "url", "url_full_domain", "url_path", "visit_from_outside", "$is_first_time", "$page_duration", "$app_version", "$cpu", "$crash_process", "$crash_thread", "$detailed_stack", "$device_model", "$is_backstage", "$os_version", "$resolution", "$rom", "$session_duration", "$link_type", "ssid", "error_app_id", "error_count", "error_event_code", "error_event_name", "error_param_code", "error_param_name", "error_platform", "error_sdk_version", "event_type", "message_id", "description", "message_type", "media_id", "pic_url", "latitude", "longitude", "precision", "location_x", "location_y", "scale", "key", "thumb_media_id", "content", "$inactive", "$inline", "$source_uuid", "$url_query", "currency_amount", "session_no", "session_start_time", "$task_unit_id", "$target_uuid_list" ], "platform_types": "web" } }