# User Feature Analysis API
Call method See Call method description in Open API doc.
You can read the attribute analysis in the user manual to understand the usage scenario.
# User feature analysis query
Interface URL
/open/user-prop-analyze?token=xxx
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
# Request Body Parameter
{
"eventView": {
"userCrowds": [
{
"crowdName": "female",
"filts": [
{
"columnDesc": "gender",
"columnName": "gender",
"comparator": "equal",
"filterType": "SIMPLE",
"ftv": [
"女"],
"specifiedClusterDate": "2022-01-27",
"tableType": "user",
"timeUnit": ""
}],
"relation": "and"
},
{
"crowdName": "male",
"filts": [
{
"columnDesc": "gender",
"columnName": "gender",
"comparator": "equal",
"filterType": "SIMPLE",
"ftv": [
"male"],
"specifiedClusterDate": "2022-01-27",
"tableType": "user",
"timeUnit": ""
}],
"relation": "and"
},
{
"crowdName": "gender unknown",
"filts": [
{
"columnDesc": "gender",
"columnName": "gender",
"comparator": "equal",
"filterType": "SIMPLE",
"ftv": [
"unknown"],
"specifiedClusterDate": "2022-01-27",
"tableType": "user",
"timeUnit": ""
}],
"relation": "and"
}]
},
"events": [
{
"analysis": "SUM",
"analysisDesc": "sum",
"eventNameDisplay": "account balance",
"filts": [
{
"columnDesc": "balance",
"columnName": "accountbalance",
"comparator": "greater",
"filterType": "SIMPLE",
"ftv": [
"1"],
"specifiedClusterDate": "2022-01-27",
"tableType": "user",
"timeUnit": ""
}],
"quota": "accountbalance",
"relation": "and",
"tableType": "user"
}],
"projectId": 377,
"limit": 10,
"timeoutSeconds": 10,
"useCache": true
}
# Request Parameter Description
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
eventView | - | Object | Yes | Grouping properties |
∟ userCrowds | - | Object | No | Crowd |
∟ crowdName | Female | String | Yes | Crowd name |
∟ filts | - | List | Yes | Filter objects |
∟ columnDesc | Gender | String | No | Field display name |
∟ columnName | gender | String | Yes | Field name |
∟ comparator | equal | String | Yes | Reference: Filtered expression for model query API |
∟ filterType | SIMPLE | String | No | Filter mode, SIMPLE: simple, COMPOUND: composite |
∟ ftv | ["Female"] | List | No | Property comparison value |
∟ specifiedClusterDate | 2022-01-27 | String | No | Cluster specified date |
∟ tableType | user | String | Yes | Table type, event: transaction table, user: user table |
∟ timeUnit | String | No | Filter time unit | |
∟ relation | and | String | Yes | Logical relationship, and: logical and, or: logical or |
events | - | List | Yes | List of event indicators |
∟ analysis | SUM | String | Yes | Analysis angle |
∟ analysisDesc | Sum | String | No | Analysis angle description (display name) |
∟ eventNameDisplay | Total balance | String | No | Event display name |
∟ filts | - | List | No | List of conditions |
∟ columnDesc | Balance | String | No | Field display name |
∟ columnName | accountbalance | String | Yes | Field name |
∟ comparator | greater | String | Yes | Reference: Filtered expression for model query API |
∟ filterType | SIMPLE | String | No | Filter mode, SIMPLE: simple, COMPOUND: composite |
∟ ftv | ["1"] | List | No | Property comparison value |
∟ specifiedClusterDate | 2022-01-27 | String | No | Cluster specified date |
∟ tableType | user | String | Yes | Table type, event: transaction table, user: user table |
∟ timeUnit | String | No | Filter time unit | |
∟ quota | accountbalance | String | No | Logical relationship, and: logical and, or: logical or |
∟ relation | and | String | No | Logical relationship, and: logical and, or: logical or |
∟ tableType | user | String | Yes | Table type, event: transaction table, user: user table |
projectId | 377 | Integer | Yes | Project ID |
limit | 10 | Integer | No | Maximum number of groups per analysis object, optional parameters, default is 1000, maximum is 10000 |
timeoutSeconds | 10 | Integer | No | Request timed out parameter, timeout cancels query task |
useCache | true | Boolean | No | Use cache, optional parameter, default is true |
# Successful Response Example
{
"data": {
"data_list": [
{
"group_cols": [
"female"
],
"values": 1140523491
},
{
"group_cols": [
"male"
],
"values": 1141720850
},
{
"group_cols": [
"gender unknown"
],
"values": 227565607
}
],
"group_cols_sorted": [
[
"female",
"male",
"gender unknown"
]
],
"group_num": 0,
"result_generate_time": "2022-01-27 15:01:51",
"unit": ""
},
"return_code": 0,
"return_message": "success"
}
# Response Parameter Description
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
data | - | Object | Return result |
∟ data_list | - | List | Data List |
∟ group_cols | ["Female"] | List | Group or crowd list |
∟ values | 1140523491 | Integer | Number of users |
∟ group_cols_sorted | ["Female"] | List | Group or crowd order list |
∟ group_num | 0 | Integer | Number of groupings |
∟ result_generate_time | 2022-01-27 15:01:51 | String | Results generation time |
∟ unit | String | Numerical attribute unit |
Error Response Example
{
"return_code": -1008,
"return_message": "The parameter (token) is empty"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1008 | Integer | Return code |
return_message | The parameter (token) is empty | String | Return information |
# User Feature Analysis User List
Interface URL
/open/user-prop-user-list?token=xxx
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
projectId | 0 | Integer | Yes | Project ID |
# Request Body Parameter
{
"projectId": 0,
"events": [{
"analysis": "AVG",
"filts": [
{
"columnName": "latest_login_time",
"comparator": "relativeCurrentBetween",
"ftv": [
"7",
"1"
],
"tableType": "user"
}
],
"quota": "diamond_num",
"relation": "and",
"tableType": "user"
}],
"eventView": {
"groupBy": [
{
"columnName": "user_level",
"tableType": "user"
},
{
"columnName": "channel",
"tableType": "user"
}
]
},
"sliceGroupVal": [
"31",
"app store"
],
"timeoutSeconds": 10
}
# Request Parameter Description
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
projectId | 0 | Integer | Yes | Project ID |
events | - | List | Yes | Analytical indicators |
∟ analysis | AVG | List | Yes | Analysis type, aggregation operation |
∟ filts | - | List | No | Filter List |
∟ columnName | latest_login_time | String | Yes | Field name |
∟ comparator | relativeCurrentBetween | String | Yes | Reference: Filtered expression for model query API |
∟ ftv | ["7", "1"] | List | Property comparison value | |
∟ tableType | user | String | Yes | Table type, event: transaction table, user: user table |
∟ quota | diamond_num | String | No | Indicator attributes (with analysis, meaning which attribute of which analysis angle) |
∟ relation | and | String | No | Logical relationship, and: logical and, or: logical or |
∟ tableType | user | String | Yes | Table type, event: transaction table, user: user table |
eventView | - | Object | Yes | Group property table |
∟ groupBy | - | List | No | Group attributes, can have zero or more |
∟ columnName | user_level | String | Yes | Field name |
∟ tableType | user | String | Yes | Table type, event: transaction table, user: user table |
sliceGroupVal | ["31","app store"] | List | No | Where grouping |
timeoutSeconds | 10 | Integer | No | Request timed out parameter, timeout cancels query task |
# Successful Response Example
{
"data": {
"datalist": [
{
"#account_id": "b6909071",
"#distinct_id": "b12831131",
"user_level": 31,
"register_time": "2019-09-23 09:33:31",
"diamond_num": 1250,
"first_recharge_time": "2019-11-18 08:50:33",
"latest_login_time": "2019-11-26 18:15:51",
"channel": "app store",
"#user_id": 2961031
},
{
"#account_id": "a6013000",
"#distinct_id": "a11167000",
"user_level": 31,
"register_time": "2019-09-02 19:15:08",
"diamond_num": 72,
"first_recharge_time": "2019-09-02 19:18:36",
"latest_login_time": "2019-11-24 10:02:38",
"channel": "app store",
"#user_id": 2577000
},
{
"#account_id": "j2614535",
"#distinct_id": "j4855535",
"user_level": 31,
"register_time": "2019-08-24 20:40:19",
"diamond_num": 820,
"latest_login_time": "2019-11-21 14:16:42",
"channel": "app store",
"#user_id": 1120535
}
],
"columMeta": {
"#account_id": "account ID",
"#distinct_id": "visitor ID",
"user_level": "user level",
"register_time": "register time",
"diamond_num": "diamond number",
"first_recharge_time": "first recharge time",
"latest_login_time": "lastest login time",
"channel": "channel"
}
},
"return_code": 0,
"return_message": "success"
}
# Response Parameter Description
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
data | - | Object | Return result |
∟ datalist | - | List | User Information |
∟ columMeta | - | Map | Field meaning mapping |
Error Response Example
{
"return_code": -1008,
"return_message": "The parameter (token) is empty"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1008 | Integer | Return code |
return_message | The parameter (token) is empty | String | Return information |
# User Event List Query
Interface URL
/open/user-event-list?token=xxx
Request method
POST
Content-Type
application/json
Request Query Parameter
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
token | xxx | String | Yes | token |
# Request Body Parameter
{
"eventNames": [
"payment",
"level_up",
"activity_attend",
"draw_card",
"register",
"logout",
"login",
"gold_get",
"gold_consume"
],
"pagerHeader": {
"pageNum": 1,
"pageSize": 2
},
"projectId": 377,
"startDateTime": ["2021-11-04 00:00:00"],
"dateFormat": "week",
"firstDayOfWeek": 1,
"userId": 795687603434164226,
"timeoutSeconds": 10,
"useCache": true
}
# Request Parameter Description
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
eventNames | ["payment"] | List | Yes | List of events included |
pagerHeader | - | Object | Yes | Generic paging request header |
∟ pageNum | 1 | Long | No | Start page |
∟ pageSize | 2 | Long | No | Number per page |
projectId | 377 | Integer | Yes | Project ID |
startDateTime | ["2021-11-04 00:00:00"] | List | No | Start time list yyyy-MM-dd HH: mm: ss |
dateFormat | week | String | Yes | Time dimension unit Press 1 minute Minute 5: Press 5 minutes (v3.5 starts to support) Minute 10: Press 10 minutes (v3.5 start support) By the hour By day Week: by week Month: by month Total: total |
firstDayOfWeek | 1 | Integer | No | First day of the week |
userId | 795687603434164226 | Long | Yes | User ID of the analysis target |
timeoutSeconds | 10 | Integer | No | Request timed out parameter, timeout cancels query task |
useCache | true | Boolean | No | Use cache, optional parameter, default is true |
# Successful Response Example
{
"data": {
"columnDescMeta": {
"network": "network type",
"ip": "IP",
"browser": "browser",
"browser_version": "browser version",
"manufacturer": "manufacturer",
"#lib": "SDK type",
"channel": "source channel",
"platform": "platform",
"serverid": "server ID",
"device_type": "device type",
"#lib_version": "SDK version",
"os_version": "operation version",
"app_version": "app version",
"os": "operation system",
"lib": "library",
"level": "user level",
"model": "model",
"screen_height": "screen height",
"carrier_name": "carrier name",
"vip_level": "VIP level",
"brand": "brand",
"currency_type": "currency type",
"pay_amount": "pay amount",
"diamond_get_amount": "diamond amount",
"payment_name": "payment name",
"is_first_pay": "first payment or not",
"#country_code": "country code",
"#ip": "service IP",
"#city": "city",
"#province": "province",
"#country": "country",
"screen_width": "screen width",
"device_id": "device ID",
"#zone_offset": "zone offset"
},
"eventNameDescMeta": {
"anyEvent": "any event",
"activity_attend": "attend activity",
"draw_card": "draw cards",
"gold_consume": "gold consume",
"gold_get": "get gold",
"level_up": "level up",
"login": "login",
"logout": "logout",
"payment": "payment",
"register": "register"
},
"resultGenerateTime": "2022-01-27 15:46:08",
"userEventSeqList": [
{
"event_name": "login",
"properties": {
"#event_time": "2021-11-04 15:59:39.179",
"network": "WIFI",
"ip": "27.17.30.245",
"browser": "Safari",
"browser_version": "Safari 11.0.3",
"manufacturer": "apple",
"#lib": "easydata",
"channel": "baidu",
"platform": "WeGame platform",
"serverid": "10",
"device_type": "desktop",
"#lib_version": "1.0",
"os_version": "iOS 11.4",
"app_version": "V1.0",
"os": "iOS",
"lib": "JS",
"level": "93",
"model": "iPhone X",
"screen_height": "681",
"carrier_name": "China telecom",
"vip_level": "1",
"brand": "apple",
"#country_code": "",
"#ip": "localhost",
"#city": "unknown",
"#province": "unknown",
"#country": "unknown",
"screen_width": "360",
"device_id": "47BjM",
"#zone_offset": "-5"
},
"time": "2021-11-04 15:59:39.179"
},
{
"event_name": "payment",
"properties": {
"#event_time": "2021-11-04 15:59:46.179",
"network": "WIFI",
"ip": "27.17.30.245",
"browser": "Safari",
"browser_version": "Safari 11.0.3",
"manufacturer": "apple",
"#lib": "easydata",
"channel": "baidu",
"platform": "WeGame platform",
"serverid": "10",
"device_type": "desktop",
"#lib_version": "1.0",
"os_version": "iOS 11.4",
"app_version": "V1.0",
"os": "iOS",
"lib": "JS",
"level": "93",
"model": "iPhone X",
"screen_height": "681",
"carrier_name": "China telecom",
"vip_level": "1",
"brand": "apple",
"currency_type": "coupon",
"pay_amount": "536",
"diamond_get_amount": "7485",
"payment_name": "honor package",
"is_first_pay": false,
"#country_code": "",
"#ip": "localhost",
"#city": "unknown",
"#province": "unknown",
"#country": "unknown",
"screen_width": "360",
"device_id": "47BjM",
"#zone_offset": "-5"
},
"time": "2021-11-04 15:59:46.179"
}
]
},
"return_code": 0,
"return_message": "success"
}
# Response Parameter Description
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | 0 | Integer | Return code |
return_message | success | String | Return information |
data | - | Object | Return result |
∟ columnDescMeta | - | Map | Attribute name mapping |
∟ eventNameDescMeta | - | Map | Event name |
∟ resultGenerateTime | 2022-01-27 15:46:08 | String | Results generation time |
∟ userEventSeqList | - | List | User sequence list |
∟ event_name | login | String | Event name |
∟ properties | - | Map | Event property details |
∟ time | 2021-11-04 15:59:46.179 | String | Time |
Error Response Example
{
"return_code": -1008,
"return_message": "The parameter (token) is empty"
}
Parameter name | Sample value | Parameter type | Parameter description |
---|---|---|---|
return_code | -1008 | Integer | Return code |
return_message | The parameter (token) is empty | String | Return information |