Page tree

Versions Compared

Key

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

...

Note

For an image session, this only URI only returns resources stored with the experiment, not any resources stored at the scan or image assessor context. See Image Session Scans API and Image Assessor Resource API for details.


Code Block
GET - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/resources
GET - /data/experiments/{experiment-id}/resources

...

{project-id}Path parameter
{subject-id} or {subject-label}Path parameter. Subject label is a project-specific field, and can only be used if a project is specified.
{experiment-id} or {experiment-label}Path parameter. Experiment label is a project-specific field, and can only be used if a project is specified.
format

Optional querystring parameter. Specify the format of the returned response.

  • json (default)
  • html
  • xml
  • csv
sortByOptional querystring parameter: Sort the returned results by one or more parameters in the Result array. Multiple parameters can be provided, separated by commas.

Response

This call returns an array of resource descriptors, where the key values are "xnat_abstractresource_id" and "label", which can be used as a path parameter.

...

{project-id}Path parameter
{subject-id} or {subject-label}Path parameter. Subject label is a project-specific field, and can only be used if a project is specified.
{experiment-id} or {experiment-label}Path parameter. Experiment label is a project-specific field, and can only be used if a project is specified.
format

Optional querystring parameter. Specify the format of the returned response.

  • json (default)
  • html
  • xml
  • csv
sortByOptional querystring parameter: Sort the returned results by one or more parameters in the Result array. Multiple parameters can be provided, separated by commas.

Response

This call returns an array of file listings, where each has a unique URI path to the resource file.

...

Get The Contents Of An Experiment Resource File

Tipnote

The second URI below is exactly the same as is specified in the previous GET call for a listing of filesThis URI returns the raw contents of a resource file. If your client cannot parse this file, it will not provide a usable output. See How To Download Files via the XNAT REST API for help on downloading resources.


Code Block
GET - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/resources/{resource-id | resource-label}/files/{filename}
GET - /data/experiments/{experiment-id}/resources/{resource-id}/files/{filename}

...

Code Block
PUT - /data/projects/{project-id}/subjects/{subject-id | subject-label}/experiments/{experiment-id | experiment-label}/resources/{resource-label}
PUT - /data/experiments/{experiment-id | experiment-label}/resources/{resource-label}

...