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.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
POST /api/sonar/batch-rules/:guid/run
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X POST \
https://HOSTNAME/api/sonar/batch-rules/c4ca4744-f310-4480-baa8-0548067abfb3/run
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"
}