Skip to main content

Interval Analysis model API

Last updated 10/05/2026

For how to call the API, see the calling method described in the Open API document.

See Interval Analysis in the user guide to learn about use cases.

1. Interval Analysis query​

Endpoint URL

/open/interval-analyze?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"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 unique 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,
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
eventView-ObjectYesCommon properties of the metrics
eventView.endTime2021-10-05 23:59:59StringNoEnd time (format: yyyy-MM-dd HH:mm:ss). Takes effect when the relative time is empty
eventView.filts-ListNoGlobal filters
eventView.filts.columnDescBrandStringNoField display name
eventView.filts.columnNamebrandStringYesField name
eventView.filts.comparatorequalStringYesSee Filter expressions in the Query API
eventView.filts.filterTypeSIMPLEStringNoFilter mode. SIMPLE: simple, COMPOUND: compound
eventView.filts.ftv["Apple"]ListNoLiteral constants used as boundaries for property comparison
eventView.filts.specifiedClusterDate2022-01-24StringNoUses the historical version of the tag for the specified date
eventView.filts.tableTypeeventStringYesTable type enum values
eventView.filts.timeUnitStringNoUnit of the property comparison value, valid only for relativeEvent*: day, hour, minute
eventView.groupBy-ListNoGroup-by properties. There can be zero or more
eventView.groupBy.columnDescBrandStringNoField display name
eventView.groupBy.columnNamebrandStringYesField name
eventView.groupBy.propertyRangeStringNoCustom property range
eventView.groupBy.specifiedClusterDate2022-01-24StringNoUses the historical version of the tag for the specified date
eventView.groupBy.tableTypeeventStringYesTable type enum values
eventView.recentDay114-115StringNoRelative time (this item, the start time, and the end time can't all be empty)
eventView.relationandStringNoLogical relation. and: logical AND, or: logical OR
eventView.startTime2021-10-04 00:00:00StringNoStart time (format: yyyy-MM-dd HH:mm:ss). Takes effect when the relative time is empty
eventView.taIdMeasureVo-ObjectNoAnalysis entity configuration
eventView.taIdMeasureVo.columnDescUser Unique IDStringNoField display name
eventView.taIdMeasureVo.columnName#user_idStringYesField name
eventView.taIdMeasureVo.tableTypeeventStringYesTable type enum values
eventView.timeParticleSizeday

String

Yes

The time unit of the analysis

  • minute: by minute
  • hour: by hour
  • day: by day
  • week: by week
  • month: by month
  • total: total
eventView.firstDayOfWeekIntegerNoWhen timeParticleSize is week, specifies the first day of the week. 1: Monday, 2: Tuesday, .., 7: Sunday. Minimum 1, maximum 7
eventView.windowsGapUnithourStringNoWindow duration unit
eventView.windowsGapValue1IntegerNoWindow length
events-ListYesList of event metrics
events.eventNameactivity_attendStringYesEvent name. In particular, you can use anyEvent to represent any event
events.eventNameDisplayStringNoEvent display name
events.filts-ListNoList of conditions
events.relationandStringNoLogical relation. and: logical AND, or: logical OR
events.relationProp-ObjectNoAssociated property
events.relationProp.property-ObjectNoAssociated property
events.relationProp.property.columnDescBrandStringNoField display name
events.relationProp.property.columnNamebrandStringNoField name
events.relationProp.property.specifiedClusterDate2022-01-24StringNoUses the historical version of the tag for the specified date
events.relationProp.property.tableTypeeventStringNoTable type enum values
events.relationProp.relationOperatorValue0IntegerNoRelational operation value
events.relationProp.relationPropNumberOperatorr_eqStringNo

Relational operator:

  • r_eq: equal
  • r_high: higher
  • r_low: lower
events.typefirstStringYesEvent type. first: starting event, second: ending event
projectId377IntegerYesProject ID
limit10IntegerNoMaximum number of groups per analysis object. Optional. Defaults to 1000, with a maximum of 10000
timeoutSeconds10IntegerNoRequest timeout. The query task is canceled when it times out
useCachetrueBooleanYestrue means the cache is used
zoneOffset10IntegerNoTime zone

Success 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 parameters​

$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectReturned result
data.distributionInterval[",300","300,"]ListDistribution intervals
data.groupCols[["Apple"],["Huawei"]]List<List>Group
data.intervalData-ObjectDate data
data.intervalData.dateEntities-ListDate list
data.intervalData.dateEntities.dateString2021-10-04StringDate
data.intervalData.groupEntities-ListGroup list
data.intervalData.groupEntities.groups["Apple"]ListGroup value list
data.intervalData.intervalAggValue-ObjectAggregate values
data.intervalData.intervalAggValue.avgValue39LongAverage
data.intervalData.intervalAggValue.eventNum22564LongNumber of events
data.intervalData.intervalAggValue.maxValue374LongMaximum
data.intervalData.intervalAggValue.midValue28LongMedian
data.intervalData.intervalAggValue.minValue2LongMinimum
data.intervalData.intervalAggValue.quarterValue16LongUpper quartile
data.intervalData.intervalAggValue.threeQuarterValue49LongLower quartile
data.intervalData.intervalAggValue.userNum2817LongNumber of users
data.intervalData.intervalDistributions-ListDistribution range list
data.intervalData.intervalDistributions.distribution300,600StringDistribution range
data.intervalData.intervalDistributions.intervalDistributionValue-ObjectDistribution range values
data.intervalData.intervalDistributions.intervalDistributionValue.eventNum11LongNumber of events
data.intervalData.intervalDistributions.intervalDistributionValue.userNum11LongNumber of users

data.intervalType

defString

Type

  • discrete: discrete numbers
  • def: default ranges
  • user_defined: user-defined
data.timeArray["2021-10-04"]ListEvent list

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

2. Interval Analysis full download​

Endpoint URL

/open/streaming-download/interval-analyze?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"eventView": {
"endTime": "2022-03-07 17:17:04",
"filts": [],
"groupBy": [],
"recentDay": "1-7",
"relation": "and",
"startTime": "2022-03-01 17:17:04",
"taIdMeasureVo": {
"columnDesc": "User ID",
"columnName": "#user_id",
"tableType": "event"
},
"timeParticleSize": "day",
"windowsGapUnit": "hour",
"windowsGapValue": 1
},
"events": [{
"eventName": "Login",
"eventNameDisplay": "",
"filts": [],
"relation": "and",
"type": "first"
}, {
"eventName": "Recharge",
"eventNameDisplay": "",
"filts": [],
"relation": "and",
"type": "second"
}],
"projectId": 319,
"format": "AGG_TABLE",
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
eventView-ObjectYesCommon properties of the metrics. The parameters are the same as those of the Interval Analysis query API
events-ListYesList of event metrics
projectId377IntegerYesProject ID
formatAGG_TABLEStringYes

AGG_TABLE box plot converted to a table

DISTRIBUTION_TABLE distribution converted to a table

interval[1]arrayNoAll ranges
zoneOffset10IntegerNoTime zone

Response​

Same as the full download of Interval Analysis in the AE system

3. Interval Analysis user list​

Endpoint URL

/open/interval-user-list?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"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 unique 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"],
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
eventView-ObjectYesThe parameters are the same as those of the Interval Analysis query API
events-ListYesThe parameters are the same as those of the Interval Analysis query API
projectId377IntegerYesProject ID
timeoutSeconds10IntegerNoRequest timeout. The query task is canceled when it times out
interval2,3StringNoRange to drill down into
sliceDate2021-10-21StringNoDate to drill down into
sliceGroupVal["Apple", "Huawei"]ListNoGroup to drill down into
zoneOffset10IntegerNoTime zone

Success response example​

{
"data": {
"columMeta": {
"country": "Country",
"education": "Education",
"birthdate": "Date of birth",
"gender": "Gender",
"last_login_time": "last_login_time",
"city": "City",
"nation": "Ethnicity",
"channel": "User operation type",
"weight": "Weight (KG)",
"#distinct_id": "Distinct ID",
"firstcharge": "First top-up",
"register_time": "register_time",
"#account_id": "Account ID",
"companynature": "Employer type",
"accountbalance": "Balance",
"maritalstatus": "Marital status",
"interest": "Interests",
"name": "Name",
"accountpoint": "Points",
"rank": "Membership level",
"first_login_time": "first_login_time",
"email": "Email",
"height": "Height (CM)"
},
"datalist": [
{
"country": "China",
"birthdate": "2013-05-21",
"education": "Associate degree",
"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-owned enterprise",
"accountbalance": "42606",
"maritalstatus": "Single",
"interest": [
"Travel",
"Sports",
"Sports"
],
"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": "Associate degree",
"last_login_time": "2021-10-05 00:02:35.000",
"gender": "Male",
"city": "Shanghai",
"nation": "Han",
"#user_id": 795692395992715300,
"channel": "Official website",
"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-owned",
"accountbalance": "49013",
"maritalstatus": "Single",
"interest": [
"Sports",
"Singing",
"Sports"
]
}
],
"totalNum": 2
},
"return_code": 0,
"return_message": "success"
}

Response parameters​

$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectReturned result
data.datalist-List<Map>User information
data.columMeta-MapMapping of field meanings
data.totalNum2IntegerTotal count

Error response example

{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
Parameter nameExample valueParameter typeDescription
return_code-1008IntegerReturn code
return_messageParameter (token) is emptyStringReturn message

4. Interval Analysis user list download​

Endpoint URL

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

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters​

{
"eventView": {
"endTime": "2022-03-07 17:17:04",
"filts": [],
"groupBy": [],
"recentDay": "1-7",
"relation": "and",
"startTime": "2022-03-01 17:17:04",
"taIdMeasureVo": {
"columnDesc": "User ID",
"columnName": "#user_id",
"tableType": "event"
},
"timeParticleSize": "day",
"windowsGapUnit": "hour",
"windowsGapValue": 1
},
"events": [
{
"eventName": "Login",
"eventNameDisplay": "",
"filts": [],
"relation": "and",
"type": "first"
},
{
"eventName": "Recharge",
"eventNameDisplay": "",
"filts": [],
"relation": "and",
"type": "second"
}
],
"projectId": 319,
"sliceGroupVal": null,
"sliceDate": "2022-03-01",
"selectedColumns": [
"#account_id",
"#distinct_id",
"accountid"
],
"zoneOffset": 10
}

Request parameters​

$$Parameter nameExample valueParameter typeRequiredDescription
eventView-ObjectYesThe parameters are the same as those of the Interval Analysis query API
events-ListYesThe parameters are the same as those of the Interval Analysis query API
projectId377IntegerYesProject ID
selectedColumns["#account_id"]arrayYesItems to download
interval2,3StringRange to drill down into
sliceDate2021-10-21StringNoDate to drill down into
sliceGroupVal["Apple", "Huawei"]ListNoGroup to drill down into
zoneOffset10IntegerNoTime zone

Response​

Same as the user list download of Interval Analysis in the AE system

Was this page helpful?