Skip to main content

Update a Policy with the REST API

Send the following request to update a policy:

http --auth-type=veracode_hmac PUT “https://api.veracode.com/appsec/v1/policies/{policyGuid}” < input.json

The API passes the JSON file that you populate with the necessary values as shown in this example payload:

{
"name": "TestPolicy",
"type": "BLACKLIST",
"description": "Policy to test updating endpoint in end-to-end testing",
"vendor_policy": false,
"finding_rules": [
{
"type": "MAX_SEVERITY",
"scan_type": [
"DYNAMIC",
"MANUAL",
"STATIC"
],
"value": "4"
}
],
"scan_type": [
"SCA"
],
"value": "14212"
}

The example payload specifies to update an existing policy with a new name and to change the finding-severity rating of the MAX_SEVERITY rule to 4. Policy API rules properties describes each of the rule properties.