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.

POST/pm/v1/blocking/rules

Input ParametersInput Parameters

Parameter Sub Parameter Mandatory/
Optional
Data Type Description

ruleName

 

Mandatory

String

Specify the name for the rule. 
Note: The rule name helps you identify the specific rule because of which the patches get skipped. 

ruleReason

 

Mandatory

String

Specify a reason for which the blocking rule is created.

criteria

type

Mandatory

Integer

Specify the type as 1. 
Note: Only the patch QQL type 1 is supported. 

value

Mandatory

String

Specify the QQL token query. 

Platform

 

Mandatory

String

Specify the platform.
Supported values are Windows and Linux.

Scope

 

Mandatory

String

Specify the scope. Supported values are GLOBAL and TAG_BASED. 
Note:  The global scope is applicable for all assets. The tag-based scope applies only to assets included in the tag. 

includeTagIds

 

Optional

String

Specify the tag ID for the tag to be included in the rule.
Note: This parameter is mandatory if you select the TAG_BASED scope.

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"
}