Page tree

Versions Compared

Key

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

...

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

Parameters

{project-id}Required path parameter
{subject-id} or {subject-label}Required path parameter
{experiment-id} or {experiment-label}Required path parameter
{resource-label}Required path parameter. Specify the label of the resource that you want to create. XNAT will automatically assign an ID.
format

Optional querystring parameter. Specify a string format descriptor for this resource folder.

tagsOptional querystring parameter. Specify a comma-separated list of tags for this resource folder.
contentOptional querystring parameter. Specify a string description of the resource folder's content.

Response: None

Upload A New Experiment Resource File

...


Code Block
PUT - /data/experiments/{session-id}/assessors/{assessor-id}/{in|out}/resources/{resource-id}/files/{filename}
PUT - /data/projects/{project-id}/subjects/{subject-label}/experiments/{session-label}/assessors/{in|out}/resources/{resource-label}/files/{filename}

Get The Contents Of An Image Assessor Resource File

...

Response:

RAW file content


Upload A New Experiment Resource File

Notes:

  • {filename}must be unique within this resource folder, otherwise the file will not be uploaded.
  • If {resource-id} does not exist in this assessor, it will be automatically created.

Code Block
PUT - /data/experiments/{session-id}/assessors/{assessor-id}/{in|out}/resources/{resource-id}/files/{filename}
PUT - /data/projects/{project-id}/subjects/{subject-label}/experiments/{session-label}/assessors/{assessor-label}/{in|out}/resources/{resource-label}/files/{filename}

Parameters

{project-id}Required path parameter
{subject-id} or {subject-label}Required path parameter
{experiment-id} or {experiment-label}Required path parameter
{assessor-id} or {assessor-label}Required path parameter
{in|out}

Required path parameter.

  • "out" is the standard grouping for downloadable resources
  • "in" is the standard grouping for resources meant to be consumed by pipelines or other processes
{resource-id} or {resource-label}Required path parameter. If this resource collection is not already defined, it will be defined automatically by this call.
{filename}Required path parameter. This will be the name of the file as it is stored in XNAT. It can be different from the original name of your uploaded file.
inbody=trueOptional querystring parameter. Use if including the file in the body of the request as opposed to part of a multi-part form data
fileRequired body or form parameter.
format

Optional querystring parameter. Specify a string format descriptor for this resource folder.

contentOptional querystring parameter. Specify a string description of the resource folder's content.

Response Codes

200OK - File Created

OK - Duplicates Existing File (File not created or updated)

OK - User does not have permission to upload files (File not created or updated)


Update An Existing Image Assessor Resource File

Code Block
POST - /data/experiments/{session-id}/assessors/{assessor-id}/{in|out}/resources/{resource-id | resource-label}/files/{filename}?overwrite=true

Parameters

{session-id}Required path parameter
{assessor-id}Required path parameter
{in|out}

Required path parameter.

  • "out" is the standard grouping for downloadable resources
  • "in" is the standard grouping for resources meant to be consumed by pipelines or other processes
{resource-id} or {resource-label}Required path parameter.
{filename}Required path parameter. This must match an existing file name as it is stored in XNAT.
overwrite=trueRequired querystring parameter. This must be set to allow your new file to overwrite your existing one
fileRequired body parameter
inbody=trueOptional querystring parameter. Use if including the file in the body of the request as opposed to part of a multi-part form data

Response Codes

200OK


Delete An Image Assessor Resource Collection

Warning

This URI will also delete all resource files in the collection


Code Block
DELETE - /data/experiments/{session-id}/assessors/{assessor-id}/{in|out}/resources/{resource-id | resource-label}

Parameters

{session-id}Required path parameter
{assessor-id}Required path parameter
{in|out}

Required path parameter.

  • "out" is the standard grouping for downloadable resources
  • "in" is the standard grouping for resources meant to be consumed by pipelines or other processes
{resource-id} or {resource-label}Required path parameter.

Response Codes

200OK
403Forbidden

Response: None


Delete An Image Assessor Resource File

Code Block
DELETE - /data/experiments/{session-id}/assessors/{assessor-id}/{in|out}/resources/{resource-id | resource-label}/files/{filename}

Parameters

{session-id}Required path parameter
{assessor-id}Required path parameter
{in|out}

Required path parameter.

  • "out" is the standard grouping for downloadable resources
  • "in" is the standard grouping for resources meant to be consumed by pipelines or other processes
{resource-id} or {resource-label}Required path parameter.
{filename}Required path parameter. This must match an existing file name as it is stored in XNAT.

Response Codes

200OK
403Forbidden

Response: None