Get List of Roles

This method gets the list of all the roles available in the system:

GET /roles.xml
GET /roles.json

XML Output example

<?xml version="1.0" encoding="UTF-8"?>
<roles>
<role>
<label>Administrator</label>
<created_at>2010-05-26T13:34:58Z</created_at>
<updated_at>2010-07-18T21:16:14Z</updated_at>
<id>1</id>
<identifier>admin</identifier>
<permissions>
<permission>
<label>Any action on virtual servers</label>
<created_at>2010-05-26T13:34:58Z</created_at>
<updated_at>2010-05-26T13:34:58Z</updated_at>
<id>1</id>
<identifier>virtual_machines</identifier>
</permission>
...
<permission>
</permission>
</permissions>
</role>
</roles>


Where:

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