Path:/openapi/v1/{app_id}/cohorts
Method: GET
Content-type: application/json
Path-parameters: Just refer to the public parameters API Description and Public Parameters.
Response:
{ "code":200, "message":"success", "data":[ { "app_id":123, "cohort_id":1054321, "cohort_name":"分群展示名称", // Cohorts display 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 } ] }
Field meaning description:
Data is an array of JSON objects, where the JSON keyfields specify
Field | Type | Description |
|---|---|---|
cohort_id | int | cluster ID |
cohort_name | string | subgroup name |
refresh_rule | int | group refresh rule |
count | int | Number of users in the cluster |
Bc is the RangersClient created. For its initialization, please refer to the "OpenAPI SDK Instructions". SDKs in various languages provide similar interfaces
Call (Python):
# for example, app_id= 164314 res = bc.data_finder('/openapi/v1/164314/cohorts', method='get') print(res.content)
Return result:
{ "code":200, "data":[ { "app_id":164314, "cohort_id":1591, "cohort_name":"一线活跃用户", // Active users in first tier cities "cohort_status":1, "cohort_type":4, "count":34259, "creator":"00000", "creator_time":1568202530, "description":"北上广深,30天内活跃过", // Users in Beijing, Shanghai, Guangzhou, and Shenzhen, that have been active in last 30 days "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" }