Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Contents

Table of Contents

...


Get A Listing Of Scans From An Image Session

Code Block
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

formatOptional querystring parameter
  • json (default)
  • html
  • xml
  • csv

Response

Code Block
{
  "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

Code Block
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
formatOptional querystring parameter
  • html (default)
  • json
  • xml
  • csv

Response

Each items[n].children object in the response object contains another itemsarray that contains resource details.

Expand
titleShow JSON Response Object


Code Block
{
  "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.

...

Code Block
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:

  • ?xsiType=xnat:mrScanData
{params}

Optional querystring parameters. You can add additional scan descriptors using Scan Data REST XML Path Shortcuts. Example:

  • ?xnat:mrScanData/type=T1


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.

Note

This is the same URI as when creating a scan, but you are using a scan ID that already exists.


Code Block
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:

  • ?xsiType=xnat:mrScanData
{params}

Optional querystring parameters. You can add additional scan descriptors using Scan Data REST XML Path Shortcuts. Example:

  • ?xnat:mrScanData/type=T1



Delete Scan From Image Session

Code Block
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 new scan ID that does not already exist in this image session.

Response Code

200Scan Deleted
403Permission Denied (User cannot delete data in this project)

Response Format: none