XNAT REST XML Path Shortcuts


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 API: XML Shortcuts

These keys can be substituted for the full XML Path when referencing variables in PUT or POST procedures. When using the querystring to define your variables, you should include the ?req_format parameter with a value of "qs" to prevent the body of the message from being parsed.

xsiType

All PUT and POST operations allow you to use the querystring parameter 'xsiType' to specify the related data type in your schema. This is only necessary when the level you are referencing could have multiple extensions. For example, /REST/projects/X/subjects/Y/experiments/X_Y_1. This could be an instance of an xnat:mrSessionData, xnat:petSessionData, or any other data type which extends xnat:subjectAssessorData. So, if you are not including an xml to desribe your resource, you must use the xsiType parameter (before any other parameters) to specify which type of item you are creating. /REST/projects/X/subjects/Y/experiments/X_Y_1?xsiType=xnat:mrSessionData.

xnat:projectData

The following parameters are available at these URIs:

/REST/projects
/REST/projects/X

VARIABLE NAME
XML PATH
ID
xnat:projectData/ID
secondary_ID
xnat:projectData/secondary_ID
name
xnat:projectData/name
description
xnat:projectData/description
keywords
xnat:projectData/keywords
alias
xnat:projectData/aliases/alias
pi_firstname
xnat:projectData/PI/firstname
pi_lastname
xnat:projectData/PI/lastname
note
xnat:projectData/fields/field[name=note]/field
last_modified (READ-ONLY)
xnat:projectData/meta/last_modified
insert_date (READ-ONLY)
xnat:projectData/meta/insert_date
insert_user (READ-ONLY)
xnat:projectData/meta/insert_user

xnat:subjectData

The following parameters are available at these URIs:

/REST/projects/X/subjects
/REST/projects/X/subjects/Y

VARIABLE NAME
XML PATH
group
xnat:subjectData/group
src
xnat:subjectData/src
pi_firstname
xnat:subjectData/investigator/firstname
pi_lastname
xnat:subjectData/investigator/lastname
dob
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/dob
yob
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/yob
age
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/age
gender
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/gender
handedness
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/handedness
ses
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/ses
education
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/education
educationDesc
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/educationDesc
race
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/race
ethnicity
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/ethnicity
weight
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/weight
height
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/height
gestational_age
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/gestational_age
post_menstrual_age
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/post_menstrual_age
birth_weight
xnat:subjectData/demographics[@xsi:type=xnat:demographicData]/birth_weight
last_modified (READ-ONLY)
xnat:subjectData/meta/last_modified
insert_date (READ-ONLY)
xnat:subjectData/meta/insert_date
insert_user (READ-ONLY)
xnat:subjectData/meta/insert_user

xnat:experimentData

These URIs require the use of the xsiType parameter if you are using the query string option. The following parameters are available at these URIs:

/REST/projects/X/subjects/Y/experiments
/REST/projects/X/subjects/Y/experiments/X_Y_1

VARIABLE NAME
XML PATH
visit_id
xnat:experimentdata/visit_id
date
xnat:experimentdata/date
ID
xnat:experimentdata/ID
project
xnat:experimentdata/project
label
xnat:experimentdata/label
time
xnat:experimentdata/time
note
xnat:experimentdata/note
pi_firstname
xnat:experimentdata/investigator/firstname
pi_lastname
xnat:experimentdata/investigator/lastname
validation_method
xnat:experimentdata/validation/method
validation_status
xnat:experimentdata/validation/status
validation_date
xnat:experimentdata/validation/date
validation_notes
xnat:experimentdata/validation/notes
last_modified (READ-ONLY)
xnat:experimentdata/meta/last_modified
insert_date (READ-ONLY)
xnat:experimentdata/meta/insert_date
insert_user (READ-ONLY)
xnat:experimentdata/meta/insert_user

subject_ID
xnat:subjectData/ID
subject_label
xnat:subjectData/label
subject_project
xnat:subjectData/project

scanner
xnat:imageSessionData/scanner
operator
xnat:imageSessionData/operator
dcmAccessionNumber
xnat:imageSessionData/dcmAccessionNumber
dcmPatientId
xnat:imageSessionData/dcmPatientId
dcmPatientName
xnat:imageSessionData/dcmPatientName
session_type
xnat:imageSessionData/session_type
modality
xnat:imageSessionData/modality
UID
xnat:imageSessionData/UID

coil
xnat:mrSessionData/coil
fieldStrength
xnat:mrSessionData/fieldStrength
marker
xnat:mrSessionData/marker
stabilization
xnat:mrSessionData/stabilization

studyType
xnat:petSessionData/studyType
patientID
xnat:petSessionData/patientID
patientName
xnat:petSessionData/patientName
stabilization
xnat:petSessionData/stabilization
scan_start_time
xnat:petSessionData/start_time/scan
injection_start_time
xnat:petSessionData/start_time/injection
tracer_name
xnat:petSessionData/tracer/name
tracer_startTime
xnat:petSessionData/tracer/startTime
tracer_dose
xnat:petSessionData/tracer/dose
tracer_sa
xnat:petSessionData/tracer/specificActivity
tracer_totalmass
xnat:petSessionData/tracer/totalMass
tracer_intermediate
xnat:petSessionData/tracer/intermediate
tracer_isotope
xnat:petSessionData/tracer/isotope
tracer_isotope
xnat:petSessionData/tracer/isotope/half-life
tracer_transmissions
xnat:petSessionData/tracer/transmissions
tracer_transmissions_start
xnat:petSessionData/tracer/transmissions/startTime

xnat:imageScanData

These URIs require the use of the xsiType parameter if you are using the query string option. The following parameters are available at these URIs:

/REST/projects/X/subjects/Y/experiments/X_Y_1/scans
/REST/projects/X/subjects/Y/experiments/X_Y_1/scans/1

VARIABLE NAME
XML PATH
ID
xnat:imageScanData/ID
type
xnat:imageScanData/type
UID
xnat:imageScanData/UID
note
xnat:imageScanData/note
quality
xnat:imageScanData/quality
condition
xnat:imageScanData/condition
series_description
xnat:imageScanData/series_description
documentation
xnat:imageScanData/documentation
scanner
xnat:imageScanData/scanner
modality
xnat:imageScanData/modality
frames
xnat:imageScanData/frames
validation_method
xnat:imageScanData/validation/method
validation_status
xnat:imageScanData/validation/status
validation_date
xnat:imageScanData/validation/date
validation_notes
xnat:imageScanData/validation/notes
last_modified (READ-ONLY)
xnat:imageScanData/meta/last_modified
insert_date (READ-ONLY)
xnat:imageScanData/meta/insert_date
insert_user (READ-ONLY)
xnat:imageScanData/meta/insert_user

coil
xnat:mrScanData/coil
fieldStrength
xnat:mrScanData/fieldStrength
marker
xnat:mrScanData/marker
stabilization
xnat:mrScanData/stabilization

orientation
xnat:petScanData/parameters/orientation
scanTime
xnat:petScanData/parameters/scanTime
originalFileName
xnat:petScanData/parameters/originalFileName
systemType
xnat:petScanData/parameters/systemType
fileType
xnat:petScanData/parameters/fileType
transaxialFOV
xnat:petScanData/parameters/transaxialFOV
acqType
xnat:petScanData/parameters/acqType
facility
xnat:petScanData/parameters/facility
numPlanes
xnat:petScanData/parameters/numPlanes
numFrames
xnat:petScanData/parameters/frames/numFrames
numGates
xnat:petScanData/parameters/numGates
planeSeparation
xnat:petScanData/parameters/planeSeparation
binSize
xnat:petScanData/parameters/binSize
dataType
xnat:petScanData/parameters/dataType

xnat:reconstructedImageData

The following parameters are available at these URIs:

/REST/projects/X/subjects/Y/experiments/X_Y_1/reconstructions
/REST/projects/X/subjects/Y/experiments/X_Y_1/reconstructions/X_Y_1_r1

VARIABLE NAME
XML PATH
ID
xnat:reconstructedImageData/ID
type
xnat:reconstructedImageData/type
baseScanType
xnat:reconstructedImageData/baseScanType
last_modified (READ-ONLY)
xnat:reconstructedImageData/meta/last_modified
insert_date (READ-ONLY)
xnat:reconstructedImageData/meta/insert_date
insert_user (READ-ONLY)
xnat:reconstructedImageData/meta/insert_user

xnat:imageAssessorData

These URIs require the use of the xsiType parameter if you are using the query string option. The following parameters are available at these URIs:

/REST/projects/X/subjects/Y/experiments/X_Y_1/assessors
/REST/projects/X/subjects/Y/experiments/X_Y_1/assessors/X_Y_1_a1

VARIABLE NAME
XML PATH
visit_id
xnat:experimentdata/visit_id
date
xnat:experimentdata/date
time
xnat:experimentdata/time
note
xnat:experimentdata/note
pi_firstname
xnat:experimentdata/investigator/firstname
pi_lastname
xnat:experimentdata/investigator/lastname
validation_method
xnat:experimentdata/validation/method
validation_status
xnat:experimentdata/validation/status
validation_date
xnat:experimentdata/validation/date
validation_notes
xnat:experimentdata/validation/notes
last_modified (READ-ONLY)
xnat:experimentdata/meta/last_modified
insert_date (READ-ONLY)
xnat:experimentdata/meta/insert_date
insert_user (READ-ONLY)
xnat:experimentdata/meta/insert_user