Cohort and tag API
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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query 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 type | Required | Description |
| projectId | 102 | String | Yes | Project ID |
| clusterName | recent_7_days_consume | String | Yes | Cohort name (letters and digits only, up to 24 characters) |
| clusterCatalog | catalog_cluster | String | No | Cohort category
|
clusterType | cluster_by_static_condition | String | No | Cohort type
|
| displayName | recent_7_days_consume | String | Yes | Cohort display name (up to 50 characters) |
| qp | - | Object | No | Cohort definition |
| qp.events | - | List | No | List of event conditions |
| qp.events.comparator | greater | String | Yes | See the operator descriptions in Filter expressions of the Query API |
| qp.events.eventName | consume_item | String | Yes | Event name |
| qp.events.num | 4 | String | No | Filter value |
| qp.events.recentDay | 1-7 | String | No | Relative time |
| qp.events.taPropQuota | - | Object | Yes | Event metric |
| qp.events.taPropQuota.analysis | TIMES | String | No | Analysis type. See the list of analysis values for aggregation methods in the Events Analysis model API |
| qp.event_relation | and | String | No | Logical relationship between event conditions (and, or) |
| qp.filts | - | List | No | List of user property conditions |
| qp.filts.columnName | user_level | String | Yes | Field name |
| qp.filts.comparator | equal | String | See the operator descriptions in Filter expressions of the Query API | |
| qp.filts.ftv | ["3"] | List | No | List of filter values |
| qp.filts.tableType | user | String | Yes | user: user property |
| qp.relation | and | String | No | Logical relationship between user property conditions |
| qp.event_user_relation | and | String | No | Logical relationship between the event condition list and the user property condition list |
Add a behavioral tag
subConditionTabType field description:
| Field | Description |
|---|---|
| tag_condition_default | Behavioral tag |
| tag_condition_by_firstlast_event | First or last tag |
| tag_condition_by_quotation | Metric tags |
The tagQp field contains the tag definition. Different types of tags use different fields:
| Field | Description |
|---|---|
| userTagValueDefs | Behavioral tag |
| userTagConFirstLastEventDef | First or last tag |
2. Behavioral tag
userTagValueDefs field description:
| Field | Description |
|---|---|
| tagValue | Tag value |
| userClusterDef | Tag 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 name | Example value | Parameter type | Description |
|---|---|---|---|
| data | 970 | Object | Number of successes |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| clusterName | recent_7_days_consume | String | Yes | Cohort 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 name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | - | Object | Returned result |
| data.clusterName | recent_7_days_consume | String | Cohort name |
| data.clusterType | cluster_by_static_condition | String | Cohort type
|
| data.displayName | recent_7_days_consume | String | Cohort display name |
| data.id | 970 | Integer | Cohort ID |
| data.progress | 1 | Integer | Task execution progress. 100 means the execution succeeded, 0-99 is the current calculation progress, and -1 means the execution failed |
| data.projectId | 102 | Integer | ID of the project it belongs to |
| data.refreshTime | 2020-01-10 10:51:14 | String | Cohort refresh time |
| data.userId | 13 | Integer | userId of the cohort owner |
| data.usersNum | 0 | Integer | Number of users in the cohort |
| data.userClusterDef | - | Object | Behavioral cohort definition |
| data.userClusterDef.event_relation | and | String | Logical relationship between the filter conditions in the property list of performed events |
| data.userClusterDef.event_user_relation | and | String | Logical relationship between the filter conditions of performed events and user properties |
| data.userClusterDef.events | - | List | List of performed event conditions |
| data.userClusterDef.events.comparator | greater | String | See the operator descriptions in Filter expressions of the Query API |
| data.userClusterDef.events.endTime | 2020-01-09 00:00:00 | String | End Time |
| data.userClusterDef.events.eventName | consume_item | String | Event name |
| data.userClusterDef.events.num | 4 | String | |
| data.userClusterDef.events.recentDay | 1-7 | String | Relative time |
| data.userClusterDef.events.startTime | 2020-01-03 00:00:00 | String | Start Time |
| data.userClusterDef.events.taPropQuota | - | Object | Event metric |
| data.userClusterDef.events.taPropQuota.analysis | TIMES | String | Analysis type. See the list of analysis values for aggregation methods in the Events Analysis model API |
| data.userClusterDef.filts | - | List | List of user property conditions |
| data.userClusterDef.filts.columnName | String | user_level | Field name |
| data.userClusterDef.filts.comparator | String | equal | See the operator descriptions in Filter expressions of the Query API |
| data.userClusterDef.filts.ftv | List | ["3"] | List of filter values |
| data.userClusterDef.filts.tableType | user | String | event: event property, user: user property |
| data.userClusterDef.relation | and | String | Logical relationship between the filter conditions in the user property list |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |
| Result field | Description |
|---|---|
| userClusterDef | Cohort definition, same as qp |
| userTagDef | Tag 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| clusterName | recent_7_days_consume | String | Yes | Cohort 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 name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| clusterName | recent_7_days_consume | Integer | Yes | Cohort name |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| clusterCatalog | catalog_cluster | String | Yes | Cohort category. Valid values: catalog_cluster (cohort), catalog_tag (tag) |
| clusterName | test001 | String | No | Fuzzy search by cohort/tag name |
| clusterTypes | ["cluster_by_dynamic_condition"] | List | No | 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 | - | Object | Yes | Pagination information |
| pagerHeader.pageNum | 1 | Integer | No | Page number |
| pagerHeader.pageSize | 10 | Integer | No | Page size |
| projectId | 102 | Integer | Yes | Project 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 name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | - | Object | Returned result |
| data.pagerResult | - | Object | Pagination result |
| data.pagerResult.pageNum | 1 | Integer | Current page |
| data.pagerResult.pageSize | 10 | Integer | Items per page |
| data.pagerResult.totalNum | 2 | Integer | Total number of items |
| data.userClusters | - | Object | Cohort list |
| data.userClusters.clusterCatalog | catalog_cluster | String | Cohort category
|
| data.userClusters.clusterName | xuzz_ces | String | Cohort name |
| data.userClusters.clusterType | cluster_by_static_condition | String | Cohort type
|
| data.userClusters.displayName | Number of users | String | Cohort display name |
| data.userClusters.historyDataStatus | 0 | Integer | Whether there is historical version data |
| data.userClusters.id | 905 | Integer | Cohort ID |
| data.userClusters.mainColumnName | String | Associated property of the ID cohort | |
| data.userClusters.progress | 100 | Integer | Task execution progress. 100 means the execution succeeded, 0-99 is the current calculation progress, and -1 means the execution failed |
| data.userClusters.projectId | 102 | Integer | ID of the project it belongs to |
| data.userClusters.refreshDelay | 0 | Long | Cohort refresh delay |
| data.userClusters.refreshTime | 2019-11-01 15:08:31 | String | Cohort refresh time |
| data.userClusters.remarks | 2134 | String | Cohort description |
| data.userClusters.selectType | string | String | Tag type |
| data.userClusters.status | 1 | Integer | Cohort status. 0: invalid, 1: valid |
| data.userClusters.uploadFileName | String | Uploaded file name | |
| data.userClusters.userId | 108 | Integer | userId of the cohort owner |
| data.userClusters.userName | Automation Test__sync | String | userName of the cohort owner |
| data.userClusters.usersNum | 4665 | Integer | Number of users in the cohort |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| clusterName | recent_7_days_consume | String | Yes | Cohort name |
Success response example
{
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| clusterName | recent_7_days_consume | String | Yes | Cohort name |
Success response example
{
"data": {
"progress": 80,
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| data | - | Object | Returned result |
| data.progress | 100 | Integer | Value range [0, 100]. 100 means the refresh is complete |
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| displayName | xxx | String | Yes | Cohort display name (up to 50 characters) |
| mainColumnName | #account_id | String | Yes | Associated property of the cohort |
| clusterCatalog | String | No | Cohort category: catalog_cluster, catalog_tag. Defaults to catalog_cluster | |
| clusterName | String | No | Cohort name (up to 24 characters), consisting of letters and digits. If left empty, it is generated by the system | |
| remarks | String | No | Cohort description |
Success response example
{
"data": {
"clusterId": 1889,
"tagValueNullNum": 0,
"unmatchedNum": 0,
"uploadNum": 5,
"userNum": 5
},
"return_code": 0,
"return_message": "success"
}
| $$Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | Object | Returned result | |
| data.clusterId | 1889 | Integer | Cohort ID |
| data.tagValueNullNum | 0 | Integer | Number of rows whose tag value is null |
| data.unmatchedNum | 0 | Integer | Number of unmatched records |
| data.uploadNum | 5 | Integer | Number of uploaded records |
| data.userNum | 5 | Integer | Number of users in the cohort |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| clusterName | recent_7_days_consume | String | Yes | Cohort name |
| displayName | String | No | Cohort display name (up to 50 characters) | |
| mainColumnName | String | No | Associated property of the cohort | |
| remarks | String | No | Cohort description |
Success response example
{
"data": "",
"return_code": 0,
"return_message": "success"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
| data | Object | Returned result |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return 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 name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| token | xxx | String | Yes | Query key |
| projectId | 102 | Integer | Yes | Project ID |
| tagName | tag_123 | String | Yes | Tag name |
Request body parameters
| Parameter name | Example value | Parameter type | Required | Description |
|---|---|---|---|---|
| startDate | 2022-12-01 | String | Yes | Start date |
| endDate | 2022-12-31 | String | Yes | End date |
| onlyAbnormal | true | Boolean | No | Whether to calculate only abnormal versions. Defaults to no |
| useUserTableType | user_table | String | No | 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 name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | 0 | Integer | Return code |
| return_message | success | String | Return message |
Error response example
{
"return_code": -1008,
"return_message": "Parameter (token) is empty"
}
| Parameter name | Example value | Parameter type | Description |
|---|---|---|---|
| return_code | -1008 | Integer | Return code |
| return_message | Parameter (token) is empty | String | Return message |

