Run Batch Rule

Runs a specified batch rule immediately. The system runs the batch rule query asynchronously, so it responds without waiting for the query to complete. Execution does not raise an event or ticket in the following cases:

  • The batch rule is disabled.
  • The batch rule is deleted during query execution.

HTTP Request

POST /api/sonar/batch-rules/:guid/run
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     -X POST \
     https://HOSTNAME/api/sonar/batch-rules/c4ca4744-f310-4480-baa8-0548067abfb3/run
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"
}