Enable Batch Rule

Enables a specified batch rule.

HTTP Request

POST /api/sonar/batch-rules/:guid/enable
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     -X POST \
     https://HOSTNAME/api/sonar/batch-rules/c4ca4744-f310-4480-baa8-0548067abfb3/enable
Request Parameter
KeyRequiredTypeDescriptionNote
guidOStringBatch rule GUID36 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 enabled

HTTP status code 500

{
    "error_code": "illegal-state",
    "error_msg": "batch rule is already enabled: c4ca4744-f310-4480-baa8-0548067abfb3""
}
No privileges to enable a batch rule

HTTP status code 500

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