...
{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. |
{session-id} or {session-label} | Path parameter. Session label is a project-specific field, and can only be used if a project is specified. |
{assessor-id} or {assessor-label} | Path parameter. Assessor 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.
|
sortBy | Optional 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 to return individual resource collections.
...
{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. |
{session-id} or {session-label} | Path parameter. Session label is a project-specific field, and can only be used if a project is specified. |
{assessor-id} or {assessor-label} | Path parameter. Assessor 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.
|
sortBy | Optional 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. Note the "out" in the URI path, signifying that the resource is downloadable.
...
Code Block |
---|
GET - /data/experiments/{session-id}/assessors/{assessor-id}/{in|out}/resources/{resource-id}/files/{filename} GET - /data/projects/{project-id}/subjects/{subject-label}/experiments/{session-label}/assessors/{in|out}/resources/{resource-label}/files/{filename} |
Parameters
{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. |
{session-id} or {session-label} | Path parameter. Session label is a project-specific field, and can only be used if a project is specified. |
{assessor-id} or {assessor-label} | Path parameter. Assessor label is a project-specific field, and can only be used if a project is specified. |
{in|out} | Path parameter. If you don't know this, query the /files API above to find the URI.
|
{resource-id} or {resource-label} | Path parameter |
{filename} | Path parameter |
Response:
RAW file content
...
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.
|
{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=true | Optional querystring parameter. Use if including the file in the body of the request as opposed to part of a multi-part form data |
file | Required body or form parameter. |
format | Optional querystring parameter. Specify a string format descriptor for this resource folder. |
content | Optional querystring parameter. Specify a string description of the resource folder's content. |
Response Codes
200 | OK - 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.
|
{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=true | Required querystring parameter. This must be set to allow your new file to overwrite your existing one |
file | Required body parameter |
inbody=true | Optional 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
200 | OK |
---|
Delete An Image Assessor Resource 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.
|
{resource-id} or {resource-label} | Required path parameter. |
Response Codes
200 | OK |
---|---|
403 | Forbidden |
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.
|
{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
200 | OK |
---|---|
403 | Forbidden |
Response: None