icon-toolbox.png
XNAT Tools


Client Tools


XNAT Desktop


XNAT DICOM Gateway


Web Services


Web Services: XNAT Rest API


Web Services: Examples

[Edit Nav] ]

REST Resource Definitions


This is a list of prospective REST resource services. The first column includes the URI of the resource. The second column lists the HTTP methods which should be supported. The additional columns specify the resources which have been implemented ('none' means the service has been implemented, but didn't need a particular request or response format. The implementations are currently limited to XNAT Central site located at: http://central.xnat.org .

For additional information on how to use the XNAT REST API, review the usage guide.

Many changes were made to the REST resource definitions in XNAT 1.5. To see what changed, consult the 1.5 documentation.

User Resources

/users

[ GET / PUT / POST / DELETE ]

/users/{ID | username | email}

[ GET / PUT / POST / DELETE ]



Project Resources

/projects

[ GET / PUT / POST / DELETE ]

/projects/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/prearchive_code

[ GET / PUT / POST / DELETE ]

/projects/{ID}/prearchive_code/{0-4}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/quarantine_code

[ GET / PUT / POST / DELETE ]

/projects/{ID}/quarantine_code/{0-1}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/current_arc

[ GET / PUT / POST / DELETE ]

/projects/{ID}/current_arc/subfolderName

[ GET / PUT / POST / DELETE ]

/projects/{ID}/accessibility

[ GET / PUT / POST / DELETE ]

/projects/{ID}/accessibility/{public | protected | private}

[ GET / PUT / POST / DELETE ]


Project Resources: User Management

/projects/{ID}/users

[ GET / PUT / POST / DELETE ]

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

[ GET / PUT / POST / DELETE ]

/projects/{ID}/users/Collaborators/{ID | username | email}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/users/Owners/{ID | username | email}

[ GET / PUT / POST / DELETE ]


Project Resources: Project- Subject- Experiment Management

/projects/{ID}/subjects

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/status

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID | label}

[ GET / PUT / POST / DELETE ]


Project Resources: Pipeline Management

/projects/{ID}/pipelines

[ GET / PUT / POST / DELETE ]

/projects/{ID}/pipelines/{PIPELINE_PATH}

[ GET / PUT / POST / DELETE ]


Project Resources: Files

/projects/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/resources

[ GET / PUT / POST / DELETE ]

/projects/{ID}/resources/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/resources/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]


Subject Resources: Files

/projects/{ID}/subjects/{ID | label}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/resources

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/resources/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/resources/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]


Experiment Resources: Files

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/resources

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/resources/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]


Imaging Session Resources

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/scans

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/scans/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/scans/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/scans/{ID}/resources

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/scans/{ID}/resources/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/scans/{ID}/resources/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/reconstructions

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/reconstructions/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/reconstructions/{ID}/{in | out}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/reconstructions/{ID}/{in | out}/resources

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/reconstructions/{ID}/{in | out}/resources/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/reconstructions/{ID}/{in | out}/resources/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID}/{in | out}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID}/{in | out}/resources

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID}/{in | out}/resources/{ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID}/{in | out}/resources/{ID}/files/{FILENAME}

[ GET / PUT / POST / DELETE ]


Project Sharing Resources

/projects/{ID}/subjects/{ID | label}/projects

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/projects/{OTHER_PROJECT_ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/projects

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/projects/{OTHER_PROJECT_ID}

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID | label}/projects

[ GET / PUT / POST / DELETE ]

/projects/{ID}/subjects/{ID | label}/experiments/{ID | label}/assessors/{ID | label}/projects/{OTHER_PROJECT_ID}

[ GET / PUT / POST / DELETE ]


Search Resources

/search

[ GET / PUT / POST / DELETE ]

/search/ID

[ GET / PUT / POST / DELETE ]

/search/saved

[ GET / PUT / POST / DELETE ]

/search/saved/ID

[ GET / PUT / POST / DELETE ]

/search/saved/ID/results

[ GET / PUT / POST / DELETE ]

/search/fields

[ GET / PUT / POST / DELETE ]


Pipeline Management Resources

/pipelines

[ GET / PUT / POST / DELETE ]

/pipelines/{PIPELINE_PATH}

[ GET / PUT / POST / DELETE ]

==

==

HTTP Session Management Resources

/JSESSION

[ GET / PUT / POST / DELETE ]

Additional Tips

/experiments/ID/...

As a convenience, experiment paths can be shorted by accessing the experiments API outside of the project scope. Instead of using /projects/ID/subjects/label/experiments/label/..., you can access the resource as /experiments/ID/.... The only difference is that outside of the project scope, you must use the Expt ID (accession number) which was generated by XNAT (something like SITE_ID_E00001). Project based labels are not unique across all projects, and thus can't be used to identify an experiment outside of project scope.

/projects/experiments

There is also a /REST/projects/experiments which will return you a list of the experiments for a given project. It doesn't support the child API elements though (no /REST/projects/experiments/SITE_E00001/scans..., just /REST/projects/experiments/SITE_E00001).

The /experiments and /projects/ID/experiments URIs support a limited number of filtering options. Currently they are hardcoded as:

PARAMETER NAME
Description
Type
Example
ID
Accession number
STRING
?ID=xxx
label
Primary project's label
STRING
?label=xxx
xsiType
data type
STRING
?xsiType=xnat:mrSessionData,xnat:ctSessionData
date

DATE
?date=01/31/2007-03/30/2007
session_type
session_type of imageSessionData
STRING
?session_type=xxx
studyInstanceUID
UID of imageSessionData
STRING
?studyInstanceUID=xxx
Date values allow the specification of date ranges using the '-' character. String values allow the comparisons rather then equivalency using the * wildcard.

[Add Link to XML Paths Shortcuts ]]


BACK