Update a policy rule.
PUT
/api/admin/policies/{id}
Code sample: Shell / cURL
curl --request PUT \ --url https://auth.example.com/api/admin/policies/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "description": "Allow support users to read and export user records.", "actions": [ "read", "export" ], "enabled": true }'Update mutable policy rule fields and return a success object. If no fields are supplied, the handler also returns success without changing the row.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Policy rule identifier.
Request Body required
Section titled “Request Body required ”JSON request body.
Media type application/json
object
name
string
description
string
priority
integer
effect
string
resource_types
Array<string>
actions
Array<string>
conditions
Array<object>
object
type
string
params
object
key
additional properties
key
additional properties
enabled
boolean
key
additional properties
Example
{ "description": "Allow support users to read and export user records.", "actions": [ "read", "export" ], "enabled": true}Responses
Section titled “ Responses ”Successful JSON response.
Media type application/json
object
success
required
boolean
key
additional properties
Example
{ "success": true}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}