Skip to Content
Roles

Update an existing role

PUT
/roles/{role_id}

Path Parameters

role_id*integer

The ID of a role.

Range1 <= value

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Request Body

A JSON object containing the resource data

application/json
  1. body
id*integer

The unique ID of the given Role.

name*string

The role's name. Must be at least 2 characters. Must not be greater than 60 characters.

description?string

Description of this role. Must not be greater than 255 characters.

permissions*RolePermissions

The list of permissions granted for this role

Response Body

No Content

Example Request
curl -X PUT 'https://api.devopness.com/roles/123' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json' \  -H 'Content-Type: application/json' \  -d '{  "id": 1,  "name": "admin",  "permissions": [    "application:read",    "application:create",    "server:read"  ]}'
Example Response
Empty