REST API

/{version}/roles

The following operations are supported on this resource:

GET

Displays the list of roles stored in the system.

Output Payload

element produceable content type(s)
roles (XML)
  • application/xml
description
The system returns a response that includes a list of roles and URI links.

POST

Creates a new security role in the system.

When creating a new role, you must specify the name of the role you want to add. Each role must have a unique name. You may optionally assign permissions to the role as well.

While the XML will allow you to submit a list of researchers, you may not actually assign a role to a user with this end-point. Any researchers provided in the XML will be ignored.

An example of a <role> POST is as follows:
<role:role xmlns:role="http://genologics.com/ri/role">   <name>New Role Name</name>   <permissions>     <permission uri="http://localhost:8080/api/v2/permissions/10"/>     <permission uri="http://localhost:8080/api/v2/permissions/11"/>   </permissions> </role:role>

Input Payload

element consumeable content type(s)
role (XML)
  • */*
  • application/xml
description
The information about the role you want to add to the system.

Output Payload

element produceable content type(s)
role (XML)
  • application/xml
description
When the role is successfully created, the system returns an HTTP 201 (Created) code with a response body that includes information about the new role.

/{version}/roles

Home

REST Endpoints

XML Data Elements

XML Data Types