21.3. Methods
21.3.1. Creating a Role
Creation of a role requires values for
name
, administrative
and a list of initial permits
.
Example 21.2. Creating a role
POST /api/roles HTTP/1.1 Accept: application/xml Content-type: application/xml <role> <name>Finance Role</name> <administrative>true</administrative> <permits> <permit id="1"/> </permits> </role>
21.3.2. Updating a Role
The
name
, description
and administrative
elements are updatable post-creation.
Example 21.3. Updating a role
PUT /api/roles/8de42ad7-f307-408b-80e8-9d28b85adfd7 HTTP/1.1 Accept: application/xml Content-type: application/xml <role> <name>Engineering Role</name> <description>Standard users in the Engineering Role</description> <administrative>false</administrative> </role>
21.3.3. Removing a Role
Removal of a role requires a
DELETE
request.
Example 21.4. Removing a role
DELETE /api/roles/8de42ad7-f307-408b-80e8-9d28b85adfd7 HTTP/1.1 HTTP/1.1 204 No Content