테이블 삭제
지정된 테이블을 삭제합니다. 이 작업은 관리자 권한을 요구합니다.
필요 권한
관리자 이상의 계정으로 이용할 수 있습니다.
HTTP 요청
DELETE /api/sonar/tables/:table
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE https://HOSTNAME/api/sonar/tables/demo
요청 매개변수
| 키 | 필수 | 타입 | 설명 | 비고 |
|---|---|---|---|---|
| table | O | 문자열 | 테이블 이름 | 최소 1자, 최대 50자 |
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"
}
테이블이 존재하지 않는 경우
HTTP 상태 코드 500 응답
{
"error_code": "illegal-state",
"error_msg": "table not found: test"
}
테이블이 수집기에서 사용 중인 경우
HTTP 상태 코드 200 failure 객체와 함께
{
"failure": {
"loggers": ["logger1", "logger2"],
"message": "table used in loggers"
}
}
테이블 삭제 권한이 없는 경우
HTTP 상태 코드 500 응답
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}