/data/archive/projects/{ID}/users/Members/{ID | username | email}

HTTP CommandRequest & Response format
PUT: REQ 
PUT: RESPhtml
json
xml
csv
DELETE: REQ 
DELETE: RESPhtml
json
xml
csv

Description

PUT / DELETE: Add/remove a user to a project as a member.

The user's ID, email address, or username can be used to specify the user you are adding. Also, multiple users can be added in a single transaction by comma separating the user identifiers.

Parameters

Project ID

requiredThe project ID must be specified.
User ID / username / emailrequiredAn existing user to add or delete project access for must be specified by their ID, username, or email address
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/Memers/{ID}/true
FormatoptionalThe user can specify a response/confirmation format as HTML (default), JSON or XML, by adding ?format=json to the end of the URI

Example PUT

The following cURL command, performed locally on the XNAT Workshop VM, using admin/admin as our authentication ...

curl -u admin:admin -X PUT http://localhost:8080/xnat/data/projects/BOGUS_OUA/users/Members/Will

... will add the user with username "Will" to the project "BOGUS_OUA" with Member privileges. The following JSON-formatted confirmation lists all users associated with the project and their roles: "Admin" as an owner, and "Will" as a Member.

{"ResultSet":{"Result":[{"GROUP_ID":"BOGUS_OUA_owner","email":"xnat@xnat.org","lastname":"Admin","login":"admin","firstname":"Admin","displayname":"Owners"},{"GROUP_ID":"BOGUS_OUA_member","email":"will@bogus.edu","lastname":"Horton","login":"Will","firstname":"Will","displayname":"Members"}], "totalRecords": "2","title": "Projects"}}

Example DELETE

The following cURL command, performed locally on the XNAT Workshop VM, using admin/admin as our authentication ...

curl -u admin:admin -X DELETE http://localhost:8080/xnat/data/projects/BOGUS_OUA/users/Members/will@bogus.edu

... will remove the user with username "Will" to the project "BOGUS_OUA." The following JSON-formatted confirmation lists all users associated with the project and their roles: "Admin" as an owner, only.

{"ResultSet":{"Result":[{"GROUP_ID":"BOGUS_OUA_owner","email":"xnat@xnat.org","lastname":"Admin","login":"admin","firstname":"Admin","displayname":"Owners"}], "totalRecords": "1","title": "Projects"}}

Will's role as a Member has been removed from this project.

$label.name