menu
Is this helpful?

# User Clusters and Tag APIs

For the calling method, see the calling method description in the Open API documentation.

# Add Conditional Cluster or Tag

Interface URL

/open/user-cluster-add?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

The following example shows the request body in different situations.

1. Add Conditional Clusters

Request Body Parameter

{
  "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 Sample value Parameter type Is required Parameter description
projectId 102 String Yes Project ID
clusterName recent_7_days_consume String Yes Cluster name (can only be a character or number and cannot exceed 24 in length)
clusterCatalog catalog_cluster String No Cluster type
  • catalog_cluster: Cluster

  • catalog_tag: Tag

clusterType cluster_by_static_condition String No Cluster type
  • cluster_by_dynamic_condition: Dynamic Conditional Update User Cluster

  • cluster_by_static_condition: Static Conditional User Cluster

  • cluster_by_result: Result Cluster

  • cluster_by_import: Custom upload ID Cluster

  • cluster_by_dynamic_sql: Dynamic SQL Cluster

  • cluster_by_static_sql: Static SQL Cluster

  • tag_by_dynamic_condition: Dynamic Conditional Update User Tag

  • tag_by_static_condition: Static Conditional User Tag

  • tag_by_import: Custom Upload ID Tag

  • tag_by_dynamic_sql: Dynamic SQL Tag

  • tag_by_static_sql: Static SQL Tag

displayName recent_7_days_consume String Yes Cluster display name (maximum 50 characters)
qp - Object No Cluster definition
qp.events - List No List of participation conditions
qp.events.comparator greater String Yes See Operator description in Filter Expressions, Model Query API
qp.events.eventName consume_item String Yes Event type
qp.events.num 4 String No Filter value
qp.events.recentDay 1-7 String No Relative time
qp.events.taPropQuota - Object Yes Event indicators
qp.events.taPropQuota.analysis TIMES String No From the analysis perspective, see the list of aggregate method analysis values in the event analysis model API
qp.event_relation and String No Participate in the logical relationship between event conditions (and, or)
qp.filts - List No List of user features
qp.filts.columnName user_level String Yes Field name
qp.filts.comparator equal String See Operator description in Filter Expressions, Model Query API
qp.filts.ftv ["3"] List No Filtered value list
qp.filts.tableType user String Yes Event: event attribute, user: user feature
qp.relation and String No Logical relationships between user feature conditions
qp.event_user_relation and String No Logical relationship between participation event condition list and user feature condition list

Add condition tag

SubConditionTabType field description:

Field Description
tag_condition_default Custom condition tag
tag_condition_by_firstlast_event First and last feature tag

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

Field Description
userTagValueDefs Custom condition tag
userTagConFirstLastEventDef First and last feature tag

2. Custom Conditional Tag

UserTagValueDefs field description:

Field Description
tagValue Tag value
userClusterDef Tag values match definitions, see UserClusterDef for field definitions
- Request body (application/json) ```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 vaule 2", "userClusterDef": { "event_relation": "and", "event_user_relation": "and", "events": [ { "eventName": "fight_success", "num": "0", "recentDay": "1-30", "relation": "and", "taPropQuota": { "analysis": "TIMES" } "uceCalcuSymbol": "greater" } ], "filts": [], "relation": "and" } } ] } } ```

3. First and Last Feature 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. Indicator Value Tag (supported from 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"
      }
    }
  }
}

Successful Response Example

{
    "data": 970,
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
data 970 Object Number of successes
return_code 0 Integer Return code
return_message success String Return information

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

# Query for Cluster or Tag Detail

Search details by clusterId or clusterName

Interface URL

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

Request method

GET

Content-Type

application/json

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token xxx String Yes token
projectId 0 Integer Yes Project ID
clusterId 970 integer No Cluster ID
clusterName recent_7_days_consume String No Cluster name

Successful 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 Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information
data - Object Return result
data.clusterName recent_7_days_consume String Cluster name
data.clusterType cluster_by_static_condition String Cluster type
  • cluster_by_dynamic_condition: Dynamic Conditional Update User Group

  • cluster_by_static_condition: Static conditional user group

  • cluster_by_result: result clustering

  • cluster_by_import: Custom upload ID grouping

  • cluster_by_dynamic_sql: Dynamic SQL clustering

  • cluster_by_static_sql: Static SQL clustering

  • tag_by_dynamic_condition: Dynamic Conditional Update User Tag

  • tag_by_static_condition: static conditional user tags

  • tag_by_import: Custom upload ID tag

  • tag_by_dynamic_sql: Dynamic SQL tags

  • tag_by_static_sql: static SQL tags

data.displayName recent_7_days_consume String Cluster display name
data.id 970 Integer Partition ID
data.progress 1 Integer Task execution progress, 100 means execution success, 0-99 means current calculation progress, -1 means execution failure
data.projectId 102 Integer Project ID
data.refreshTime 2020-01-10 10:51:14 String Cluster refresh time
data.userId 13 Integer Cluster belongs to userId
data.usersNum 0 Integer Number of users grouped
data.userClusterDef - Object Conditional grouping definition
data.userClusterDef.event_relation and String Filter condition logic relationship of the attribute list of the event
data.userClusterDef.event_user_relation and String Filter logical relationships between events and user features
data.userClusterDef.events - List List of conditions for doing things
data.userClusterDef.events.comparator greater String See Operator description in Filter Expressions, Model Query API
data.userClusterDef.events.endTime 2020-01-09 00:00:00 String Start time
data.userClusterDef.events.eventName consume_item String Event type
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 End time
data.userClusterDef.events.taPropQuota - Object Event indicators
data.userClusterDef.events.taPropQuota.analysis TIMES String From the analysis perspective, see the list of aggregate method analysis values in the event analysis model API
data.userClusterDef.filts - List List of user features
data.userClusterDef.filts.columnName String user_level Field name
data.userClusterDef.filts.comparator String equal See Operator descriptions in filter expressions for model query APIs
data.userClusterDef.filts.ftv List ["3"] Filtered value list
data.userClusterDef.filts.tableType user String Event: event attribute, user: user feature
data.userClusterDef.relation and String Filter condition logic relationship of user feature 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
Result field Description
userClusterDef Cluster definition, same as qp
userTagDef Tag definition, same as tagQp

# Update Conditional Cluster or Tag Definition

Interface URL

/open/user-cluster-update?token=xxx&clusterId=970

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
clusterId 970 integer No Cluster ID

Request Body Parameter

{
  "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"
  }
}

Parameter description with interface add conditional cluster or tag

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information

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

# Cluster or Tag Definitions Based on Name Update Criteria

Interface 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 Parameter

Parameter name Sample value Parameter type Is required Parameter description
token xxx String Yes token
clusterId 970 integer No Cluster ID

Request Body Parameter

{
  "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"
  }
}

Parameter description with interfaceadd conditional cluster or tag

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information

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

# Delete Cluster or Tag

Interface URL

/open/user-cluster-delete?token=xxx&projectId=102&clusterId=970

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
projectId 102 Integer Yes Project ID
clusterId 970 Integer Yes Cluster ID

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information

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

# Delete Cluster or Tag by Name

Interface 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 Parameter

Parameter name Sample value Parameter type Is required Parameter description
token xxx String Yes token
projectId 102 Integer Yes Project ID
clusterName recent_7_days_consume Integer Yes Cluster name

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information

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

# Cluster and Tag List Query

Interface URL

/open/user-cluster-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

{
  "clusterCatalog": "catalog_cluster",
  "clusterTypes": [
    "cluster_by_dynamic_condition",
    "cluster_by_static_condition"
  ],
  "pagerHeader": {
    "pageNum": 1,
    "pageSize": 10
  },
  "projectId": 102
}
$$Parameter name Sample value Parameter type Is required Parameter description
clusterCatalog catalog_cluster String Yes Parameter description
clusterTypes ["cluster_by_dynamic_condition"] List Yes Cluster type
pagerHeader - Object No Paging information
pagerHeader.pageNum 1 Integer No Page Index
pagerHeader.pageSize 10 Integer No Page size
projectId 102 Integer Yes Project ID

Successful Response Example

{
    "data": {
        "pagerResult": {
            "pageNum": 1,
            "pageSize": 10,
            "totalNum": 2
        },
        "userClusters": [
            {
                "clusterCatalog": "catalog_cluster",
                "clusterName": "xuzz_ces",
                "clusterType": "cluster_by_static_condition",
                "displayName": "user number",
                "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": "auto 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": "auto test__sync",
                "usersNum": 5603
            }
        ]
    },
    "return_code": 0,
    "return_message": "success"
}
$$Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information
data - Object Return result
data.pagerResult - Object Paging results
data.pagerResult.pageNum 1 Integer Current page
data.pagerResult.pageSize 10 Integer Entries per page
data.pagerResult.totalNum 2 Integer Total number
data.userClusters - Object Cluster list
data.userClusters.clusterCatalog catalog_cluster String Cluster type
  • catalog_cluster: Clustering

  • catalog_tag: Label

data.userClusters.clusterName xuzz _ ces String Cluster name
data.userClusters.clusterType cluster_by_static_condition String Cluster type
  • cluster_by_dynamic_condition: Dynamic Conditional Update User Group

  • cluster_by_static_condition: Static conditional user group

  • cluster_by_result: result clustering

  • cluster_by_import: Custom upload ID grouping

  • cluster_by_dynamic_sql: Dynamic SQL clustering

  • cluster_by_static_sql: Static SQL clustering

  • tag_by_dynamic_condition: Dynamic Conditional Update User Tag

  • tag_by_static_condition: static conditional user tags

  • tag_by_import: Custom upload ID tag

  • tag_by_dynamic_sql: Dynamic SQL tags

  • tag_by_static_sql: static SQL tags

data.userClusters.displayName Number of users String Cluster display name
data.userClusters.historyDataStatus 0 Integer Is there historical version data
data.userClusters.id 905 Integer Partition ID
data.userClusters.mainColumnName String ID clustering association attribute
data.userClusters.progress 100 Integer Task execution progress, 100 means execution success, 0-99 means current calculation progress, -1 means execution failure
data.userClusters.projectId 102 Integer Project ID
data.userClusters.refreshDelay 0 Long Cluster refresh delay
data.userClusters.refreshTime 2019-11-01 15:08:31 String Cluster refresh time
data.userClusters.remarks 2134 String Cluster remarks
data.userClusters.selectType string String Label type
data.userClusters.status 1 Integer Cluster status, 0: invalid, 1: valid
data.userClusters.uploadFileName String Upload file name
data.userClusters.userId 108 Integer Cluster belongs to userId
data.userClusters.userName Automated test __sync String Cluster belongs to userName
data.userClusters.usersNum 4665 Integer Number of users grouped

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

# Refresh Conditional Cluster or Tag

Interface URL

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

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
projectId 102 Integer Yes Project ID
clusterId 970 integer No Cluster ID
clusterName recent_7_days_consume String No Cluster name

Successful Response Example

{
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information

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

# Query Refresh Progress

After submitting the refresh, you can query the refresh progress.

[GET /open/user-cluster-refresh-progress?token=xxx&projectId=102&clusterId=970]
[GET /open/user-cluster-refresh-progress-by-name?token=xxx&projectId=102&clusterName=recent_7_days_consume]

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
projectId 102 Integer Yes Project ID
clusterId 970 integer No Cluster ID
clusterName recent_7_days_consume String No Cluster name

Successful Response Example

{
  "data": {
    "progress": 80,
  },
  "return_code": 0,
  "return_message": "success"
}
$$Parameter name Sample value Parameter type Parameter description
data - Object Return result
data.progress 100 Integer Value range [0,100], 100 means refresh completed
return_code 0 Integer Return code
return_message success String Return information

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

# Create an Upload ID Cluster or Tag

Interface URL

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

Request method

POST

Content-Type

text/csv

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token xxx String Yes token
projectId 102 Integer Yes Project ID
displayName xxx String Yes Cluster display name (maximum 50 characters)
mainColumnName #account_id String Yes Clustering association attribute
clusterCatalog String No Cluster category: catalog_cluster, catalog_tag. Default is catalog_cluster
clusterName String No Group name (maximum 24 characters), alphanumeric, not filled in by the system generated
remarks String No Cluster remarks

Successful Response Example

{
    "data": {
        "clusterId": 1889,
        "tagValueNullNum": 0,
        "unmatchedNum": 0,
        "uploadNum": 5,
        "userNum": 5
    },
    "return_code": 0,
    "return_message": "success"
}
$$Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information
data Object Return result
data.clusterId 1889 Integer User group ID
data.tagValueNullNum 0 Integer Number of rows with a Tag value of null
data.unmatchedNum 0 Integer Number of unmatched records
data.uploadNum 5 Integer Number of upload records
data.userNum 5 Integer Number of users

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

Example Curl (trace.txt delete the Send/Recv description line)

[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=bTOzKiTIozG4e19FgXphcA8dDV3DIY8RwdHTO7aSnBsRqSNaIk19BnBMecJDWibD&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 10.81.129.35...
== Info: Connected to ta2 (10.81.129.35) port 8992 (#0)
0000: POST /open/import-id-cluster-add?token=bTOzKiTIozG4e19FgXphcA8dD
0040: V3DIY8RwdHTO7aSnBsRqSNaIk19BnBMecJDWibD&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

# Modify Upload ID Cluster or Tag

Interface URL

/open/import-id-cluster-modify?token=xxx&projectId=102&clusterId=970&displayName=xxx&remarks=xxx&mainColumnName=xxx

Request method

POST

Content-Type

text/csv

Request Query Parameter

Parameter name Sample value Parameter type Is required Parameter description
token xxx String Yes token
projectId 102 Integer Yes Project ID
clusterId Integer Yes Cluster ID
clusterName String Yes Group name
displayName String No Cluster display name (maximum 50 characters)
mainColumnName String No Clustering association attribute
remarks String No Cluster remarks

Successful Response Example

{
    "data": "",
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information
data Object Return result

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

Example Curl (trace.txt delete the Send/Recv description line)

[root@ta1 ~]# curl --trace-ascii trace.txt --header 'Content-Type: text/csv' --data-binary '@test.csv' 'http://ta2:8992/open/import-id-cluster-modify?token=bTOzKiTIozG4e19FgXphcA8dDV3DIY8RwdHTO7aSnBsRqSNaIk19BnBMecJDWibD&projectId=102&clusterId=1889&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 10.81.129.35...
== Info: Connected to ta2 (10.81.129.35) port 8992 (#0)
0000: POST /open/import-id-cluster-modify?token=bTOzKiTIozG4e19FgXphcA
0040: 8dDV3DIY8RwdHTO7aSnBsRqSNaIk19BnBMecJDWibD&projectId=102&cluster
0080: Id=1889&displayName=xxxx&mainColumnName=%23account_id HTTP/1.1
00c0: User-Agent: curl/7.29.0
00d9: Host: ta2:8992
00e9: Accept: */*
00f6: Content-Type: text/csv
010e: Content-Length: 43
0122:
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:12:58 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

# Modify Upload ID Cluster or Tag

Interface 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 Parameter

Parameter name Sample value Parameter type Is required Parameter description
token xxx String Yes token
projectId 102 Integer Yes Project ID
clusterName recent_7_days_consume String Yes Group name
displayName String No Cluster display name (maximum 50 characters)
mainColumnName String No Clustering association attribute
remarks String No Cluster remarks

Successful Response Example

{
    "data": "",
    "return_code": 0,
    "return_message": "success"
}
Parameter name Sample value Parameter type Parameter description
return_code 0 Integer Return code
return_message success String Return information
data Object Return result

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