Skip to main content
PUT
/
cabinet
/
admin
/
rbac
/
policies
/
{policy_id}
Update Policy
curl --request PUT \
  --url https://api.example.com/cabinet/admin/rbac/policies/{policy_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "role_id": 123,
  "priority": 500,
  "effect": "<string>",
  "conditions": {},
  "resource": "<string>",
  "actions": [
    "<string>"
  ],
  "is_active": true
}
'
{
  "id": 123,
  "name": "<string>",
  "priority": 123,
  "effect": "<string>",
  "resource": "<string>",
  "is_active": true,
  "description": "<string>",
  "role_id": 123,
  "role_name": "<string>",
  "conditions": {},
  "actions": [
    "<string>"
  ],
  "created_by": 123,
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

policy_id
integer
required

Body

application/json

Update policy fields (all optional).

name
string | null
Required string length: 1 - 200
description
string | null
role_id
integer | null
priority
integer | null
Required range: 0 <= x <= 1000
effect
string | null
conditions
Conditions · object
resource
string | null
Required string length: 1 - 100
actions
string[] | null
is_active
boolean | null

Response

Successful Response

Access policy response.

id
integer
required
name
string
required
priority
integer
required
effect
string
required
resource
string
required
is_active
boolean
required
description
string | null
role_id
integer | null
role_name
string | null
conditions
Conditions · object
actions
string[]
created_by
integer | null
created_at
string<date-time> | null