コホートとタグ 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 | First or lastタグ |
| tag_condition_by_quotation | 指標値タグ |
tagQpフィールドにはタグ定義が含まれます。タグのタイプによって使用するフィールドが異なります:
| フィールド | 説明 |
|---|---|
| userTagValueDefs | カスタム条件タグ |
| userTagConFirstLastEventDef | First or lastタグ |
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.First or lastタグ
- 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 | 1ページあたりの件数 |
| 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 | リターンメッセージ |

