Skip to main content

Update Host Vulnerability Policy

PUT 

/api/v32.07/policies/vulnerability/host

x-prisma-cloud-target-env: {"permission":"policyHosts"}

Updates the vulnerability policy for your hosts protected by Defender. All rules in the policy are updated in a single shot.

This endpoint maps to the policy table in Defend > Vulnerabilities > Hosts > Running hosts in the Console UI.

cURL Request

Refer to the following example cURL command that overwrites all rules in your current policy with a new policy that has a single rule:

$ curl 'https://<CONSOLE>/api/v<VERSION>/policies/vulnerability/host' \
-X PUT \
-u <USER> \
-H 'Content-Type: application/json' \
-d \
'{
"rules":[
{
"name":"<RULE_NAME>",
"collections":[
{
"name":"<COLLECTION_NAME>"
}
],
"alertThreshold":{
"disabled":false,
"value":1
}
}
],
"policyType":"hostVulnerability",
"_id":"hostVulnerability"
}'

Note: No response will be returned upon successful execution.

Request

Responses

OK