앱 활성화

지정한 앱을 활성화합니다. 앱은 앱 비활성화 API로 다시 비활성화할 수 있으며, 앱 목록은 앱 목록 조회 API로 확인할 수 있습니다.

필요 권한

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

HTTP 요청

POST /api/sonar/apps/enable
cURL 예시
curl -H "Authorization: Bearer <API_KEY>" \
     -d 'app_code=logpresso-sample-app' \
     -X POST \
     https://HOSTNAME/api/sonar/apps/enable
요청 매개변수
필수타입설명비고
app_codeO문자열활성화할 앱 코드

정상 응답

{}

오류 응답

app_code가 누락된 경우

HTTP 상태 코드 400 응답

{
  "error_code": "null-argument",
  "error_msg": "app_code should be not null"
}
앱 코드가 비어 있는 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "invalid app code: app code-[]"
}
앱이 설치되어 있지 않은 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "app is not installed in db: app code-[logpresso-sample-app]"
}
이미 활성화된 앱인 경우

HTTP 상태 코드 500 응답

{
  "error_code": "illegal-state",
  "error_msg": "app is already enabled: app code-[logpresso-sample-app]"
}
권한이 없는 경우

HTTP 상태 코드 500 응답

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