menu
Is this helpful?

# 유저 코호트 및 태그 API

호출 방법에 대해서는 오픈 API 문서의 호출 방법 설명을 참조하십시오.

# 1. 조건 코호트/태그 추가

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

Parameter name

Sample value

Parameter type

Is required

Parameter description

token

xxx

String

Yes

token

다음 예제는 다양한 상황에서의 요청 본문을 보여줍니다.

1. 조건 코호트 추가

요청 본문 파라미터

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

조건 태그 추가

SubConditionTabType 필드 설명:

Field

Description

tag_condition_default

Custom condition tag

tag_condition_by_firstlast_event

First and last feature tag

tagQp 필드에는 태그 정의가 포함됩니다. 다양한 유형의 태그는 서로 다른 필드를 사용합니다:

Field

Description

userTagValueDefs

Custom condition tag

userTagConFirstLastEventDef

First and last feature tag

2. 커스텀 조건 태그

UserTagValueDefs 필드 설명:

Field

Description

tagValue

Tag value

userClusterDef

Tag values match definitions, see UserClusterDef for field definitions

- 요청 본문 (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. 첫 번째/마지막 태그 기능

  • 요청 본문 (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. 지표 값 태그 (버전 3.2.1부터 지원)

  • 요청 본문 (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"
      }
    }
  }
}

성공적인 응답 예시

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

오류 응답 예시

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

# 2. 코호트/태그 세부 정보 조회

clusterId 또는 clusterName으로 세부 정보를 검색합니다.

인터페이스 URL

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

요청 방법

GET

콘텐츠 유형

application/json

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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

# 3. 조건 코호트/태그 정의 업데이트

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

Parameter name

Sample value

Parameter type

Is required

Parameter description

token

xxx

String

Yes

token

clusterId

970

integer

No

Cluster ID

요청 본문 파라미터

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

조건부 클러스터 또는 태그 추가 인터페이스의 파라미터 설명

성공적인 응답 예시

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

오류 응답 예시

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

# 4. 이름 업데이트 기준에 따른 코호트/태그 정의

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

Parameter name

Sample value

Parameter type

Is required

Parameter description

token

xxx

String

Yes

token

clusterId

970

integer

No

Cluster ID

요청 본문 파라미터

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

조건 코호트 또는 태그 추가 인터페이스의 파라미터 설명

성공적인 응답 예시

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

오류 응답 예시

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

# 5. 코호트/태그 삭제

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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

# 6. 이름으로 코호트/태그 삭제

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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

# 7. 코호트/태그 목록 조회

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

Parameter name

Sample value

Parameter type

Is required

Parameter description

token

xxx

String

Yes

token

요청 본문 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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

# 8. 조건 코호트/태그 새로 고침

인터페이스 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

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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

# 새로 고침 진행 상황 조회

새로 고침을 제출한 후, 새로 고침 진행 상황을 조회할 수 있습니다.

[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]

요청 방법

POST

콘텐츠 유형

application/json

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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

# 10. 업로드 ID 코호트/태그 생성

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

text/csv

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

{
    "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에서 Send/Recv 설명 줄 삭제)

[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

# 11. 업로드 ID 코호트/태그 수정

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

text/csv

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

{
    "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에서 Send/Recv 설명 줄 삭제)

[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

# 12. 업로드 ID 코호트/태그 이름 수정

인터페이스 URL

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

요청 방법

POST

콘텐츠 유형

text/csv

요청 쿼리 파라미터

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

성공적인 응답 예시

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

오류 응답 예시

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