테이블 생성

새 테이블을 생성합니다.

필요 권한

관리자 이상의 계정으로 이용할 수 있습니다.

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
요청 매개변수
필수타입설명비고
tableO문자열테이블 이름최소 1자, 최대 50자
compressionX문자열압축 알고리즘deflate 또는 snappy. 기본값: snappy
layoutX문자열블록 레이아웃row 또는 columnar. 기본값: columnar
crypto_profile_guidX문자열암호화 프로파일 GUID36자 GUID. encryption과 함께 지정 불가
encryptionX불리언암호화 사용 여부false이면 무결성 검증만 수행
retentionX32비트 정수일 단위 보관 주기최소 0 (무제한), 최대 36500. 기본값: 0
group_guidX문자열테이블 그룹 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 name must begin with a letter and may contain alphanumeric and underscore characters: 0123"
}
retention 값이 범위를 벗어난 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'retention' must be less than or equal to 36500."
}
layout 값이 잘못된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'layout' should be one of row or columnar."
}
compression 값이 잘못된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'compression' should be one of deflate or snappy."
}
crypto_profile_guid 또는 group_guid가 GUID 형식이 아닌 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-param-type",
  "error_msg": "crypto_profile_guid should be guid type."
}
crypto_profile_guid와 encryption을 함께 지정한 경우

HTTP 상태 코드 400 응답

{
  "error_code": "invalid-argument",
  "error_msg": "'crypto_profile_guid' and 'encryption' cannot be used together"
}
테이블 이름이 중복된 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "duplicated table name: demo"
}
암호화를 사용하도록 지정했으나 등록된 암호화 프로파일이 없는 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "registered crypto profile not found"
}
테이블 그룹이 존재하지 않는 경우

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