# Insightsモデルエンドポイント リファレンス

これらのRESTエンドポイントを使用して、Treasure Insightsデータモデルを構築および保守します。

各例のリージョンタブを選択して、お使いのサイトの正しいベースURLを使用してください。

## Insightsモデルの作成/読み取り/削除

### アカウントのInsightsモデルのリストを取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>"
```

### ビルドおよびクエリリソース制限サイズの取得

ElastiCubeデータモデル、ビルド、およびダッシュボード/クエリは、RAMとCPUの一定の上限(最大23 GB)に関連付けられているため、データモデルのビルドがその制限を超えると、ユーザーにエラーが表示されます。

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/account" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/account" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/account" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/account" \
  -H "Authorization: TD1 <your_api_key>"
```

#### サンプルレスポンス

GBでのクエリとダッシュボードの制限を表示し、特に`build_size`と`query_size`パラメーターに注意してください。

```json
{
        "id": "<id>",
        "sisense_group_id": "<sisense_group_id>",
        "td_account_id": "<td_account_id>",
        "max_data_modelers": 5,
        "max_designers": 10,
        "max_viewers": 20,
        "storage_size": 20,
        "storage_threshold": 500,
        "build_threshold": 100,
        "query_threshold": 100,
        "sisense_datagroup_oid": "<sisense_datagroup_oid>",
        "sisense_hostname": "<sisense_hostname>",
        "build_size": 23.0,
        "query_size": 23.0,
        "calculated_build_size": 23.0,
        "calculated_query_size": 23.0,
        "current_data_modelers": 4,
        "current_designers": 2,
        "current_viewers": 4
}
```

### 特定のInsightsモデル設定の取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

### 新しいInsightsモデルの作成

US
```bash
curl -X POST \
  "https://api.treasuredata.com/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<model_name>",
    "apikey": "<your_api_key>",
    "type": "elasticube",
    "description": "<description>"
  }'
```

Japan
```bash
curl -X POST \
  "https://api.treasuredata.co.jp/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<model_name>",
    "apikey": "<your_api_key>",
    "type": "elasticube",
    "description": "<description>"
  }'
```

EU
```bash
curl -X POST \
  "https://api.eu01.treasuredata.com/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<model_name>",
    "apikey": "<your_api_key>",
    "type": "elasticube",
    "description": "<description>"
  }'
```

Korea
```bash
curl -X POST \
  "https://api.ap02.treasuredata.com/reporting/datamodels" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<model_name>",
    "apikey": "<your_api_key>",
    "type": "elasticube",
    "description": "<description>"
  }'
```

| パラメーター | 必須 | 説明 |
|  --- | --- | --- |
| `name` | 必須 | モデル名 |
| `apikey` | 必須 | アカウントのAPIキー |
| `type` | 必須 | モデルタイプ。`elasticube` を指定。 |
| `description` | 任意 | モデルの説明 |


### 既存のInsightsモデルの削除

US
```bash
curl -X DELETE \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X DELETE \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X DELETE \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X DELETE \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

## Insightsモデル共有の更新

### ユーザーとInsightsモデルを共有

US
```bash
curl -X PUT \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/shares" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": ["<user1@example.com>", "<user2@example.com>"]
  }'
```

Japan
```bash
curl -X PUT \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/shares" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": ["<user1@example.com>", "<user2@example.com>"]
  }'
```

EU
```bash
curl -X PUT \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/shares" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": ["<user1@example.com>", "<user2@example.com>"]
  }'
```

Korea
```bash
curl -X PUT \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/shares" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": ["<user1@example.com>", "<user2@example.com>"]
  }'
```

| パラメーター | 必須 | 説明 |
|  --- | --- | --- |
| `emails` | 任意 | 共有するユーザーのメールアドレスのリスト。省略した場合、アカウントの全メンバーと共有されます。モデルオーナーのメールアドレスを必ず含める必要があります。 |


この操作はべき等です — 指定したリストが現在の共有設定を完全に上書きします。

## データセットの作成/読み取り/削除

### Insightsモデル内のデータセットのリストを取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>"
```

### 新しいInsightsモデルデータセットの作成

US
```bash
curl -X POST \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<dataset_name>",
    "definition": {
      "type": "presto",
      "database": "<database_name>",
      "tables": {
        "<table_name>": {
          "columns": {
            "<column_name>": { "type": "<column_type>" }
          }
        }
      }
    }
  }'
```

Japan
```bash
curl -X POST \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<dataset_name>",
    "definition": {
      "type": "presto",
      "database": "<database_name>",
      "tables": {
        "<table_name>": {
          "columns": {
            "<column_name>": { "type": "<column_type>" }
          }
        }
      }
    }
  }'
```

EU
```bash
curl -X POST \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<dataset_name>",
    "definition": {
      "type": "presto",
      "database": "<database_name>",
      "tables": {
        "<table_name>": {
          "columns": {
            "<column_name>": { "type": "<column_type>" }
          }
        }
      }
    }
  }'
```

Korea
```bash
curl -X POST \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<dataset_name>",
    "definition": {
      "type": "presto",
      "database": "<database_name>",
      "tables": {
        "<table_name>": {
          "columns": {
            "<column_name>": { "type": "<column_type>" }
          }
        }
      }
    }
  }'
```

| パラメーター | 必須 | 説明 |
|  --- | --- | --- |
| `name` | 必須 | データセット名 |
| `definition.type` | 必須 | データソースタイプ。`presto` を指定。 |
| `definition.database` | 必須 | Treasure Data のデータベース名 |
| `definition.tables` | 必須 | テーブル定義。キーはテーブル名。 |


### Insightsモデルデータセットの削除

US
```bash
curl -X DELETE \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X DELETE \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X DELETE \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X DELETE \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

## テーブルの作成/読み取り/更新/削除

### データセット内のテーブルのリストを取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>"
```

### データセットに新しいテーブルを作成

US
```bash
curl -X POST \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" },
        "<another_column>": { "type": "<column_type>", "hidden": true },
        "<indexed_column>": { "type": "<column_type>", "indexed": true }
      }
    }
  }'
```

Japan
```bash
curl -X POST \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" },
        "<another_column>": { "type": "<column_type>", "hidden": true },
        "<indexed_column>": { "type": "<column_type>", "indexed": true }
      }
    }
  }'
```

EU
```bash
curl -X POST \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" },
        "<another_column>": { "type": "<column_type>", "hidden": true },
        "<indexed_column>": { "type": "<column_type>", "indexed": true }
      }
    }
  }'
```

Korea
```bash
curl -X POST \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" },
        "<another_column>": { "type": "<column_type>", "hidden": true },
        "<indexed_column>": { "type": "<column_type>", "indexed": true }
      }
    }
  }'
```

#### リクエストパラメーター

| パラメーター | 必須 | 説明 |
|  --- | --- | --- |
| `name` | 必須 | テーブル名 |
| `definition.columns` | 必須 | カラム定義。キーはカラム名。 |


#### カラムタイプ

| タイプ | 説明 |
|  --- | --- |
| `int` | 整数 |
| `float` | 浮動小数点数 |
| `string` | 短いテキスト |
| `text` | 長いテキスト |
| `datetime` | 日付と時刻 |
| `timestamp` | Unixタイムスタンプ または ISO 8601 文字列 |


#### カラムオプション

| オプション | タイプ | 説明 |
|  --- | --- | --- |
| `type` | string | カラムタイプ（必須） |
| `hidden` | boolean | ダッシュボードでカラムを非表示にする。デフォルト: `false` |
| `indexed` | boolean | フィルタリングを高速化するためにカラムをインデックス化する。デフォルト: `false` |


### データセット内の既存のテーブルを更新

US
```bash
curl -X PUT \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" }
      }
    }
  }'
```

Japan
```bash
curl -X PUT \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" }
      }
    }
  }'
```

EU
```bash
curl -X PUT \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" }
      }
    }
  }'
```

Korea
```bash
curl -X PUT \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "<table_name>",
    "definition": {
      "columns": {
        "<column_name>": { "type": "<column_type>" }
      }
    }
  }'
```

`columns`フィールドは既存の定義にマージされます。送信したカラムのみが更新または追加されます。[カラムタイプ](#%E3%82%AB%E3%83%A9%E3%83%A0%E3%82%BF%E3%82%A4%E3%83%97)および[カラムオプション](#%E3%82%AB%E3%83%A9%E3%83%A0%E3%82%AA%E3%83%97%E3%82%B7%E3%83%A7%E3%83%B3)を参照してください。

### データセット内の既存のテーブルを削除

US
```bash
curl -X DELETE \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X DELETE \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X DELETE \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X DELETE \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/datasets/<dataset_id>/tables/<table_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

## リレーションの作成/読み取り/削除

### Insightsモデルリレーションのリストを取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>"
```

### Insightsモデルの新しいリレーションを作成

US
```bash
curl -X POST \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": [
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" },
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" }
    ]
  }'
```

Japan
```bash
curl -X POST \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": [
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" },
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" }
    ]
  }'
```

EU
```bash
curl -X POST \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": [
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" },
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" }
    ]
  }'
```

Korea
```bash
curl -X POST \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/relations" \
  -H "Authorization: TD1 <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": [
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" },
      { "dataset": "<dataset_name>", "table": "<table_name>", "column": "<column_name>" }
    ]
  }'
```

### 既存のリレーションを削除

US
```bash
curl -X DELETE \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/relations/<relation_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X DELETE \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/relations/<relation_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X DELETE \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/relations/<relation_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X DELETE \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/relations/<relation_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

## Insightsモデルビルドの作成/読み取り/削除

### Insightsモデルビルドのリストを取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

### Insightsモデルのビルドステータスを取得

US
```bash
curl -X GET \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X GET \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X GET \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X GET \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

### Insightsモデルのビルドをトリガー

US
```bash
curl -X POST \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X POST \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X POST \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X POST \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/builds" \
  -H "Authorization: TD1 <your_api_key>"
```

### Insightsモデルのビルドを停止

US
```bash
curl -X DELETE \
  "https://api.treasuredata.com/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Japan
```bash
curl -X DELETE \
  "https://api.treasuredata.co.jp/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

EU
```bash
curl -X DELETE \
  "https://api.eu01.treasuredata.com/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```

Korea
```bash
curl -X DELETE \
  "https://api.ap02.treasuredata.com/reporting/datamodels/<datamodel_id>/builds/<build_id>" \
  -H "Authorization: TD1 <your_api_key>"
```