Uninstall app

Uninstalls the specified app.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

POST /api/sonar/apps/uninstall
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -X POST -d app_code=sample-app \
     https://HOSTNAME/api/sonar/apps/uninstall
Request Parameters
KeyRequiredTypeDescriptionNotes
app_codeYStringApp code

Success Response

HTTP status code 200 response

{}

Error Responses

app_code is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "app_code should be not null"
}
App is not installed

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "the app is not installed: logpresso-sample-app"
}
Attempt to uninstall an internal-only app

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "inner app cannot be deleted: logpresso-sample-app"
}
Permission denied

HTTP status code 500

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