You need to enable JavaScript to run this app.
导航
获取指定分群信息
最近更新时间:2024.06.30 18:36:02首次发布时间:2024.06.30 18:36:02

请求说明

Path:/openapi/v1/{app_id}/cohorts/{cohort_id}
Method: GET
Content-type: application/json

请求参数

Path-parameters:

参数

类型

是否必选

示例值

描述

cohort_id

int

1054321

分群ID

返回参数

Response:

{
    "code":200,
    "message":"success",
    "data":{
        "app_id":123,
        "cohort_id":1054321,
        "cohort_name":"分群展示名称",
        "cohort_status":1,
        "cohort_type":4,
        "count":3950,
        "creator":"10000123",
        "creator_time":1648446690,
        "description":"",
        "dsl_content":Object{...},
        "modify_time":1648538157,
        "modify_user":"10000123",
        "part_date":"",
        "refresh_rule":1,
        "status":1,
        "user_info":Object{...},
        "version":1
    }
}

字段含义说明:
data 是一个JSON 对象数组(如果最多只会有一个), 其中的JSON 关键字段说明

Field

Type

Description

cohort_id

int

分群ID

cohort_name

string

分群名称

refresh_rule

int

分群刷新规则
0: unsupport 不支持刷新
1: manual 支持手动刷新
2: daily 每日刷新

count

int

分群内用户的数量

请求示例

bc 为创建的 RangersClient, 其初始化请参考使用说明, 各语言的 SDK 都提供了类似的接口
调用(Python):

# 例如,app_id= 164314 cohort id= 1001076
res = bc.data_finder('/openapi/v1/164314/cohorts/1001076', 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
    },
    "message":"success"
}