Skip to main content
PUT
/
cabinet
/
admin
/
rbac
/
roles
/
{role_id}
Update Role
curl --request PUT \
  --url https://api.example.com/cabinet/admin/rbac/roles/{role_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "level": 499,
  "permissions": [
    "<string>"
  ],
  "color": "<string>",
  "icon": "<string>",
  "is_active": true
}
'
{
  "id": 123,
  "name": "<string>",
  "level": 123,
  "is_system": true,
  "is_active": true,
  "description": "<string>",
  "permissions": [
    "<string>"
  ],
  "color": "<string>",
  "icon": "<string>",
  "user_count": 0,
  "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

role_id
integer
required

Body

application/json

Update role fields (all optional).

name
string | null
Required string length: 1 - 100
description
string | null
level
integer | null
Required range: 0 <= x <= 998
permissions
string[] | null
color
string | null
Maximum string length: 7
icon
string | null
Maximum string length: 50
is_active
boolean | null

Response

Successful Response

Admin role with user count.

id
integer
required
name
string
required
level
integer
required
is_system
boolean
required
is_active
boolean
required
description
string | null
permissions
string[]
color
string | null
icon
string | null
user_count
integer
default:0
created_at
string<date-time> | null