Update Lookup

Updates existing lookup information. This operation requires administrator role.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

PUT /api/sonar/lookups/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d name=country_code2 \
     -d description="Country code to Korean name mapping" \
     -X PUT https://HOSTNAME/api/sonar/lookups/76b8699d-91a1-4576-a908-7db753570a0a
Request Parameters
Path Parameters
KeyTypeDescriptionNotes
guidStringLookup GUID36 characters
Request Body Parameters
KeyRequiredTypeDescriptionNotes
nameYStringLookup nameMin 0, max 240 characters. Alphanumeric and underscore only
descriptionNStringLookup descriptionMax 2000 characters

Success Response

HTTP status code 200 response

{}

Error Responses

name parameter is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "name should be not null"
}
name parameter length is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'name' must be shorter than or equal to 240 characters."
}
name: invalid characters

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "lookup name must be alphanumeric and underscore characters only: hello-world"
}
Lookup is not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "lookup not found: 76b8699d-91a1-4576-a908-7db753570a0a"
}
name: duplicate lookup name

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated lookup name: country_code2"
}
Permission denied

HTTP status code 500

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