注意:刷新分群是占用查询资源的,频繁调用该接口可能导致查询速度变慢。
Path:/openapi/v1/{app_id}/cohorts/{cohort_id}/refresh
Method: GET
Content-type: application/json
Path-parameters:
Parameter | Type | Description | Required |
---|---|---|---|
cohort_id | int | 分群id | true |
Response:
{ "code": 200, "message": "success", "data": { "count": 9289, "refresh_time": "2022-07-11", "refresh_timestamp": 1657534754, "status": 1 } }
字段含义说明
Field | Type | Description |
---|---|---|
count | int | 刷新后分群中的人数 |
refresh_time | string | 刷新完成的日期 |
refresh_timestamp | int | 刷新完成的时刻的10位时间戳 |
status | int | 刷新状态 |
bc
为创建的 RangersClient, 其初始化请参考 “OpenAPI SDK 使用说明”, 各语言的 SDK 都提供了类似的接口
调用(Python):
# 例如,app_id= 164314 cohort_id = 6 resp = bc.data_finder("/openapi/v1/164314/cohorts/6/refresh") print(resp.json()["data"])
返回结果:
{ "code": 200, "message": "success", "data": { "count": 9289, "refresh_time": "2022-07-11", "refresh_timestamp": 1657534754, "status": 1 } }