Path:/openapi/v1/{app_id}/cohorts
Method: GET
Content-type: application/json
Path-parameters: 参考API说明与公共参数
Response:
{
"code":200,
"message":"success",
"data":[
{
"app_id":123,
"cohort_id":1054321,
"cohort_name":"分群展示名称",
"cohort_status":1,
"cohort_type":4,
"count":3950,
"creator":"00000",
"creator_time":1648446690,
"description":"",
"dsl_content": Object{...},
"modify_time":1648538157,
"modify_user":"00000",
"part_date":"",
"refresh_rule":1,
"status":1,
"user_info":{},
"version":1
}
]
}
字段含义说明:
data 是一个JSON 对象数组, 其中的JSON 关键字段说明
Field | Type | Description |
---|---|---|
cohort_id | int | 分群ID |
cohort_name | string | 分群名称 |
refresh_rule | int | 分群刷新规则 |
count | int | 分群内用户的数量 |
bc
为创建的 RangersClient, 其初始化请参考使用说明, 各语言的 SDK 都提供了类似的接口
调用(Python):
# 例如,app_id= 164314
res = bc.data_finder('/openapi/v1/164314/cohorts', method='get')
print(res.content)
返回结果:
{
"code":200,
"data":[
{
"app_id":164314,
"cohort_id":1591,
"cohort_name":"一线活跃用户",
"cohort_status":1,
"cohort_type":4,
"count":34259,
"creator":"00000",
"creator_time":1568202530,
"description":"北上广深,30天内活跃过",
"dsl_content":Object{...},
"modify_time":1655270356,
"modify_user":"00000",
"part_date":"2022-06-15",
"refresh_rule":2,
"status":1,
"user_info":Object{...},
"version":10132
},
Object{...},
Object{...}
],
"message":"success"
}