Skip to main content

Update the Role

Modify the properties of an existing role

Path Parameters
  • roleId int32 required

    Role Id

Request Body
  • newName string

    new name of the role

  • permissionList object[]

    Used to update the list of permissions associated with the role.

  • permission object
  • id int32
  • name string
  • category object
  • id int32
  • name string
  • enabled boolean

    Used to determine if the role is enabled or disabled.

  • visibleToAll boolean

    Determines if the role is visible to everyone.

  • security object[]

    Used to update the security association for the role

  • user object
  • id int32
  • name string
  • userGroup object
  • id int32
  • name string
  • role object
  • id int32
  • name string
Responses

Success


Schema
  • errorMessage string
  • errorCode int32
PUT /v4/role/:roleid    

Authorization

type: apiKeyname: Authtokenin: header

Request

Click Edit to configure Base URL
https://localhost/webconsole/api
token
roleId — path required
Body

{
"newName": "string",
"permissionList": [
{
"permission": {
"id": 0,
"name": "string"
},
"category": {
"id": 0,
"name": "string"
}
}
],
"enabled": true,
"visibleToAll": true,
"security": [
{
"user": {
"id": 0,
"name": "string"
},
"userGroup": {
"id": 0,
"name": "string"
},
"role": {
"id": 0,
"name": "string"
}
}
]
}
curl -L -X PUT 'https://localhost/webconsole/api/V4/Role/:roleId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authtoken: <API_KEY_VALUE>' \
--data-raw '{
"newName": "string",
"permissionList": [
{
"permission": {
"id": 0,
"name": "string"
},
"category": {
"id": 0,
"name": "string"
}
}
],
"enabled": true,
"visibleToAll": true,
"security": [
{
"user": {
"id": 0,
"name": "string"
},
"userGroup": {
"id": 0,
"name": "string"
},
"role": {
"id": 0,
"name": "string"
}
}
]
}'