User Management API (Deprecated)
These URIs are all still valid in XNAT, but are generally deprecated in favor of the XAPI-based User Management API
Get All Users
Return a listing of all users in XNAT
GET - /data/users
Parameters:
format |
|
---|
Response:
{
ResultSet: {
Result: [
{
email: "string",
firstname: "string",
lastname: "string",
login: "string",
xnat_user_id: "integer"
}
],
title: "string",
totalRecords: "integer"
}
}
Get One User
Not supported in XNAT 1.7
Return details on a specific user in XNAT.
GET - /data/user/{ID | username | email`}
Parameters:
One of these parameters must be supplied.
username | string |
---|---|
ID | integer |
string |
Response:
{
ResultSet: {
Result: [
{
email: "string",
enabled: "boolean",
firstname: "string",
lastname: "string",
login: "string",
userAuths: [
authId: "string",
method: "localdb"
],
verified: "boolean"
}
],
title: "string",
totalRecords: "integer"
}
}
Set A Favorite Project For User
Adds a project to the currently logged-in user's list of favorite projects. If a user has favorite projects specified, that list of projects will appear in a new navigation menu item in the top navigation under Browse > Favorite Projects.
PUT - /data/users/favorites/Project/{project_id}
Parameters
{project_id} | Required path parameter. Must be a valid XNAT project ID that the user has access to |
---|
Response: Returns an updated list of all favorite projects for this user
{
"ResultSet": {
"Result": [
{
"datatype": "Project",
"id": "Project_ID_1"
},
{
"datatype": "Project",
"id": "Project_ID_2"
}
],
"title": "User Favorites"
}
}
Remove A Project From A User's List of Favorites
DELETE - /data/users/favorites/Project/{project_id}
Parameters
{project_id} | Required path parameter. Must be a valid XNAT project ID that the user has access to |
---|
Response
{
"ResultSet": {
"Result": [
{
"datatype": "Project",
"id": "Project_ID_1"
}
],
"title": "User Favorites"
}
}