更新记录:4.3.4版本新增,4.6版本中增加分页功能
适合单批次获取小量级数据量(根据内存限定,一般为1万),如果需要获取或者导出更多,在5.0版本中,可选用 。
【POST】 /uba/api/cohort/users
{
//分群下总用户条数
"count":46,
//【4.6中新增】当前页
"page": 1,
//结果返回的用户条数
"size":2,
//用户详情
"users":[
{
"$imei":null,
"$first_visit_language":"zh-cn",
"distinct_id":4255875062385414000,
"$signup_time":null,
"xwho":"JSd650856937040a530ff54fdaab4e56d7d650"
},
{
"$imei":null,
"$first_visit_language":"zh-cn",
"distinct_id":-4635244755532264000,
"$signup_time":null,
"xwho":"JS1c6d11e3e67bf0dc02030d3fd393310b1c6d",
//tag.开头的为标签数据,指定标签code才会查询
"tag.tag_3":"高消费"
}
]
}
curl -H "Content-Type:application/json" -H "token:4113c9cad1c301113783f433e254888c" -H "appKey:31abd9593e9983ec" -X POST --data '{
"cohortCode":"arkfq_3",
"limit":2,
"properties":["xwho", "distinct_id", "$imei", "$first_visit_language", "$signup_time"]
}' http://127.0.0.1:4005/uba/api/cohort/users
【POST】 /uba/api/cohort/users/export
{
// 【必填】分群code
"cohortCode":"arkfq_3",
//需要获取的用户条数,不传指获取全部
"limit":10000,
//【选填】指定需要查询的用户属性列,传用户属性ID
"properties":["xwho", "distinct_id", "$imei", "$first_visit_language", "$signup_time"],
}
limit:获取用户分群下的用户条数,可传可不传,不传为全部
{"$city":"BJ","$email":"(已脱敏)","$platform":"JS","xwho":"JSa0438f992d07a31d9f079ca479cd4796a043"}
{"$city":"CS","$email":"(已脱敏)","$platform":"JS","xwho":"JS01cb9f5096f452a10b03e90b0694dee401cb"}
{"$city":"SH","$email":"(已脱敏)","$platform":"JS","xwho":"JS9e931e93f9674491b77eba3103e638cf9e93"}
{"$city":"SZ","$email":"(已脱敏)","$platform":"JS","xwho":"JS7b4dc11ab426603295ab11811d69797a7b4d"}
{"$city":null,"$email":"(已脱敏)","$platform":"JS","xwho":"JS72889204a97a39e06a220c1aa3b4fdbd7288"}
{"$city":"GZ","$email":"(已脱敏)","$platform":"JS","xwho":"JS9a99fc0dcebf31b7a75f349cac6cd2c09a99"}
curl -o output.json -H "Content-Type:application/json" -H "token:3edbaf427ecdda80beef322ad3c333a4" -H "appKey:31abd9593e9983ec" -X POST --data '{
"cohortCode":"arkfq_98",
"properties":["xwho","$email","$platform","$city"]
}' https://127.0.0.1:4005/uba/api/cohort/users/export