테이블 보관 주기 설정
테이블 보관 주기를 설정합니다.
HTTP 요청
POST /api/database/tables/:table/retention
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
-d "retention=10" \
-X POST https://HOSTNAME/api/database/tables/target1/retention
요청 매개변수
| 키 | 필수 | 타입 | 이름 | 비고 |
|---|---|---|---|---|
| retention | O | 32비트 정수 | 보관 일수 | 무제한 시 0 지정 |
정상 응답
{}
오류 응답
보관 일수가 누락된 경우
{
"error_code": "null-argument",
"error_msg": "retention should be not null"
}
보관 일수를 정수로 지정하지 않은 경우
{
"error_code": "invalid-argument",
"error_msg": "'retention' parameter should be int type"
}
보관 일수 허용 범위를 넘은 경우
음수 혹은 10만 이상의 기간을 허용하지 않습니다.
{
"error_code": "invalid-retention",
"error_msg": null
}
설정 변경 권한이 없는 경우
{
"error_code": "security-violation",
"error_msg": "logdb management is not allowed to user"
}
테이블이 존재하지 않는 경우
{
"error_code": "table-not-found",
"error_msg": null
}