Create Patch Blocking Rule
Use this API to create a patch blocking rule based on specified criteria. Once created, rule identifies applicable patches and blocks them from deployment across the Windows and Linux platforms. A maximum of 10 blocking rules is allowed per platform.
Input ParametersInput Parameters
| Parameter | Sub Parameter | Mandatory/ Optional |
Data Type | Description |
|---|---|---|---|---|
|
ruleName |
|
Mandatory |
String |
Specify the name for the rule. |
|
ruleReason |
|
Mandatory |
String |
Specify a reason for which the blocking rule is created. |
|
criteria |
type |
Mandatory |
Integer |
Specify the type as 1. |
|
value |
Mandatory |
String |
Specify the QQL token query. |
|
|
Platform |
|
Mandatory |
String |
Specify the platform. |
|
Scope |
|
Mandatory |
String |
Specify the scope. Supported values are GLOBAL and TAG_BASED. |
|
includeTagIds |
|
Optional |
String |
Specify the tag ID for the tag to be included in the rule. |
Sample - Create a Patch Blocking RuleSample - Create a Patch Blocking Rule
API Request
curl -X 'POST' \
'<qualys_base_url>/pm/v1/blocking/rules' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <JWT_Token>
-H 'Content-Type: application/json' \
-d
API Body
'{
"ruleName": "Windows Blocking Rule",
"ruleReason": "Blocking few patches",
"criteria": {
"type": 1,
"value": "patch.publishedDate:[2026-05-01 ... now-5d] and patch.appFamily:`Visual C++`"
},
"platform": "Windows",
"includeTagIds": [],
"scope": "GLOBAL"
}'
API Response
{
"ruleId": "c003a69f-17d1-4a85-9ef7-2ef9f87aff2d",
"ruleName": "Windows Blocking Rule",
"ruleReason": "Blocking few patches",
"criteria": {
"type": 1,
"value": "patch.publishedDate:[2026-05-01 ... now-5d] and patch.appFamily:`Visual C++`"
},
"platform": "Windows",
"customerId": "5e35d0c5-ea3d-55c7-8320-7d89b67eb709",
"includeTagIds": [],
"createdBy": {
"id": "aa093746-5cbd-7b3b-8136-5794736f5a2f",
"name": "John Doe",
"user": "<username>"
},
"createdAt": "2026-09-10T03:54:44.883",
"updatedBy": null,
"updatedAt": null,
"deleted": false,
"scope": "GLOBAL"
}