Remove Batch Rules

Deletes the specified batch rules.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

DELETE /api/sonar/batch-rules
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -X DELETE \
     "https://HOSTNAME/api/sonar/batch-rules?guids=638cfeb2-e259-46af-961a-1eeb65ea35f0"
Request Parameters
KeyRequiredTypeDescriptionNote
guidsYesList (of strings)Batch rule GUID listComma-separated list

Success Response

{
    "failures": []
}

Error Responses

Some rules are not found

A rule that does not exist is treated as a deletion failure and is included in the failures list.

HTTP status code 200

{
  "failures": [
    {
      "id": "638cfeb2-e259-46af-961a-1eeb65ea35f1",
      "reason": "batch rule not found: 638cfeb2-e259-46af-961a-1eeb65ea35f1"
    }
  ]
}
guids is missing

HTTP status code 400

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

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guids should be guid type."
}
Permission denied

HTTP status code 500

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