menu
Is this helpful?

# ユーザープロパティ分析API

# User Feature Analysis API

As for the call method, please refer to the call method description in Open API

You can read the Composition 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 Metrics common attribute part
eventView.userCrowds - Object No Crowd
eventView.userCrowds.crowdName Female String Yes Crowd name
eventView.userCrowds.filts - List Yes Filter objects
eventView.userCrowds.filts.columnDesc Gender String No Field display name
eventView.userCrowds.filts.columnName gender String Yes Field name
eventView.userCrowds.filts.comparator equal String Yes Reference: filtering expression of model query API
eventView.userCrowds.filts.filterType SIMPLE String No Filter mode, SIMPLE: simple, COMPOUND: composite
eventView.userCrowds.filts.ftv ["Female"] List No Property comparative with bound literial
eventView.userCrowds.filts.specifiedClusterDate 2022-01-27 String No Historical tag version of specified date
eventView.userCrowds.filts.tableType user String Yes Table type enumeration
eventView.userCrowds.filts.timeUnit String No Filter time unit
eventView.userCrowds.relation and String Yes Logical relationship, and: logical and, or: logical or
events - List Yes Event metric list
events.analysis SUM String Yes Analysis aspect for user feature aggregation for Aggregate type enumeration for user feature analysis
events.analysisDesc Sum String No Analysis aspect description
events.eventNameDisplay Total balance String No Self-defined metric display name
events.filts - List No List of conditions
events.filts.columnDesc Balance String No Field display name
events.filts.columnName accountbalance String Yes Field name
events.filts.comparator greater String Yes Reference: filtering expression of model query API
events.filts.filterType SIMPLE String No Filter mode, SIMPLE: simple, COMPOUND: composite
events.filts.ftv ["1"] List No Property comparative with bound literial
events.filts.specifiedClusterDate 2022-01-27 String No Historical tag version of specified date
events.filts.tableType user String Yes Table type enumeration
events.filts.timeUnit String No Filter time unit
events.quota accountbalance String No Metric property (combined with analysis, indicating the property involved and the analysis perspective)
events.relation and String No Logical relationship, and: logical and, or: logical or
events.tableType user String Yes Table type enumeration
projectId 377 Integer Yes Project enumeric identity
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 message
data - Object Return result
data.data_list - List Data List
data.data_list.group_cols ["Female"] List Group or crowd list
data.data_list.values 1140523491 Integer Number of users
data.group_cols_sorted ["Female"] List Full group or crowd order list
data.group_num 0 Integer Number of groupings
data.result_generate_time 2022-01-27 15:01:51 String Results generation time
data.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 message

# User feature Analysis Full Data Download

Interface URL

/open/streaming-download/user-prop-analyze?token=xxx

Request method

POST

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Mandatory or not Parameter description
token xxx String Yes Query key

# 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": 390
}

# Request Parameter Description

$$ Parameter name Sample value Parameter type Mandatory or not Parameter description
eventView - Object Yes Same parameters as User feature Analysis Query interface
events - List Yes Same parameters as User feature Analysis Query interface
projectId 377 Integer Yes Project numeric identity

# Response

Same with the full data download of the User feature analysis of the TE system

# 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 numeric identity
events - List Yes Same parameters as User feature Analysis Query interface
eventView - Object Yes Same parameters as User feature Analysis Query interface
sliceGroupVal ["31","app store"] List No Go to detail by which group
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 message
data - Object Return result
data.datalist - List User Information
data.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 message

# Download of User feature Analysis User List

Interface URL

/open/streaming-download/user-prop-user-list?token=xxx

Request method

POST

Content-Type

application/json

Request Query parameters

Parameter name Sample value Parameter type Mandatory or not Parameter description
token xxx String Yes Query key

# Request Body Parameters

{
        
    "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"
      ],
    "projectId": 319,
    "eventIndex": 0,
    "selectedColumns": ["#account_id", "#distinct_id", "accountid"]
}

# Request Parameter Description

$$参数名 示例值 参数类型 是否必填 参数描述
projectId 0 Integer Yes Project enumeric identity
events - List Yes Same parameters as User feature Analysis Query interface
eventView - Object Yes Same parameters as User feature Analysis Query interface
sliceGroupVal ["31","app store"] List No Go to detail by which group
eventIndex 0 Integer Yes Index of crowd, starting from 0
selectedColumns ["#account_id"] array Yes The columns to be downloaded

# Response

Same with the download of the user feature analysis user list of the TE system.

# 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
pagerHeader.pageNum 1 Long No Start page
pagerHeader.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 Unit of the time period taken for analysis
  • day: based on days

  • week: based on weeks

  • month: based on months

  • 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 message
data - Object Return result
data.columnDescMeta - Map Attribute name mapping
data.eventNameDescMeta - Map Event name
data.resultGenerateTime 2022-01-27 15:46:08 String Results generation time
data.userEventSeqList - List User sequence list
data.userEventSeqList.event_name login String Event name
data.userEventSeqList.properties - Map Event property details
data.userEventSeqList.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

# Generic enumeration for user feature analysis

# Aggregate type enumeration for user feature analysis

Value Description Whether properties are required
TRIG_USER_NUM Number of users triggered No
SUM Sum of values Yes
AVG Numerical average Yes
MAX Maximum value Yes
MIN Numerical minimum Yes
DISTINCT Deduplicate number Yes
TRUE True number Yes
FALSE False number Yes
IS_NOT_EMPTY Not an empty number Yes
IS_EMPTY Null number Yes
ARRAY_DISTINCT List overall deduplicate number Yes
ARRAY_SET_DISTINCT Element collection deduplicate number Yes
ARRAY_ITEM_DISTINCT List element deduplicate number Yes
MEDIAN Median Yes
PERCENTILE Percepentiles Yes