테이블 파티션 삭제
지정한 날짜 구간의 테이블 데이터를 삭제합니다. 이 작업은 관리자 권한을 요구합니다.
HTTP 요청
DELETE /api/sonar/tables/:table/partitions
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE "https://HOSTNAME/api/sonar/tables/demo/partitions?start=2022-01-01&end=2022-12-31"
요청 매개변수
경로 매개변수
| 키 | 타입 | 설명 | 비고 |
|---|---|---|---|
| table | 문자열 | 테이블 이름 | 최소 1자, 최대 50자 |
요청 본문 매개변수
| 키 | 필수 | 타입 | 설명 | 비고 |
|---|---|---|---|---|
| start | O | 문자열 | 시작 날짜 | yyyy-MM-dd 형식 |
| end | O | 문자열 | 끝 날짜 | 마지막 날짜 포함하여 삭제. yyyy-MM-dd 형식 |
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"
}
start가 누락된 경우
HTTP 상태 코드 400 응답
{
"error_code": "null-argument",
"error_msg": "start should be not null"
}
end가 누락된 경우
HTTP 상태 코드 400 응답
{
"error_code": "null-argument",
"error_msg": "end should be not null"
}
start, end의 날짜 형식이 잘못된 경우
HTTP 상태 코드 400 응답
{
"error_code": "invalid-argument",
"error_msg": "'end' should be yyyy-MM-dd format."
}
start 날짜가 end 날짜보다 큰 경우
HTTP 상태 코드 400 응답
{
"error_code": "invalid-argument",
"error_msg": "date range is unacceptable."
}
테이블이 존재하지 않는 경우
HTTP 상태 코드 500 응답
{
"error_code": "illegal-state",
"error_msg": "table not found: test"
}
테이블 파티션 삭제 권한이 없는 경우
HTTP 상태 코드 500 응답
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}