/data/archive/projects/{ID}/users

HTTP CommandRequest & Response format
GET: REQ 
GET: RESPhtml
json
xml
csv

Description

GET: Retrieves a list of the current users assigned to a project.

This URI returns a static set of columns (they cannot be customized by the client).

GROUP_IDThe ID of the group which this user belongs to.
displaynameThe user friendly name of the group which this user belongs to.
loginThe username the user uses to logn to the site.
firstnameThe user's firstname
lastnameThe user's lastname
emailThe user's email address.

Parameters

Project IDrequiredUser must specify the project ID to pull data from.
Display Hidden UsersoptionalUser can specify that they want disabled (aka hidden) users to be returned as well as enabled ones. The URL for this would be like so:
data/projects/{ID}/users/true
formatoptionalUser can specify the format of the returned data set, by adding the ?format= parameter at the end of the URI. Options are HTML, JSON, XML, or CSV.

Examples

The following REST URL on XNAT Central ...

https://central.xnat.org/data/projects/CENTRAL_OASIS_LONG/users

... will produce this table of results, which is formatted as HTML by default.

GROUP_IDdisplaynameloginfirstnamelastnameemail
CENTRAL_OASIS_LONG_ownerOwnersdanDanielMarcusdmarcus@wustl.edu
CENTRAL_OASIS_LONG_memberMembersdeechAdityaSiramaditya.siram@gmail.com
CENTRAL_OASIS_LONG_collaboratorCollaboratorsbdbBrianBoydbrian.boyd@duke.edu
CENTRAL_OASIS_LONG_collaboratorCollaboratorsfarielloGabrieleFariellofariello@fas.harvard.edu

Other Formats

You can retrieve a result set in XML, CSV, or JSON format as well by appending a tag on the end of the URL. For example, this REST URL on XNAT Central ...

https://central.xnat.org/data/projects/CENTRAL_OASIS_LONG/users?format=json

... will produce a JSON-formatted result string.

{"ResultSet":{"Result":[{"GROUP_ID":"CENTRAL_OASIS_LONG_owner","email":"dmarcus@wustl.edu","lastname":"Marcus","login":"dan","firstname":"Daniel","displayname":"Owners"},{"GROUP_ID":"CENTRAL_OASIS_LONG_member","email":"aditya.siram@gmail.com","lastname":"Siram","login":"deech","firstname":"Aditya","displayname":"Members"},{"GROUP_ID":"CENTRAL_OASIS_LONG_collaborator","email":"brian.boyd@duke.edu","lastname":"Boyd","login":"bdb","firstname":"Brian","displayname":"Collaborators"},{"GROUP_ID":"CENTRAL_OASIS_LONG_collaborator","email":"fariello@fas.harvard.edu","lastname":"Fariello","login":"fariello","firstname":"Gabriele","displayname":"Collaborators"}], "title": "Projects"}}

$label.name