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
- NodeJS
- NodeJS (server-auth)
- Rust
- REST API
Use the
PrivyClient
’s createRule
method in the policies()
interface to add a rule to a policy.Edit a rule in a policy
- NodeJS
- NodeJS (server-auth)
- Rust
- REST API
Use the
PrivyClient
’s updateRule
method in the policies()
interface to update a rule in a policy.Delete a rule from a policy
- NodeJS
- NodeJS (server-auth)
- Rust
- REST API
Use the
PrivyClient
’s deleteRule
method in the policies()
interface to delete a rule from a policy.Update a whole policy
- NodeJS
- NodeJS (server-auth)
- Java
- Rust
- REST API
Use the
PrivyClient
’s update
method from the policies()
interface to update an existing policy.