Updating policy rules individually
You can create, get, update, and delete individual rules in a policy. We recommend this over updating the whole policy at once, especially if you find yourself updating the same policy over time. This way, you can ensure there would be no race conditions when updating the policy.Add a rule to a policy
Use the
PrivyClient
’s addRuleToPolicy
method to add a rule to a policy.Edit a rule in a policy
Use the
PrivyClient
’s updateRuleInPolicy
method to update a rule in a policy.Delete a rule from a policy
Use the Replacing
PrivyClient
’s deleteRuleFromPolicy
method to delete a rule from a policy.<policy_id>
with the ID of your desired policy and <rule_id>
with the ID of the rule you want to delete.ResponseIf the rule is deleted successfully, the response will beUpdate a whole policy
Use the
PrivyClient
’s updatePolicy
method to update an existing policy.