Get List of Roles

To get the list of all the roles available in the system, use the following request:

GET /roles.xml
GET /roles.json

XML Request Example

curl -i -X GET -H 'Accept: application/xml' -H 'Content-type: application/xml' -u user:userpass --url http://onapp.test/roles.xml

JSON Request Example

curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url http://onapp.test/roles.json

XML Output Example

<label>Any action on virtual servers</label>


roles – an array of all roles with their details and assigned permissions

label – role title

created_at – the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format

updated_at – the date when the role was updated in the [YYYY][MM][DD]T[hh][mm][ss]Z format

id – role ID

identifier – role identifier

permissions – an array with all the permissions assigned to this role, where:

  • label – permission title (permission on an action)
  • created_at – time in [YYYY][MM][DD]T[hh][mm][ss]Z format
  • updated_at – time in [YYYY][MM][DD]T[hh][mm][ss]Z format
  • id – permission ID
  • identifier – permission identifier