Image Session Scans API
Get A Listing Of Scans From An Image Session
GET - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/scans
GET - /data/experiments/{experiment-id}/scans
Parameters
{project-id} | Required path parameter |
---|---|
{subject-id} or {subject-label} | Required path parameter |
{experiment-id} or {experiment-label} | Required path parameter |
format | Optional querystring parameter
|
Response
{
"ResultSet": {
"Result": [
{
"xsiType": "xnat:mrScanData",
"xnat_imagescandata_id": "integer",
"note": "string",
"series_description": "string",
"ID": "integer {scan-id}",
"type": "integer",
"URI": "path",
"quality": "string"
},
...
],
"totalRecords": "integer"
}
}
Get A Listing Of A Single Scan's Resources
GET - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/scans/{scan-id}
GET - /data/experiments/{experiment-id}/scans/{scan-id}
Parameters
{project-id} | Required path parameter |
---|---|
{subject-id} or {subject-label} | Required path parameter |
{experiment-id} or {experiment-label} | Required path parameter |
{scan-id} | Required path parameter |
format | Optional querystring parameter
|
Response
Each items[n].children object in the response object contains another items array that contains resource details.
{
"items": [
{
"children": [
...
],
"meta": {
"create_event_id": integer,
"xsi:type": "xsiType",
"isHistory": boolean,
"start_date": "UTC Date Time"
},
"data_fields": {
"series_description": "string",
"scanner/manufacturer": "string",
"image_session_ID": "string {experiment-id}",
"type": "string",
"xnat_imageScanData_id": integer,
"parameters/voxelRes/z": number,
"xnat_imagescandata_id": number,
"parameters/voxelRes/x": float,
"parameters/voxelRes/y": float,
"scanner": "string",
"startTime": "time",
"parameters/imageType": "string",
"ID": "string",
"coil": "string",
"parameters/pixelBandwidth": float,
"frames": integer,
"parameters/fov/y": number,
"scanner/model": "string",
"parameters/fov/x": number,
"parameters/tr": number,
"quality": "string",
"UID": "string",
"parameters/orientation": "string",
"fieldStrength": "float",
"parameters/acqType": "string"
}
}
]
}
Add Scan To An Image Session
In order to add scans, you must specify the xsiType of the scan. See the note for xsiTypes in XNAT REST XML Path Shortcuts for more details.
For a full tutorial on uploading image session and scan resources, see Upload Image Session Files with REST API.
PUT - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/scans/{scan-id}
Parameters
{project-id} | Required path parameter |
---|---|
{subject-id} or {subject-label} | Required path parameter |
{experiment-id} or {experiment-label} | Required path parameter |
{scan-id} | Required path parameter. Specify a new scan ID that does not already exist in this image session. |
xsiType | Required querystring parameter. Example:
|
{params} | Optional querystring parameters. You can add additional scan descriptors using Scan Data REST XML Path Shortcuts. Example:
|
Modify Scan Metadata
To set a new value for an existing scan property, specify the parameter key/value pair using one or more Scan Data REST XML Path Shortcuts. You will also need to specify the xsiType, as with any PUT request regarding scans.
This is the same URI as when creating a scan, but you are using a scan ID that already exists.
PUT - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/scans/{scan-id}
PUT - /data/experiments/{experiment-id}/scans/{scan-id}
Parameters
{project-id} | Required path parameter |
---|---|
{subject-id} or {subject-label} | Required path parameter |
{experiment-id} or {experiment-label} | Required path parameter |
{scan-id} | Required path parameter. Specify a scan ID that already exists in this session. |
xsiType | Required querystring parameter. Example:
|
{params} | Optional querystring parameters. You can add additional scan descriptors using Scan Data REST XML Path Shortcuts. Example:
|
Delete Scan From Image Session
DELETE - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/scans/{scan-id}
DELETE - /data/experiments/{experiment-id | experiment-label}/scans/{scan-id}
Params
{project-id} | Required path parameter |
---|---|
{subject-id} or {subject-label} | Required path parameter |
{experiment-id} or {experiment-label} | Required path parameter |
{scan-id} | Required path parameter. Specify a scan ID that already exists in this image session. |
removeFiles | Optional query param. Defaults to "FALSE", which will leave files in the file system after deleting the experiment record in Postgres. When this param is set to "TRUE", those files are permanently deleted. |
Response Code
200 | Scan Deleted |
---|---|
403 | Permission Denied (User cannot delete data in this project) |
Response Format: none