PUT
/api/policies/{policyId}Replace a policy
Replaces a policy's configuration identified by its policy ID. Supply name, enabled, and rules; you can also include a description and source posture check IDs.
policyIdstringrequired
The unique identifier of the policy to replace.
Replacement policy configuration containing its name, enabled state, and rules.
descriptionstringoptional
Policy friendly description
enabledbooleanrequired
Policy status
namestringrequired
Policy name identifier
rulesarray<object>required
Policy rule object for policy UI editor
source_posture_checksarray<string>optional
Posture checks ID's applied to policy source groups
200Returns the updated policy object, including its name, enabled state, rules, and source posture checks.
descriptionstringoptional
Policy friendly description
enabledbooleanrequired
Policy status
namestringrequired
Policy name identifier
idstringoptional
Policy ID
rulesarray<object>required
Policy rule object for policy UI editor
source_posture_checksarray<string>required
Posture checks ID's applied to policy source groups
400Returned when the request is invalid, such as when a required field is missing.
401Returned when authentication is missing or invalid.
403Returned when the authenticated user is not permitted to update the policy.
500Returned when an internal server error occurs.
Error handling
A 400 is returned when the request is invalid, including when name, enabled, or rules is missing; a 401 is returned when authentication is missing or invalid; a 403 is returned when the authenticated user is not permitted to update the policy; and a 500 is returned when an internal server error occurs. name, enabled, and rules are required. The policyId path parameter must identify the policy to replace.