# フロー分析モデルAPI
# Flow Analysis Model API
As for the call method, please refer to the call method description in Open API
You can read the Flow analysis in the user manual to understand the usage scenario.
# Flow Analysis Query
Interface URL
/open/Flow-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": {
"col_limit": 10,
"from_date": "2021-10-01 00:00:00",
"recent_day": "",
"session_interval": 30,
"session_type": "minute",
"to_date": "2021-10-02 23:59:59"
},
"events": {
"by_fields": [
{
"event_name": "login",
"field": "browser",
"range": "",
"table_type": "event"
}],
"event_names": [
"logout",
"login"],
"source_event": {
"event_name": "login",
"filter": {
"filterType": "COMPOUND"
}
},
"source_type": "initial_event",
"user_filter": {
"filterType": "COMPOUND",
"filts": [
{
"columnDesc": "city",
"columnName": "city",
"comparator": "equal",
"filterType": "SIMPLE",
"ftv": [
"Beijing",
"Shanghai",
"Guangzhou",
"Shenzhen"],
"specifiedClusterDate": "2022-01-24",
"tableType": "user"
}],
"relation": "and"
}
},
"projectId": 377,
"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.col_limit | 10 | Integer | Yes | Column limit, between 0 and 20 |
eventView.from_date | 2021-10-01 00:00:00 | String | No | Start time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty |
eventView.recent_day | String | No | Relative time (this item cannot be empty at the same time as the start time and the end time) | |
eventView.session_interval | 30 | Integer | Yes | Session interval length |
eventView.session_type | minute | String | Yes | Session duration units: seconds, minutes, hours |
eventView.to_date | 2021-10-02 23:59:59 | String | No | End time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty |
events | - | List | Yes | Event metric list |
events.by_fields | - | List | List | Split by event properties |
events.by_fields.event_name | login | String | Yes | Event name |
events.by_fields.field | browser | String | Yes | Split field |
events.by_fields.range_type | - | String | No |
Interval range type
|
events.by_fields.range | - | String | No | Interval range |
events.by_fields.table_type | event | String | Yes | Table type enumeration |
events.event_names | ["logout","login"] | String | Yes | The eventNames the metric based on |
events.source_event | - | Object | Yes | Source event |
events.source_event.event_name | login | String | Yes | Event name |
events.source_event.filter | - | Object | No | Source event filtering |
events.source_event.filter.filterType | COMPOUND | String | No | Filter mode, SIMPLE: simple, COMPOUND: composite |
events.source_type | initial_event | String | Yes | Event type, initial_event/termination_event |
events.user_filter | - | Object | No | User table filtering |
events.user_filter.filterType | COMPOUND | String | No | Filter mode, SIMPLE: simple, COMPOUND: composite |
events.user_filter.filts | - | List | No | List of conditions |
events.user_filter.filts.columnDesc | app_version | String | No | Field display name |
events.user_filter.filts.columnName | app_version | String | Yes | Field name |
events.user_filter.filts.comparator | equal | String | Yes | Reference: filtering expression of model query API |
events.user_filter.filts.filterType | SIMPLE | String | No | Filter mode, SIMPLE: simple, COMPOUND: composite |
events.user_filter.filts.ftv | ["V1.0"] | List | No | Property comparative with bound literial |
events.user_filter.filts.specifiedClusterDate | 2022-01-26 | String | No | Historical tag version of specified date |
events.user_filter.filts.tableType | event | String | Yes | Table type enumeration |
events.user_filter.relation | and | String | No | Logical relationship, and: logical and, or: logical or |
projectId | 377 | Integer | Yes | Project enumeric identity |
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": {
"event_name_desc_map": {
"anyEvent": "any event",
"login": "login",
"logout": "logout"
},
"links": [
[
{
"source": "0_Chrome^_^login",
"target": "1_logout",
"times": 1716
},
{
"source": "0_Safari^_^login",
"target": "1_logout",
"times": 765
},
{
"source": "0_Firefox^_^login",
"target": "1_logout",
"times": 582
},
{
"source": "0_Wechat built-in browser^_^login",
"target": "1_logout",
"times": 403
},
{
"is_wastage": true,
"source": "0_Chrome^_^login",
"target": "1_wastage",
"times": 380
},
{
"is_wastage": true,
"source": "0_Safari^_^login",
"target": "1_wastage",
"times": 195
},
{
"is_wastage": true,
"source": "0_Firefox^_^login",
"target": "1_wastage",
"times": 148
},
{
"is_wastage": true,
"source": "0_Wechat built-in browser^_^login",
"target": "1_wastage",
"times": 89
}
]
],
"nodes": [
[
{
"by_value": "Chrome",
"event_name": "login",
"id": "0_Chrome^_^login",
"times": 2096
},
{
"by_value": "Safari",
"event_name": "login",
"id": "0_Safari^_^login",
"times": 960
},
{
"by_value": "Firefox",
"event_name": "login",
"id": "0_Firefox^_^login",
"times": 730
},
{
"by_value": "Wechat built-in browser",
"event_name": "login",
"id": "0_Wechat built-in browser^_^login",
"times": 492
}
],
[
{
"event_name": "logout",
"id": "1_logout",
"times": 3466
}
]
],
"result_generate_time": "2022-01-27 13:44:38"
},
"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 data |
data.event_name_desc_map | - | Map | Event name and event description mapping |
data.links | - |
List | Relational matrix |
data.links.source | 0_Chrome^_^login | String | Relationship start node |
data.links.target | 1_level_up | String | Relationship end node |
data.links.times | 5106 | Integer | Number of times |
data.nodes | - |
List | Node matrix |
data.nodes.id | 0_Chrome^_^login | String | Node ID |
data.nodes.event_name | login | String | Node event name |
data.nodes.by_value | Chrome | String | Node value |
data.nodes.times | 30301 | Integer | Number of times |
data.result_generate_time | 2022-01-24 18:53:26 | String | Query result generation 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 |
# Flow Analysis User List
Interface URL
/open/Flow-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 |
# Request Body Parameter
{
"projectId": 0,
"eventView": {
"col_limit": 10,
"from_date": "2019-11-20 00:00:00",
"to_date": "2019-11-26 00:00:00",
"recent_day": "1-7",
"session_interval": 22,
"session_type": "minute"
},
"events": {
"event_names": [
"obtain_item",
"consume_item",
"obtain_coin"
],
"source_event": {
"event_name": "consume_item",
"filter": {
"filts": [
{
"columnName": "#os",
"comparator": "equal",
"ftv": [
"ios"
],
"tableType": "event"
}
],
"relation": "and"
}
},
"source_type": "initial_event",
"user_filter": {
"filts": [
{
"columnName": "user_level",
"comparator": "equal",
"ftv": [
"6"
],
"tableType": "user"
}
],
"relation": "and"
}
},
"next_slice_event_by_values": [
{
"slice_event_name": "obtain_coin"
}
],
"session_level": 2,
"slice_type": "with_next_specific",
"slice_event_by_values": [
{
"slice_event_name": "obtain_item"
}
],
"timeoutSeconds": 10
}
# Request Parameter Description
$$Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
projectId | 0 | String | Yes | Parameter description |
eventView | - | Object | Yes | Same parameters as Distribution Analysis Query interface |
events | List | Yes | Same parameters as Distribution Analysis Query interface | |
next_slice_event_by_values | - | List | No | Subsequent events of nodes, required When slice_type is with_next_specific |
next_slice_event_by_values.slice_event_name | obtain_coin | String | No | Event type |
session_level | 2 | Integer | Yes | The Flow level at which the node is located (counting from 0) |
slice_type | with_next_specific | String | Yes |
Subsequent events of nodes
|
slice_event_by_values | - | List | No | Node events |
slice_event_by_values.slice_event_name | obtain_item | String | No | Event type |
timeoutSeconds | 10 | Integer | No | Request timed out parameter, timeout cancels query task |
# Successful Response Example
{
"data": {
"datalist": [
{
"#account_id": "j77444535",
"#distinct_id": "j143825535",
"user_level": 6,
"register_time": "2019-11-22 17:07:12",
"diamond_num": 1270,
"latest_login_time": "2019-11-22 18:23:19",
"channel": "app store",
"#user_id": 33190535
}
],
"total_num": 1,
"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 |