# Interval Analysis Model API
Call method See Call method description in Open API doc.
You can read the interval analysis in the user manual to understand the usage scenario.
# Interval Analysis Query
Interface URL
/open/interval-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": {
"endTime": "2021-10-05 23:59:59",
"filts": [
{
"columnDesc": "brand",
"columnName": "brand",
"comparator": "equal",
"filterType": "SIMPLE",
"ftv": [
"apple",
"Huawei"
],
"specifiedClusterDate": "2022-01-24",
"tableType": "event",
"timeUnit": ""
}
],
"groupBy": [
{
"columnDesc": "brand",
"columnName": "brand",
"propertyRange": "",
"specifiedClusterDate": "2022-01-24",
"tableType": "event"
}
],
"recentDay": "114-115",
"relation": "and",
"startTime": "2021-10-04 00:00:00",
"taIdMeasureVo": {
"columnDesc": "user only ID",
"columnName": "#user_id",
"tableType": "event"
},
"timeParticleSize": "day",
"windowsGapUnit": "hour",
"windowsGapValue": 1
},
"events": [
{
"eventName": "activity_attend",
"eventNameDisplay": "",
"filts": [
],
"relation": "and",
"relationProp": {
"property": {
"columnDesc": "brand",
"columnName": "brand",
"specifiedClusterDate": "2022-01-24",
"tableType": "event"
}
},
"type": "first"
},
{
"eventName": "payment",
"eventNameDisplay": "",
"filts": [
],
"relation": "and",
"relationProp": {
"property": {
"columnDesc": "brand",
"columnName": "brand",
"specifiedClusterDate": "2022-01-24",
"tableType": "event"
},
"relationOperatorValue": 0,
"relationPropNumberOperator": "r_eq"
},
"type": "second"
}
],
"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 |
∟ endTime | 2021-10-05 23:59:59 | String | No | End time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty |
∟ filts | - | List | No | Global filter |
∟ columnDesc | Brand | String | No | Field display name |
∟ columnName | brand | 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 | ["Apple"] | List | No | Property comparison value |
∟ specifiedClusterDate | 2022-01-24 | String | No | Cluster specified date |
∟ tableType | event | String | Yes | Table type, event: transaction table, user: user table |
∟ timeUnit | String | No | Property comparison units, valid for relativeEvent * only: day, hour, minute | |
∟ groupBy | - | List | No | Group attributes, can have zero or more |
∟ columnDesc | Brand | String | No | Field display name |
∟ columnName | brand | String | Yes | Field name |
∟ propertyRange | String | No | Custom attribute interval | |
∟ specifiedClusterDate | 2022-01-24 | String | No | Cluster specified date |
∟ tableType | event | String | Yes | Table type, event: transaction table, user: user table |
∟ recentDay | 114-115 | String | No | Relative time (this item cannot be empty at the same time as the start time and the end time) |
∟ relation | and | String | No | Logical relationship, and: logical and, or: logical or |
∟ startTime | 2021-10-04 00:00:00 | String | No | Start time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty |
∟ taIdMeasureVo | - | Object | No | Analyze subject configuration |
∟ columnDesc | User unique ID | String | No | Field display name |
∟ columnName | #user_id | String | Yes | Field name |
∟ tableType | event | String | Yes | Table type, event: transaction table, user: user table |
∟ timeParticleSize | day | String | Yes | Unit of time for analysis 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 | Integer | No | When timeParticleSize is week, specify the first day of the week, 1: Monday, 2: Tuesday,.., 7: Sunday, minimum 1, maximum 7 | |
∟ windowsGapUnit | hour | String | No | Window duration unit |
∟ windowsGapValue | 1 | Integer | No | Window duration |
events | - | List | Yes | List of event indicators |
∟ eventName | activity_attend | String | Yes | Event type, in particular, you can use anyEvent to represent any event |
∟ eventNameDisplay | String | No | Event display name | |
∟ filts | - | List | No | List of conditions |
∟ relation | and | String | No | Logical relationship, and: logical and, or: logical or |
∟ relationProp | - | Object | No | Associated properties |
∟ property | - | Object | No | Associated properties |
∟ columnDesc | Brand | String | No | Field display name |
∟ columnName | brand | String | No | Field name |
∟ specifiedClusterDate | 2022-01-24 | String | No | Cluster specified date |
∟ tableType | event | String | No | Table type, event: transaction table, user: user table |
∟ relationOperatorValue | 0 | Integer | No | Relational operation value |
∟ relationPropNumberOperator | r_eq | String | No | Relational operator, r_eq: equal r_high:高 r_low:低 |
∟ type | first | String | Yes | Event type, first: initial event, second: return event |
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": {
"distributionInterval": [
",300",
"300,600",
"600,900",
"900,1200",
"1200,1500",
"1500,1800",
"1800,2100",
"2100,2400",
"2400,2700",
"2700,3000",
"3000,3300",
"3300,"
],
"groupCols": [
[
"Apple"
],
[
"Huawei"
]
],
"intervalData": {
"dateEntities": [
{
"dateString": "2021-10-04",
"groupEntities": [
{
"groups": [
"Apple"
],
"intervalAggValue": {
"avgValue": 40,
"eventNum": 6646,
"maxValue": 354,
"midValue": 28,
"minValue": 2,
"quarterValue": 16,
"threeQuarterValue": 49,
"userNum": 838
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 5,
"userNum": 5
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 6641,
"userNum": 838
}
}
]
},
{
"groups": [
"Huawei"
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 5439,
"maxValue": 313,
"midValue": 28,
"minValue": 2,
"quarterValue": 15,
"threeQuarterValue": 50,
"userNum": 683
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 2,
"userNum": 2
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 5437,
"userNum": 683
}
}
]
}
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 12085,
"maxValue": 354,
"midValue": 28,
"minValue": 2,
"quarterValue": 16,
"threeQuarterValue": 49,
"userNum": 1520
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 7,
"userNum": 7
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 12078,
"userNum": 1520
}
}
]
},
{
"dateString": "2021-10-05",
"groupEntities": [
{
"groups": [
"Apple"
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 5700,
"maxValue": 303,
"midValue": 28,
"minValue": 2,
"quarterValue": 16,
"threeQuarterValue": 49,
"userNum": 710
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 1,
"userNum": 1
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 5699,
"userNum": 710
}
}
]
},
{
"groups": [
"Huawei"
],
"intervalAggValue": {
"avgValue": 40,
"eventNum": 4779,
"maxValue": 374,
"midValue": 28,
"minValue": 2,
"quarterValue": 15,
"threeQuarterValue": 51,
"userNum": 603
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 3,
"userNum": 3
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 4776,
"userNum": 603
}
}
]
}
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 10479,
"maxValue": 374,
"midValue": 28,
"minValue": 2,
"quarterValue": 16,
"threeQuarterValue": 50,
"userNum": 1313
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 4,
"userNum": 4
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 10475,
"userNum": 1313
}
}
]
}
],
"groupEntities": [
{
"groups": [
"Apple"
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 12346,
"maxValue": 354,
"midValue": 28,
"minValue": 2,
"quarterValue": 16,
"threeQuarterValue": 49,
"userNum": 1542
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 6,
"userNum": 6
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 12340,
"userNum": 1542
}
}
]
},
{
"groups": [
"Huawei"
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 10218,
"maxValue": 374,
"midValue": 28,
"minValue": 2,
"quarterValue": 15,
"threeQuarterValue": 50,
"userNum": 1282
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 5,
"userNum": 5
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 10213,
"userNum": 1282
}
}
]
}
],
"intervalAggValue": {
"avgValue": 39,
"eventNum": 22564,
"maxValue": 374,
"midValue": 28,
"minValue": 2,
"quarterValue": 16,
"threeQuarterValue": 49,
"userNum": 2817
},
"intervalDistributions": [
{
"distribution": "300,600",
"intervalDistributionValue": {
"eventNum": 11,
"userNum": 11
}
},
{
"distribution": ",300",
"intervalDistributionValue": {
"eventNum": 22553,
"userNum": 2817
}
}
]
},
"intervalType": "def",
"timeArray": [
"2021-10-04",
"2021-10-05"
]
},
"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 |
∟ distributionInterval | [",300","300,"] | List | Distribution interval |
∟ groupCols | [["Apple"], ["Huawei"]] | List | Group |
∟ intervalData | - | Object | Date data |
∟ dateEntities | - | List | Date List |
∟ dateString | 2021-10-04 | String | Date |
∟ groupEntities | - | List | Group List |
∟ groups | ["Apple"] | List | Group value list |
∟ intervalAggValue | - | Object | Aggregate value |
∟ avgValue | 39 | Long | Average |
∟ eventNum | 22564 | Long | Number of events |
∟ maxValue | 374 | Long | Maximum |
∟ midValue | 28 | Long | Median |
∟ minValue | 2 | Long | Minimum |
∟ quarterValue | 16 | Long | Upper quartile |
∟ threeQuarterValue | 49 | Long | Lower quartile |
∟ userNum | 2817 | Long | Number of users |
∟ intervalDistributions | - | List | List of distribution intervals |
∟ distribution | 300,600 | String | Distribution interval |
∟ intervalDistributionValue | - | Object | Distribution interval value |
∟ eventNum | 11 | Long | Number of events |
∟ userNum | 11 | Long | Number of users |
∟ intervalType | def | String | Type Discrete number Def: default interval user_defined: User-defined |
∟ timeArray | ["2021-10-04"] | List | Event list |
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 |
# Interval Analysis User List
Interface URL
/open/interval-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
{
"eventView": {
"endTime": "2021-10-05 23:59:59",
"filts": [
{
"columnDesc": "brand",
"columnName": "brand",
"comparator": "equal",
"filterType": "SIMPLE",
"ftv": [
"Apple",
"Huawei"
],
"specifiedClusterDate": "2022-01-24",
"tableType": "event",
"timeUnit": ""
}
],
"groupBy": [
{
"columnDesc": "brand",
"columnName": "brand",
"propertyRange": "",
"specifiedClusterDate": "2022-01-24",
"tableType": "event"
}
],
"recentDay": "114-115",
"relation": "and",
"startTime": "2021-10-04 00:00:00",
"taIdMeasureVo": {
"columnDesc": "user only ID"
"columnName": "#user_id",
"tableType": "event"
},
"timeParticleSize": "day",
"windowsGapUnit": "hour",
"windowsGapValue": 1
},
"events": [
{
"eventName": "activity_attend",
"eventNameDisplay": "",
"filts": [
],
"relation": "and",
"relationProp": {
"property": {
"columnDesc": "brand",
"columnName": "brand",
"specifiedClusterDate": "2022-01-24",
"tableType": "event"
}
},
"type": "first"
},
{
"eventName": "payment",
"eventNameDisplay": "",
"filts": [
],
"relation": "and",
"relationProp": {
"property": {
"columnDesc": "brand",
"columnName": "brand",
"specifiedClusterDate": "2022-01-24",
"tableType": "event"
},
"relationOperatorValue": 0,
"relationPropNumberOperator": "r_eq"
},
"type": "second"
}
],
"projectId": 377,
"timeoutSeconds": 10,
"interval": "2,3",
"sliceDate": "",
"sliceGroupVal": ["Apple", "Huawei"]
}
# Request Parameter Description
Parameter name | Sample value | Parameter type | Is required | Parameter description |
---|---|---|---|---|
eventView | - | Object | Yes | Grouping properties |
∟ endTime | 2021-10-05 23:59:59 | String | No | End time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty |
∟ filts | - | List | No | Global filter |
∟ columnDesc | Brand | String | No | Field display name |
∟ columnName | brand | 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 | ["Apple"] | List | No | Property comparison value |
∟ specifiedClusterDate | 2022-01-24 | String | No | Cluster specified date |
∟ tableType | event | String | Yes | Table type, event: transaction table, user: user table |
∟ timeUnit | String | No | Property comparison units, valid for relativeEvent * only: day, hour, minute | |
∟ groupBy | - | List | No | Group attributes, can have zero or more |
∟ columnDesc | Brand | String | No | Field display name |
∟ columnName | brand | String | Yes | Field name |
∟ propertyRange | String | No | Custom attribute interval | |
∟ specifiedClusterDate | 2022-01-24 | String | No | Cluster specified date |
∟ tableType | event | String | Yes | Table type, event: transaction table, user: user table |
∟ recentDay | 114-115 | String | No | Relative time (this item cannot be empty at the same time as the start time and the end time) |
∟ relation | and | String | No | Logical relationship, and: logical and, or: logical or |
∟ startTime | 2021-10-04 00:00:00 | String | No | Start time (format: yyyy-MM-dd HH: mm: ss), valid when the relative time is empty |
∟ taIdMeasureVo | - | Object | No | Analyze subject configuration |
∟ columnDesc | User unique ID | String | No | Field display name |
∟ columnName | #user_id | String | Yes | Field name |
∟ tableType | event | String | Yes | Table type, event: transaction table, user: user table |
∟ timeParticleSize | day | String | Yes | Unit of time for analysis 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 | Integer | No | When timeParticleSize is week, specify the first day of the week, 1: Monday, 2: Tuesday,.., 7: Sunday, minimum 1, maximum 7 | |
∟ windowsGapUnit | hour | String | No | Window duration unit |
∟ windowsGapValue | 1 | Integer | No | Window duration |
events | - | List | Yes | List of event indicators |
∟ eventName | activity_attend | String | Yes | Event type, in particular, you can use anyEvent to represent any event |
∟ eventNameDisplay | String | No | Event display name | |
∟ filts | - | List | No | List of conditions |
∟ relation | and | String | No | Logical relationship, and: logical and, or: logical or |
∟ relationProp | - | Object | No | Associated properties |
∟ property | - | Object | No | Associated properties |
∟ columnDesc | Brand | String | No | Field display name |
∟ columnName | brand | String | No | Field name |
∟ specifiedClusterDate | 2022-01-24 | String | No | Cluster specified date |
∟ tableType | event | String | No | Table type, event: transaction table, user: user table |
∟ relationOperatorValue | 0 | Integer | No | Relational operation value |
∟ relationPropNumberOperator | r_eq | String | No | Relational operator, r_eq: equal r_high:高 r_low:低 |
∟ type | first | String | Yes | Event type, first: initial event, second: return event |
projectId | 377 | Integer | Yes | Project ID |
timeoutSeconds | 10 | Integer | No | Request timed out parameter, timeout cancels query task |
interval | 2,3 | String | No | Interval |
sliceDate | String | No | Date in current week | |
sliceGroupVal | ["Apple", "Huawei"] | List | No | Event location grouping |
# Successful Response Example
{
"data": {
"columMeta": {
"country": "country",
"education": "education",
"birthdate": "birthdate",
"gender": "gender",
"last_login_time": "last_login_time",
"city": "city",
"nation": "nation",
"channel": "channel",
"weight": "weight(KG)",
"#distinct_id": "visitor ID",
"firstcharge": "firstcharge",
"register_time": "register_time",
"#account_id": "account ID",
"companynature": "companynature",
"accountbalance": "accountbalance",
"maritalstatus": "maritalstatus",
"interest": "interest",
"name": "name",
"accountpoint": "accountpoint",
"rank": "rank",
"first_login_time": "first_login_time",
"email": "email",
"height": "height(CM)"
},
"datalist": [
{
"country": "China",
"birthdate": "2013-05-21",
"education": "college"
"last_login_time": "2021-12-04 02:18:46.111",
"gender": "male",
"city": "Shanghai",
"nation": "Han",
"#user_id": 795692987887919100,
"channel": "Wechat",
"weight": "125",
"#distinct_id": "5694fdd8-e1dc-4459-97dd-33b10df01400",
"firstcharge": false,
"register_time": "2021-10-06 00:00:23.000",
"#account_id": "b406f8a7-424d-4909-a08a-7b00191b7493",
"companynature": "state-own company",
"accountbalance": "42606",
"maritalstatus": "single",
"interest": [
"travel",
"sport",
"sport"
],
"accountpoint": "81910",
"name": "UaLEhzdn",
"rank": "gold",
"first_login_time": "2021-10-06 00:01:56.000",
"email": "ElqqXwdL@thinkingdata.cn",
"height": "174"
},
{
"country": "China",
"birthdate": "1964-12-26",
"education": "college",
"last_login_time": "2021-10-05 00:02:35.000",
"gender": "male",
"city": "Shanghai",
"nation": "Han",
"#user_id": 795692395992715300,
"channel": "offcial site",
"weight": "197",
"#distinct_id": "5caf9f1a-3253-4279-9723-49c950a48020",
"firstcharge": true,
"register_time": "2021-10-05 00:00:30.000",
"#account_id": "cb6ab625-f45d-4977-bbae-973ead82acba",
"companynature": "Foreign enterprise",
"accountbalance": "49013",
"maritalstatus": "single",
"interest": [
"sport",
"sing",
"sport"
]
],
"totalNum": 2
},
"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 |
∟ totalNum | 2 | Integer | Total |
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 |