Update an existing policy.

Only provided fields will be updated. Omit fields to leave them unchanged. Preset policies cannot be modified. Requires admin role.

Docs: Guide | API Reference

Raises: ResourceNotFoundError: If the policy does not exist. PresetPolicyModificationError: If attempting to modify a preset policy. AdminRequiredError: If user is not an admin.

put/policies/{policy_id}

Request

Path parameters

policy_idstring required

Request body

namestring nullable
descriptionstring nullable
categoriesobject nullable
rule_modesobject nullable
rule_block_messagesobject nullable
modestring nullable
pre_violation_thresholdnumber nullable
pre_jb_thresholdnumber nullable
post_violation_thresholdnumber nullable
post_violation_jb_thresholdnumber nullable
scanners_configobject nullable
block_messagestring nullable

Response

Successful Response

idstring required
namestring required
descriptionstring nullable
rulesobject required
rule_modesobject
rule_block_messagesobject
modestring nullable
pre_violation_thresholdnumber nullable
pre_jb_thresholdnumber nullable
post_violation_thresholdnumber nullable
post_violation_jb_thresholdnumber nullable
scanners_configobject nullable
block_messagestring nullable
is_presetboolean
created_atstring date-time nullable
updated_atstring date-time nullable

Changes

    • breaking

      the response's property type changed from array to string for status

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response property became required for the status

    • info

      added the required property to the response with the status