テーブル作成

新しいテーブルを作成します。本操作にはテーブル管理者権限が必要です。

必要な権限

ADMIN以上のロールが必要です。

HTTPリクエスト

POST /api/sonar/tables
cURL例
curl -H "Authorization: Bearer <API_KEY>" \
     -d table=demo \
     -d compression=snappy \
     -d layout=columnar \
     -d retention=365 \
     -X POST \
     https://HOSTNAME/api/sonar/tables
リクエストパラメータ
キー必須説明備考
table文字列テーブル名最小1文字、最大50文字
compression×文字列圧縮アルゴリズムdeflate または snappy。デフォルトは snappy
layout×文字列ブロックレイアウトrow または columnar。デフォルトは columnar
crypto_profile_guid×文字列暗号化プロファイルGUID36文字のGUID
encryption×ブール値暗号化利用有無デフォルトは false(完全性検証のみ)
retention×32ビット整数日単位の保持期間最小 0(無制限)、最大 36500。デフォルトは 0
group_guid×文字列テーブルグループGUID36文字のGUID
Note
テーブル名は英字で始める必要があり、英大文字・小文字、数字、アンダースコア(_)、ハイフン(-)のみ使用可能です。

正常応答

{}

エラー応答

tableが未指定の場合

HTTPステータスコード 400 応答

{
  "error_code": "null-argument",
  "error_msg": "table should be not null"
}
table値の長さが不正な場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-argument",
  "error_msg": "'table' must be shorter than or equal to 50 characters."
}
table名が規則に違反している場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-argument",
  "error_msg": "'table' must begin with a letter and may contain alphanumeric and underscore characters: 0123"
}
compression値が不正な場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-argument",
  "error_msg": "'compression' should be one of deflate or snappy."
}
layout値が不正な場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-argument",
  "error_msg": "'layout' should be one of row or columnar."
}
crypto_profile_guidがGUID形式でない場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-param-type",
  "error_msg": "crypto_profile_guid should be guid type."
}
retention値が範囲外の場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-argument",
  "error_msg": "'retention' must be less than or equal to 36500."
}
group_guidがGUID形式でない場合

HTTPステータスコード 400 応答

{
  "error_code": "invalid-param-type",
  "error_msg": "group_guid should be guid type."
}
テーブル名が重複している場合

HTTPステータスコード 500 応答

{
  "error_code": "illegal-state",
  "error_msg": "duplicated table name: demo"
}
暗号化プロファイルが存在しない場合

HTTPステータスコード 500 応答

{
  "error_code": "illegal-state",
  "error_msg": "crypto profile not found: 6f238ab0-7c11-4dc3-9543-ebb3d1cdde12"
}
テーブルグループが存在しない場合

HTTPステータスコード 500 応答

{
  "error_code": "illegal-state",
  "error_msg": "table group not found: 54157629-74f7-4d80-be5a-8cb8f0c71087"
}
テーブル作成権限がない場合

HTTPステータスコード 500 応答

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}