Update logger

Updates a specified logger. Administrator privileges are required to call this API.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

PUT /api/sonar/loggers/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d name="WTMP" \
     -d description="demo" \
     -d interval=10000 \
     -d 'configs={"path": "/var/log/wtmp"}' \
     -X PUT https://HOSTNAME/api/sonar/loggers/b90ea540-4f47-4bcf-b708-af610a649c50
Request Parameters
KeyRequiredTypeDescriptionNote
guidYesStringLogger GUID36-characters GUID
nameYesStringLogger nameMinimum 1 to maximum 50 characters.
descriptionNoStringLogger descriptionMaximum 2,000 characters
intervalNo32-bit integerLogger intervalMinimum 1000 (Unit: milliseconds)
cron_scheduleNoStringLogger schedule 주기
asset_guidNoStringAsset identifierAsset IP address
configsNoKey/Value stringConfiguration detailsSee Get Logger Factory Options.
group_guidNoStringLogger group GUID36 characters
encryptionNoBooleanWhether table encryption is enabled

Success Response

{}

Error Responses

Required argument is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "name should be not null"
}
Identifier is not in valid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "asset_guid should be guid type."
}
Invalid argument length

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'name' must be shorter than or equal to 50 characters"
}
CRON schedule expression is not valid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "wrong cron expression format: * * * *"
}
Asset is not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "asset not found: cd09ae6f-fbc3-11ed-9320-02d178f999a6"
}
Logger is not found
{
  "error_code": "illegal-state",
  "error_msg": "logger not found: c90ea540-4f47-4bcf-b708-af610a649c50"
}
No administrator privileges

HTTP status code 500

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