Skip to main content

Cohort and tag API

Last updated 10/05/2026

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

1. Add a behavioral cohort or tag​

Endpoint URL

/open/user-cluster-add?token=xxx

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

The following examples show the request body for different cases

1. Add a behavioral cohort

Request body parameters

{
"projectId": 102,
"clusterName": "recent_7_days_consume",
"clusterCatalog": "catalog_cluster",
"clusterType": "cluster_by_static_condition",
"displayName": "recent_7_days_consume",
"qp": {
"events": [
{
"comparator": "greater",
"eventName": "consume_item",
"num": "4",
"recentDay": "1-7",
"taPropQuota": {
"analysis": "TIMES"
}
}
],
"event_relation": "and",
"filts": [
{
"columnName": "user_level",
"comparator": "equal",
"ftv": [
"3"
],
"tableType": "user"
}
],
"relation": "and",
"event_user_relation": "and"
}
}
$$Parameter name

Example value

Parameter typeRequiredDescription
projectId102StringYesProject ID
clusterNamerecent_7_days_consumeStringYesCohort name (letters and digits only, up to 24 characters)
clusterCatalogcatalog_clusterStringNo

Cohort category

  • catalog_cluster: cohort
  • catalog_tag: tag

clusterType

cluster_by_static_condition

String

No

Cohort type

  • cluster_by_dynamic_condition: dynamically updated behavioral cohort
  • cluster_by_static_condition: static behavioral cohort
  • cluster_by_result: result cohort
  • cluster_by_import: custom uploaded ID cohort
  • cluster_by_dynamic_sql: dynamic SQL cohort
  • cluster_by_static_sql: static SQL cohort
  • tag_by_dynamic_condition: dynamically updated behavioral tag
  • tag_by_static_condition: static behavioral tag
  • tag_by_import: custom uploaded ID tag
  • tag_by_dynamic_sql: dynamic SQL tag
  • tag_by_static_sql: static SQL tag
displayNamerecent_7_days_consumeStringYesCohort display name (up to 50 characters)
qp-ObjectNoCohort definition
qp.events-ListNoList of event conditions
qp.events.comparatorgreaterStringYesSee the operator descriptions in Filter expressions of the Query API
qp.events.eventNameconsume_itemStringYesEvent name
qp.events.num4StringNoFilter value
qp.events.recentDay1-7StringNoRelative time
qp.events.taPropQuota-ObjectYesEvent metric
qp.events.taPropQuota.analysisTIMESStringNoAnalysis type. See the list of analysis values for aggregation methods in the Events Analysis model API
qp.event_relationandStringNoLogical relationship between event conditions (and, or)
qp.filts-ListNoList of user property conditions
qp.filts.columnNameuser_levelStringYesField name
qp.filts.comparatorequalStringSee the operator descriptions in Filter expressions of the Query API
qp.filts.ftv["3"]ListNoList of filter values
qp.filts.tableTypeuserStringYesuser: user property
qp.relationandStringNoLogical relationship between user property conditions
qp.event_user_relationandStringNoLogical relationship between the event condition list and the user property condition list

Add a behavioral tag

subConditionTabType field description:

FieldDescription
tag_condition_defaultBehavioral tag
tag_condition_by_firstlast_eventFirst or last tag
tag_condition_by_quotationMetric tags

The tagQp field contains the tag definition. Different types of tags use different fields:

FieldDescription
userTagValueDefsBehavioral tag
userTagConFirstLastEventDefFirst or last tag

2. Behavioral tag

userTagValueDefs field description:

FieldDescription
tagValueTag value
userClusterDefTag value matching definition. For the field definitions, see UserClusterDef
  • Request body (application/json)
{
"projectId": 102,
"clusterName": "tag_20200615_1",
"clusterCatalog": "catalog_tag",
"clusterType": "tag_by_static_condition",
"subConditionTabType" : "tag_condition_default",
"displayName": "Tag_20200615_1",
"tagQp": {
"userTagValueDefs": [
{
"tagRemark": "",
"tagValue": "Tag value 1",
"userClusterDef": {
"event_relation": "and",
"event_user_relation": "and",
"events": [
{
"eventName": "player_register",
"num": "4",
"recentDay": "1-30",
"relation": "and",
"taPropQuota": {
"analysis": "TIMES"
},
"comparator": "greater"
}
],
"filts": [],
"relation": "and"
}
},
{
"tagRemark": "",
"tagValue": "Tag value 2",
"userClusterDef": {
"event_relation": "and",
"event_user_relation": "and",
"events": [
{
"eventName": "fight_success",
"num": "0",
"recentDay": "1-30",
"relation": "and",
"taPropQuota": {
"analysis": "TIMES"
},
"comparator": "greater"
}
],
"filts": [],
"relation": "and"
}
}
]
}
}

3. First or last tag

  • Request body (application/json)
{
"projectId": 2,
"clusterName": "tag_test_20200615_1",
"clusterCatalog": "catalog_tag",
"clusterType": "tag_by_static_condition",
"subConditionTabType": "tag_condition_by_firstlast_event",
"displayName": "Tag_test",
"tagQp": {
"userTagConFirstLastEventDef": {
"userTagConFirstLastEvent": {
"calcPropVo": {
"isCalc": false,
"property": {
"columnName": "#vp@test_num",
"tableType": "event"
}
},
"eventName": "pay",
"isFirstEvent": true,
"recentDay": "0-1",
"filts": [
{
"columnName": "#os",
"comparator": "equal",
"ftv": [
"android"
],
"tableType": "event"
}
],
"relation": "and"
}
}
}
}

4. Metric tag (supported since version 3.2.1)

  • Request body (application/json)
{
"projectId": 2,
"clusterName": "tag_test_20200615_1",
"clusterCatalog": "catalog_tag",
"clusterType": "tag_by_static_condition",
"subConditionTabType": "tag_condition_by_quotation",
"displayName": "Tag_test",
"tagQp": {
"userTagConQuotaDef": {
"userTagConQuotaEvent": {
"type": "normal",
"quota": "activity_reward",
"analysis": "DISTINCT",
"eventName": "activity_attend",
"recentDay": "0-1",
"filts": [
{
"columnName": "#os",
"comparator": "equal",
"ftv": [
"android"
],
"tableType": "event"
}
],
"relation": "and"
}
}
}
}

Success response example

{
"data": 970,
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
data970ObjectNumber of successes
return_code0IntegerReturn code
return_messagesuccessStringReturn message

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. Query cohort or tag details​

Query details by clusterName

Endpoint URL

/open/user-cluster-detail?token=xxx&projectId=102&clusterName=recent_7_days_consume

Request method

GET

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
clusterNamerecent_7_days_consumeStringYesCohort name

Success response example

{
"data": {
"clusterName": "recent_7_days_consume",
"clusterType": "cluster_by_static_condition",
"displayName": "recent_7_days_consume",
"id": 970,
"progress": 1,
"projectId": 102,
"refreshTime": "2020-01-10 10:51:14",
"userClusterDef": {
"event_relation": "and",
"event_user_relation": "and",
"events": [
{
"comparator": "greater",
"endTime": "2020-01-09 00:00:00",
"eventName": "consume_item",
"num": "4",
"recentDay": "1-7",
"startTime": "2020-01-03 00:00:00",
"taPropQuota": {
"analysis": "TIMES"
}
}
],
"filts": [
{
"columnName": "user_level",
"comparator": "equal",
"ftv": [
"3"
],
"tableType": "user"
}
],
"relation": "and"
},
"userId": 13,
"usersNum": 0
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectReturned result
data.clusterNamerecent_7_days_consumeStringCohort name
data.clusterTypecluster_by_static_conditionString

Cohort type

  • cluster_by_dynamic_condition: dynamically updated behavioral cohort
  • cluster_by_static_condition: static behavioral cohort
  • cluster_by_result: result cohort
  • cluster_by_import: custom uploaded ID cohort
  • cluster_by_dynamic_sql: dynamic SQL cohort
  • cluster_by_static_sql: static SQL cohort
  • tag_by_dynamic_condition: dynamically updated behavioral tag
  • tag_by_static_condition: static behavioral tag
  • tag_by_import: custom uploaded ID tag
  • tag_by_dynamic_sql: dynamic SQL tag
  • tag_by_static_sql: static SQL tag
data.displayNamerecent_7_days_consumeStringCohort display name
data.id970IntegerCohort ID
data.progress1IntegerTask execution progress. 100 means the execution succeeded, 0-99 is the current calculation progress, and -1 means the execution failed
data.projectId102IntegerID of the project it belongs to
data.refreshTime2020-01-10 10:51:14StringCohort refresh time
data.userId13IntegeruserId of the cohort owner
data.usersNum0IntegerNumber of users in the cohort
data.userClusterDef-ObjectBehavioral cohort definition
data.userClusterDef.event_relationandStringLogical relationship between the filter conditions in the property list of performed events
data.userClusterDef.event_user_relationandStringLogical relationship between the filter conditions of performed events and user properties
data.userClusterDef.events-ListList of performed event conditions
data.userClusterDef.events.comparatorgreaterStringSee the operator descriptions in Filter expressions of the Query API
data.userClusterDef.events.endTime2020-01-09 00:00:00StringEnd Time
data.userClusterDef.events.eventNameconsume_itemStringEvent name
data.userClusterDef.events.num4String
data.userClusterDef.events.recentDay1-7StringRelative time
data.userClusterDef.events.startTime2020-01-03 00:00:00StringStart Time
data.userClusterDef.events.taPropQuota-ObjectEvent metric
data.userClusterDef.events.taPropQuota.analysisTIMESStringAnalysis type. See the list of analysis values for aggregation methods in the Events Analysis model API
data.userClusterDef.filts-ListList of user property conditions
data.userClusterDef.filts.columnNameStringuser_levelField name
data.userClusterDef.filts.comparatorStringequalSee the operator descriptions in Filter expressions of the Query API
data.userClusterDef.filts.ftvList["3"]List of filter values
data.userClusterDef.filts.tableTypeuserStringevent: event property, user: user property
data.userClusterDef.relationandStringLogical relationship between the filter conditions in the user property 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
Result fieldDescription
userClusterDefCohort definition, same as qp
userTagDefTag definition, same as tagQp

3. Update a behavioral cohort or tag definition by name​

Endpoint URL

/open/user-cluster-update-by-name?token=xxx&projectId=xxx&clusterName= recent_7_days_consume

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
clusterNamerecent_7_days_consumeStringYesCohort name

Request body parameters

{
"clusterCatalog": "catalog_cluster",
"clusterType": "cluster_by_static_condition",
"displayName": "recent_7_days_consume",
"projectId": 102,
"qp": {
"event_relation": "and",
"event_user_relation": "and",
"events": [
{
"comparator": "greater",
"endTime": "2020-01-09 00:00:00",
"eventName": "consume_item",
"num": "4",
"recentDay": "1-7",
"startTime": "2020-01-03 00:00:00",
"taPropQuota": {
"analysis": "TIMES"
}
}
],
"filts": [
{
"columnName": "user_level",
"comparator": "equal",
"ftv": [
"3"
],
"tableType": "user"
}
],
"relation": "and"
}
}

The parameters are the same as those of the Add a behavioral cohort or tag API

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

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. Delete a cohort or tag by name​

Endpoint URL

/open/delete-user-cluster-by-name?token=xxx&projectId=102&clusterName= recent_7_days_consume

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
clusterNamerecent_7_days_consumeIntegerYesCohort name

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

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

5. Query the cohort and tag list​

Endpoint URL

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

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key

Request body parameters

{
"clusterCatalog": "catalog_cluster",
"clusterName": "test001",
"clusterTypes": [
"cluster_by_dynamic_condition",
"cluster_by_static_condition"
],
"pagerHeader": {
"pageNum": 1,
"pageSize": 10
},
"projectId": 102
}
$$Parameter nameExample valueParameter typeRequiredDescription
clusterCatalogcatalog_clusterStringYesCohort category. Valid values: catalog_cluster (cohort), catalog_tag (tag)
clusterNametest001StringNoFuzzy search by cohort/tag name
clusterTypes

["cluster_by_dynamic_condition"]

ListNo

Cohort type. Valid values:

cluster_by_dynamic_condition

cluster_by_static_condition

cluster_by_result

cluster_by_import

cluster_by_dynamic_sql

cluster_by_static_sql

tag_by_dynamic_condition

tag_by_static_condition

tag_by_import

tag_by_dynamic_sql

tag_by_static_sql

pagerHeader-ObjectYesPagination information
pagerHeader.pageNum1IntegerNoPage number
pagerHeader.pageSize10IntegerNoPage size
projectId102IntegerYesProject ID

Success response example

{
"data": {
"pagerResult": {
"pageNum": 1,
"pageSize": 10,
"totalNum": 2
},
"userClusters": [
{
"clusterCatalog": "catalog_cluster",
"clusterName": "xuzz_ces",
"clusterType": "cluster_by_static_condition",
"displayName": "User Count",
"historyDataStatus": 0,
"id": 905,
"mainColumnName": "",
"progress": 100,
"projectId": 102,
"refreshDelay": 0,
"refreshTime": "2019-11-01 15:08:31",
"remarks": "2134",
"selectType": "string",
"status": 1,
"uploadFileName": "",
"userId": 108,
"userName": "Automation Test__sync",
"usersNum": 4665
},
{
"clusterCatalog": "catalog_cluster",
"clusterName": "test",
"clusterType": "cluster_by_static_condition",
"displayName": "test",
"historyDataStatus": 0,
"id": 183,
"mainColumnName": "",
"progress": 100,
"projectId": 102,
"refreshDelay": 0,
"refreshTime": "2019-11-01 15:05:28",
"remarks": "test",
"selectType": "string",
"status": 1,
"uploadFileName": "",
"userId": 108,
"userName": "Automation Test__sync",
"usersNum": 5603
}
]
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
data-ObjectReturned result
data.pagerResult-ObjectPagination result
data.pagerResult.pageNum1IntegerCurrent page
data.pagerResult.pageSize10IntegerItems per page
data.pagerResult.totalNum2IntegerTotal number of items
data.userClusters-ObjectCohort list
data.userClusters.clusterCatalogcatalog_clusterString

Cohort category

  • catalog_cluster: cohort
  • catalog_tag: tag
data.userClusters.clusterNamexuzz_cesStringCohort name
data.userClusters.clusterType

cluster_by_static_condition

String

Cohort type

  • cluster_by_dynamic_condition: dynamically updated behavioral cohort
  • cluster_by_static_condition: static behavioral cohort
  • cluster_by_result: result cohort
  • cluster_by_import: custom uploaded ID cohort
  • cluster_by_dynamic_sql: dynamic SQL cohort
  • cluster_by_static_sql: static SQL cohort
  • tag_by_dynamic_condition: dynamically updated behavioral tag
  • tag_by_static_condition: static behavioral tag
  • tag_by_import: custom uploaded ID tag
  • tag_by_dynamic_sql: dynamic SQL tag
  • tag_by_static_sql: static SQL tag
data.userClusters.displayNameNumber of usersStringCohort display name
data.userClusters.historyDataStatus0IntegerWhether there is historical version data
data.userClusters.id905IntegerCohort ID
data.userClusters.mainColumnNameStringAssociated property of the ID cohort
data.userClusters.progress100IntegerTask execution progress. 100 means the execution succeeded, 0-99 is the current calculation progress, and -1 means the execution failed
data.userClusters.projectId102IntegerID of the project it belongs to
data.userClusters.refreshDelay0LongCohort refresh delay
data.userClusters.refreshTime2019-11-01 15:08:31StringCohort refresh time
data.userClusters.remarks2134StringCohort description
data.userClusters.selectTypestringStringTag type
data.userClusters.status1IntegerCohort status. 0: invalid, 1: valid
data.userClusters.uploadFileNameStringUploaded file name
data.userClusters.userId108IntegeruserId of the cohort owner
data.userClusters.userNameAutomation Test__syncStringuserName of the cohort owner
data.userClusters.usersNum4665IntegerNumber of users in the cohort

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

6. Refresh a behavioral cohort or tag by name​

Endpoint URL

/open/user-cluster-refresh-by-name?token=xxx&projectId=102&clusterName=recent_7_days_consume

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
clusterNamerecent_7_days_consumeStringYesCohort name

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

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

7. Query refresh progress​

After you submit a refresh, you can query the refresh progress

/open/user-cluster-refresh-progress-by-name?token=xxx&projectId=102&clusterName=recent_7_days_consume

Request method

GET

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
clusterNamerecent_7_days_consumeStringYesCohort name

Success response example

{
"data": {
"progress": 80,
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
data-ObjectReturned result
data.progress100IntegerValue range [0, 100]. 100 means the refresh is complete
return_code0IntegerReturn code
return_messagesuccessStringReturn message

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

8. Create an uploaded ID cohort or tag​

Endpoint URL

/open/import-id-cluster-add?token=xxx&projectId=102&displayName=xxxx&mainColumnName=#account_id

Request method

POST

Content-Type

text/csv

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
displayNamexxxStringYesCohort display name (up to 50 characters)
mainColumnName#account_idStringYesAssociated property of the cohort
clusterCatalogStringNoCohort category: catalog_cluster, catalog_tag. Defaults to catalog_cluster
clusterNameStringNoCohort name (up to 24 characters), consisting of letters and digits. If left empty, it is generated by the system
remarksStringNoCohort description

Success response example

{
"data": {
"clusterId": 1889,
"tagValueNullNum": 0,
"unmatchedNum": 0,
"uploadNum": 5,
"userNum": 5
},
"return_code": 0,
"return_message": "success"
}
$$Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
dataObjectReturned result
data.clusterId1889IntegerCohort ID
data.tagValueNullNum0IntegerNumber of rows whose tag value is null
data.unmatchedNum0IntegerNumber of unmatched records
data.uploadNum5IntegerNumber of uploaded records
data.userNum5IntegerNumber of users in the cohort

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

curl example (Send/Recv description lines are removed from trace.txt)

[root@ta1 ~]# curl --trace-ascii trace.txt --header 'Content-Type: text/csv' --data-binary '@test.csv' 'http://ta2:8992/open/import-id-cluster-add?token=YOUR_TOKEN&projectId=102&displayName=xxxx&mainColumnName=%23account_id'
{"data":{"clusterId":1889,"tagValueNullNum":0,"unmatchedNum":0,"uploadNum":5,"userNum":5},"return_code":0,"return_message":"success"}
[root@ta1 ~]#
[root@ta1 ~]#
[root@ta1 ~]# cat trace.txt
== Info: About to connect() to ta2 port 8992 (#0)
== Info: Trying 192.0.2.10...
== Info: Connected to ta2 (192.0.2.10) port 8992 (#0)
0000: POST /open/import-id-cluster-add?token=YOUR_TOKEN
0040: &projectId=102&displayNam
0080: e=xxxx&mainColumnName=%23account_id HTTP/1.1
00ae: User-Agent: curl/7.29.0
00c7: Host: ta2:8992
00d7: Accept: */*
00e4: Content-Type: text/csv
00fc: Content-Length: 43
0110:
0000: j77639
0008: h84497
0010: g119426
0019: e154284
0022: f175355
== Info: upload completely sent off: 43 out of 43 bytes
0000: HTTP/1.1 200 OK
0000: Date: Thu, 05 Nov 2020 04:06:31 GMT
0000: Content-Type: application/json;charset=utf-8
0000: Content-Length: 148
0000:
0000: {"data":{"clusterId":1889,"tagValueNullNum":0,"unmatchedNum":0,"
0040: uploadNum":5,"userNum":5},"return_code":0,"return_message":"succ
0080: ess"}
== Info: Connection #0 to host ta2 left intact

9. Modify an uploaded ID cohort or tag by name​

Endpoint URL

/open/import-id-cluster-modify-by-name?token=xxx&projectId=102&clusterName= recent_7_days_consume&displayName=xxxx&remarks=xxx&mainColumnName=xxx

Request method

POST

Content-Type

text/csv

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
clusterNamerecent_7_days_consumeStringYesCohort name
displayNameStringNoCohort display name (up to 50 characters)
mainColumnNameStringNoAssociated property of the cohort
remarksStringNoCohort description

Success response example

{
"data": "",
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message
dataObjectReturned result

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

10. Asynchronously batch refresh tag date versions​

Endpoint URL

/open/tag-date-batch-refresh?token=xxx&projectId=102&tagName= tag_123

Request method

POST

Content-Type

application/json

Request query parameters

Parameter nameExample valueParameter typeRequiredDescription
tokenxxxStringYesQuery key
projectId102IntegerYesProject ID
tagNametag_123StringYesTag name

Request body parameters

Parameter nameExample valueParameter typeRequiredDescription
startDate2022-12-01StringYesStart date
endDate2022-12-31StringYesEnd date
onlyAbnormaltrueBooleanNoWhether to calculate only abnormal versions. Defaults to no
useUserTableTypeuser_tableStringNo

User table type. Enum values:

user_table: use the user table

user_backup_table_default: use the user snapshot table (uses the user table by default when empty)

user_backup_table_last_date: use the user snapshot table (uses the nearest later non-empty date when empty)

The default value is user_backup_table_default

eg:

{
"startDate": "2022-12-01",
"endDate": "2022-12-31",
"onlyAbnormal": true,
"useUserTableType": "user_table"
}

Success response example

{
"return_code": 0,
"return_message": "success"
}
Parameter nameExample valueParameter typeDescription
return_code0IntegerReturn code
return_messagesuccessStringReturn message

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
Was this page helpful?