유저 코호트 및 태그 API
호출 방법은 Open API 문서의 호출 방법 설명을 참고하십시오.
1. 조건 코호트 또는 태그 추가
인터페이스 URL
/open/user-cluster-add?token=xxx
요청 방식
POST
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
아래에서 경우별로 요청 body 예시를 보여 줍니다.
1. 조건 코호트 추가
요청 Body 파라미터
{
"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"
}
}
| $$파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
| projectId | 102 | String | 예 | 프로젝트 ID |
| clusterName | recent_7_days_consume | String | 예 | 코호트 이름(문자와 숫자만 사용할 수 있으며 길이는 24자를 초과할 수 없음) |
| clusterCatalog | catalog_cluster | String | 아니요 | 코호트 분류
|
clusterType | cluster_by_static_condition | String | 아니요 | 코호트 타입
|
| displayName | recent_7_days_consume | String | 예 | 코호트 표시 이름(최대 50자) |
| qp | - | Object | 아니요 | 코호트 정의 |
| qp.events | - | List | 아니요 | 참여 이벤트 조건 목록 |
| qp.events.comparator | greater | String | 예 | 모델 조회 API의 필터 표현식에 있는 연산자 설명 참고 |
| qp.events.eventName | consume_item | String | 예 | 이벤트 이름 |
| qp.events.num | 4 | String | 아니요 | 필터 값 |
| qp.events.recentDay | 1-7 | String | 아니요 | 상대 시간 |
| qp.events.taPropQuota | - | Object | 예 | 이벤트 지표 |
| qp.events.taPropQuota.analysis | TIMES | String | 아니요 | 분석 관점. 이벤트 분석 모델 API의 집계 방법 analysis 값 목록 참고 |
| qp.event_relation | and | String | 아니요 | 참여 이벤트 조건 간의 논리 관계(and, or) |
| qp.filts | - | List | 아니요 | 유저 속성 조건 목록 |
| qp.filts.columnName | user_level | String | 예 | 필드 이름 |
| qp.filts.comparator | equal | String | 모델 조회 API의 필터 표현식에 있는 연산자 설명 참고 | |
| qp.filts.ftv | ["3"] | List | 아니요 | 필터 값 리스트 |
| qp.filts.tableType | user | String | 예 | user: 유저 속성 |
| qp.relation | and | String | 아니요 | 유저 속성 조건 간의 논리 관계 |
| qp.event_user_relation | and | String | 아니요 | 참여 이벤트 조건 목록과 유저 속성 조건 목록 간의 논리 관계 |
조건 태그 추가
subConditionTabType 필드 설명:
| 필드 | 설명 |
|---|---|
| tag_condition_default | 조건 태그 |
| tag_condition_by_firstlast_event | 첫 번째/마지막 태그 |
| tag_condition_by_quotation | 지표값 태그 |
tagQp 필드에는 태그 정의가 포함되며, 태그 타입에 따라 사용하는 필드가 다릅니다.
| 필드 | 설명 |
|---|---|
| userTagValueDefs | 조건 태그 |
| userTagConFirstLastEventDef | 첫 번째/마지막 태그 |
2. 조건 태그
userTagValueDefs 필드 설명:
| 필드 | 설명 |
|---|---|
| tagValue | 태그 값 |
| userClusterDef | 태그 값 매칭 정의. 필드 정의는 UserClusterDef 참고 |
- Request body (application/json)
{
"projectId": 102,
"clusterName": "tag_20200615_1",
"clusterCatalog": "catalog_tag",
"clusterType": "tag_by_static_condition",
"subConditionTabType" : "tag_condition_default",
"displayName": "태그_20200615_1",
"tagQp": {
"userTagValueDefs": [
{
"tagRemark": "",
"tagValue": "태그 값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": "태그 값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. 첫 번째/마지막 태그
- 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": "태그_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부터 지원)
- 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": "태그_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"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| data | 970 | Object | 성공 건수 |
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
2. 코호트 또는 태그 상세 정보 조회
clusterName으로 상세 정보를 조회합니다.
인터페이스 URL
/open/user-cluster-detail?token=xxx&projectId=102&clusterName=recent_7_days_consume
요청 방식
GET
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| clusterName | recent_7_days_consume | String | 예 | 코호트 이름 |
성공 응답 예시
{
"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"
}
| $$파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
| data | - | Object | 반환 결과 |
| data.clusterName | recent_7_days_consume | String | 코호트 이름 |
| data.clusterType | cluster_by_static_condition | String | 코호트 타입
|
| data.displayName | recent_7_days_consume | String | 코호트 표시 이름 |
| data.id | 970 | Integer | 코호트 ID |
| data.progress | 1 | Integer | 작업 실행 진행률. 100은 실행 성공, 0-99는 현재 계산 진행률, -1은 실행 실패를 나타냄 |
| data.projectId | 102 | Integer | 소속 프로젝트 ID |
| data.refreshTime | 2020-01-10 10:51:14 | String | 코호트 새로고침 시간 |
| data.userId | 13 | Integer | 코호트 소유자의 userId |
| data.usersNum | 0 | Integer | 코호트 유저 수 |
| data.userClusterDef | - | Object | 조건 코호트 정의 |
| data.userClusterDef.event_relation | and | String | 수행한 이벤트 속성 목록의 필터 조건 논리 관계 |
| data.userClusterDef.event_user_relation | and | String | 수행한 이벤트와 유저 속성 간의 필터 조건 논리 관계 |
| data.userClusterDef.events | - | List | 수행한 이벤트 조건 목록 |
| data.userClusterDef.events.comparator | greater | String | 모델 조회 API의 필터 표현식에 있는 연산자 설명 참고 |
| data.userClusterDef.events.endTime | 2020-01-09 00:00:00 | String | 종료 시간 |
| data.userClusterDef.events.eventName | consume_item | String | 이벤트 이름 |
| data.userClusterDef.events.num | 4 | String | |
| data.userClusterDef.events.recentDay | 1-7 | String | 상대 시간 |
| data.userClusterDef.events.startTime | 2020-01-03 00:00:00 | String | 시작 시간 |
| data.userClusterDef.events.taPropQuota | - | Object | 이벤트 지표 |
| data.userClusterDef.events.taPropQuota.analysis | TIMES | String | 분석 관점. 이벤트 분석 모델 API의 집계 방법 analysis 값 목록 참고 |
| data.userClusterDef.filts | - | List | 유저 속성 조건 목록 |
| data.userClusterDef.filts.columnName | String | user_level | 필드 이름 |
| data.userClusterDef.filts.comparator | String | equal | 모델 조회 API의 필터 표현식에 있는 연산자 설명 참고 |
| data.userClusterDef.filts.ftv | List | ["3"] | 필터 값 리스트 |
| data.userClusterDef.filts.tableType | user | String | event: 이벤트 속성, user: 유저 속성 |
| data.userClusterDef.relation | and | String | 유저 속성 목록의 필터 조건 논리 관계 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
| 결과 필드 | 설명 |
|---|---|
| userClusterDef | 코호트 정의. qp와 동일 |
| userTagDef | 태그 정의. tagQp와 동일 |
3. 이름으로 조건 코호트 또는 태그 정의 업데이트
인터페이스 URL
/open/user-cluster-update-by-name?token=xxx&projectId=xxx&clusterName= recent_7_days_consume
요청 방식
POST
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| clusterName | recent_7_days_consume | String | 예 | 코호트 이름 |
요청 Body 파라미터
{
"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"
}
}
파라미터 설명은 조건 코호트 또는 태그 추가 API와 동일합니다.
성공 응답 예시
{
"return_code": 0,
"return_message": "success"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
4. 이름으로 코호트 또는 태그 삭제
인터페이스 URL
/open/delete-user-cluster-by-name?token=xxx&projectId=102&clusterName= recent_7_days_consume
요청 방식
POST
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| clusterName | recent_7_days_consume | Integer | 예 | 코호트 이름 |
성공 응답 예시
{
"return_code": 0,
"return_message": "success"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
5. 코호트 및 태그 목록 조회
인터페이스 URL
/open/user-cluster-list?token=xxx
요청 방식
POST
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
요청 Body 파라미터
{
"clusterCatalog": "catalog_cluster",
"clusterName": "test001",
"clusterTypes": [
"cluster_by_dynamic_condition",
"cluster_by_static_condition"
],
"pagerHeader": {
"pageNum": 1,
"pageSize": 10
},
"projectId": 102
}
| $$파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| clusterCatalog | catalog_cluster | String | 예 | 코호트 분류, 선택 가능한 값: catalog_cluster(코호트), catalog_tag(태그) |
| clusterName | test001 | String | 아니요 | 코호트/태그 이름 퍼지 검색 |
| clusterTypes | ["cluster_by_dynamic_condition"] | List | 아니요 | 코호트 타입. 가능한 값은 다음과 같습니다. 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 | 예 | 페이지 정보 |
| pagerHeader.pageNum | 1 | Integer | 아니요 | 페이지 번호 |
| pagerHeader.pageSize | 10 | Integer | 아니요 | 페이지 크기 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
성공 응답 예시
{
"data": {
"pagerResult": {
"pageNum": 1,
"pageSize": 10,
"totalNum": 2
},
"userClusters": [
{
"clusterCatalog": "catalog_cluster",
"clusterName": "xuzz_ces",
"clusterType": "cluster_by_static_condition",
"displayName": "유저 수",
"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": "자동화 테스트__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": "자동화 테스트__sync",
"usersNum": 5603
}
]
},
"return_code": 0,
"return_message": "success"
}
| $$파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
| data | - | Object | 반환 결과 |
| data.pagerResult | - | Object | 페이지 결과 |
| data.pagerResult.pageNum | 1 | Integer | 현재 페이지 |
| data.pagerResult.pageSize | 10 | Integer | 페이지당 항목 수 |
| data.pagerResult.totalNum | 2 | Integer | 총 항목 수 |
| data.userClusters | - | Object | 코호트 목록 |
| data.userClusters.clusterCatalog | catalog_cluster | String | 코호트 분류
|
| data.userClusters.clusterName | xuzz_ces | String | 코호트 이름 |
| data.userClusters.clusterType | cluster_by_static_condition | String | 코호트 타입
|
| data.userClusters.displayName | 유저 수 | String | 코호트 표시 이름 |
| data.userClusters.historyDataStatus | 0 | Integer | 이전 버전 데이터 존재 여부 |
| data.userClusters.id | 905 | Integer | 코호트 ID |
| data.userClusters.mainColumnName | String | ID 코호트 연관 속성 | |
| data.userClusters.progress | 100 | Integer | 작업 실행 진행률. 100은 실행 성공, 0-99는 현재 계산 진행률, -1은 실행 실패를 나타냄 |
| data.userClusters.projectId | 102 | Integer | 소속 프로젝트 ID |
| data.userClusters.refreshDelay | 0 | Long | 코호트 새로고침 지연 |
| data.userClusters.refreshTime | 2019-11-01 15:08:31 | String | 코호트 새로고침 시간 |
| data.userClusters.remarks | 2134 | String | 코호트 비고 |
| data.userClusters.selectType | string | String | 태그 타입 |
| data.userClusters.status | 1 | Integer | 코호트 상태. 0: 유효하지 않음, 1: 유효 |
| data.userClusters.uploadFileName | String | 업로드 파일 이름 | |
| data.userClusters.userId | 108 | Integer | 코호트 소유자의 userId |
| data.userClusters.userName | 자동화 테스트__sync | String | 코호트 소유자의 userName |
| data.userClusters.usersNum | 4665 | Integer | 코호트 유저 수 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
6. 이름으로 조건 코호트 또는 태그 새로고침
인터페이스 URL
/open/user-cluster-refresh-by-name?token=xxx&projectId=102&clusterName=recent_7_days_consume
요청 방식
POST
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| clusterName | recent_7_days_consume | String | 예 | 코호트 이름 |
성공 응답 예시
{
"return_code": 0,
"return_message": "success"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
7. 새로고침 진행률 조회
새로고침을 제출한 후 새로고침 진행률을 조회할 수 있습니다.
/open/user-cluster-refresh-progress-by-name?token=xxx&projectId=102&clusterName=recent_7_days_consume
요청 방식
GET
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| clusterName | recent_7_days_consume | String | 예 | 코호트 이름 |
성공 응답 예시
{
"data": {
"progress": 80,
},
"return_code": 0,
"return_message": "success"
}
| $$파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| data | - | Object | 반환 결과 |
| data.progress | 100 | Integer | 값 범위 [0, 100], 100은 새로고침 완료를 의미 |
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
8. 업로드 ID 코호트 또는 태그 생성
인터페이스 URL
/open/import-id-cluster-add?token=xxx&projectId=102&displayName=xxxx&mainColumnName=#account_id
요청 방식
POST
Content-Type
text/csv
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| displayName | xxx | String | 예 | 코호트 표시 이름(최대 50자) |
| mainColumnName | #account_id | String | 예 | 코호트 연관 속성 |
| clusterCatalog | String | 아니요 | 코호트 분류: catalog_cluster, catalog_tag. 기본값은 catalog_cluster | |
| clusterName | String | 아니요 | 코호트 이름(최대 24자). 영문자와 숫자로 구성되며, 입력하지 않으면 시스템에서 생성 | |
| remarks | String | 아니요 | 코호트 비고 |
성공 응답 예시
{
"data": {
"clusterId": 1889,
"tagValueNullNum": 0,
"unmatchedNum": 0,
"uploadNum": 5,
"userNum": 5
},
"return_code": 0,
"return_message": "success"
}
| $$파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
| data | Object | 반환 결과 | |
| data.clusterId | 1889 | Integer | 유저 코호트 ID |
| data.tagValueNullNum | 0 | Integer | Tag 값이 null인 행 수 |
| data.unmatchedNum | 0 | Integer | 매칭되지 않은 레코드 수 |
| data.uploadNum | 5 | Integer | 업로드 레코드 수 |
| data.userNum | 5 | Integer | 코호트 인원수 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
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=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. 이름으로 업로드 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
Content-Type
text/csv
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| clusterName | recent_7_days_consume | String | 예 | 코호트 이름 |
| displayName | String | 아니요 | 코호트 표시 이름(최대 50자) | |
| mainColumnName | String | 아니요 | 코호트 연관 속성 | |
| remarks | String | 아니요 | 코호트 비고 |
성공 응답 예시
{
"data": "",
"return_code": 0,
"return_message": "success"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
| data | Object | 반환 결과 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |
10. 태그 날짜 버전 비동기 일괄 새로고침
인터페이스 URL
/open/tag-date-batch-refresh?token=xxx&projectId=102&tagName= tag_123
요청 방식
POST
Content-Type
application/json
요청 Query 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| token | xxx | String | 예 | 조회 키 |
| projectId | 102 | Integer | 예 | 프로젝트 ID |
| tagName | tag_123 | String | 예 | 태그 이름 |
요청 Body 파라미터
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 필수 여부 | 파라미터 설명 |
|---|---|---|---|---|
| startDate | 2022-12-01 | String | 예 | 시작 날짜 |
| endDate | 2022-12-31 | String | 예 | 종료 날짜 |
| onlyAbnormal | true | Boolean | 아니요 | 비정상 버전만 계산. 기본값은 아니요 |
| useUserTableType | user_table | String | 아니요 | 유저 테이블 사용 타입. 열거형 값은 다음과 같습니다. user_table 유저 테이블 사용 user_backup_table_default 유저 스냅샷 테이블 사용(비어 있으면 기본적으로 유저 테이블 사용) user_backup_table_last_date 유저 스냅샷 테이블 사용(비어 있으면 이후 가장 가까운 비어 있지 않은 날짜 사용) 기본값은 user_backup_table_default |
eg:
{
"startDate": "2022-12-01",
"endDate": "2022-12-31",
"onlyAbnormal": true,
"useUserTableType": "user_table"
}
성공 응답 예시
{
"return_code": 0,
"return_message": "success"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | 0 | Integer | 반환 코드 |
| return_message | success | String | 반환 정보 |
오류 응답 예시
{
"return_code": -1008,
"return_message": "파라미터(token)가 비어 있습니다"
}
| 파라미터 이름 | 예시 값 | 파라미터 타입 | 파라미터 설명 |
|---|---|---|---|
| return_code | -1008 | Integer | 반환 코드 |
| return_message | 파라미터(token)가 비어 있습니다 | String | 반환 정보 |

