Disable Batch Rule
Disables a specified batch rule.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
POST /api/sonar/batch-rules/:guid/disable
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X POST \
https://HOSTNAME/api/sonar/batch-rules/c4ca4744-f310-4480-baa8-0548067abfb3/disable
Request Parameter
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Batch rule GUID | 36 characters |
Error Responses
Identifier is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}
Batch rule is not found
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "batch rule not found: 05efb651-9644-4518-950f-dbd648c973a7"
}
Batch rule is already disabled
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "batch rule is already disabled: c4ca4744-f310-4480-baa8-0548067abfb3""
}
No privileges to enable a batch rule
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}