Remove Lookups

Deletes multiple specified lookups. This operation requires administrator role. Allows operation failures for partial lists and returns object identifiers and failure reasons in the failures parameter when deletion fails.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

DELETE /api/sonar/lookups
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d guids="GUID1,GUID2,GUIDN"
     -X DELETE https://HOSTNAME/api/sonar/lookups
Request Parameters
KeyRequiredTypeDescriptionNotes
guidsYStringLookup GUIDsComma-separated lookup GUID list

Success Response

When no item fails to be deleted, the failures array is empty.

{
  "failures": []
}

When some items fail to be deleted, those items are returned in the failures array.

{
  "failures": [
    {
      "id": "4ab572a7-f052-4f90-82db-320444e229a3",
      "reason": "lookup not found: 4ab572a7-f052-4f90-82db-320444e229a3"
    }
  ]
}
  • failures (Array): Items that failed to be deleted. An empty array when every item succeeds
    • id (String): GUID of the lookup that failed to be deleted
    • reason (String): Reason for the failure. lookup not found: <GUID> when the specified lookup does not exist, or sql-error on a database error

Error Responses

guids: missing parameter value

HTTP status code 400 response

{
  "error_code": "null-argument",
  "error_msg": "guids should be not null"
}
guids: invalid GUID format

HTTP status code 400 response

{
  "error_code": "invalid-param-type",
  "error_msg": "guids should be guid type."
}
permission: not administrator role

HTTP status code 500 response

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