/data/services/refresh/catalog

XNAT REST API Directory

/data/services/refresh/catalog

HTTP Command

Request & Response format

GET: REQ

GET: RESP

PUT: REQ

PUT: RESP

POST: REQ

resource=URI fragment
options=checksum,delete,append 

POST: RESP

DELETE: REQ

DELETE: RESP

Details

Introduced with XNAT 1.6.2, the refresh catalog service is used to update catalog xmls that are out of sync with the file system.  This service can be used to store checksums for entries that are missing the, remove entries that no longer have valid files, or add new entries for files that have been manually added to the archive directory

When using this feature to add files that have been manually added to the archive directory, you must have placed the files in the appropriate archive directory (in the same directory as the generated catalog xml or a sub-directory).  The catalog xml should already exist before triggering this service.  If you haven't generated the catalog yet, you can do so by doing a PUT to the resource URL (i.e. /data/archive/experiments/ID/resources/TEST).

Note that you can reference an object that contains resources instead of referencing resources themselves.  So, if you want to update all of the resources for an entire MR session, you could reference the MR URL as your input, /services/refresh/catalog?resource=/archive/experiments/EXPT.

Parameters:

resource (REQUIRED): Used to reference the resource that should be refreshed.  You can reference multiple resources, by including multiple resource parameters. However, the refresh operation interacts with the file system and can be an expensive transactions, so you are encouraged to limit the number of resources you are updating at one time.  Possible resources are listed below.

* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/scans/SCAN/resources/LABEL
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/scans/SCAN
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/reconstructions/RECON/resources/LABEL
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/reconstructions/RECON
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/assessors/ASSESSOR/resources/LABEL
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/assessors/ASSESSOR
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT/resources/LABEL
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/experiments/EXPT
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT/resources/LABEL
* /services/refresh/catalog?resource=/archive/projects/PROJECT/subjects/SUBJECT -- will not cascade to children (experiments)
* /services/refresh/catalog?resource=/archive/projects/PROJECT/resources/LABEL
* /services/refresh/catalog?resource=/archive/projects/PROJECT-- will not cascade to children (subjects or experiments)
* /services/refresh/catalog?resource=/archive/experiments/EXPT/scans/SCAN/resources/DICOM
* /services/refresh/catalog?resource=/archive/experiments/EXPT/scans/SCAN
* /services/refresh/catalog?resource=/archive/experiments/EXPT/reconstructions/RECON/resources/LABEL
* /services/refresh/catalog?resource=/archive/experiments/EXPT/reconstructions/RECON
* /services/refresh/catalog?resource=/archive/experiments/EXPT/assessors/ASSESSOR/resources/LABEL
* /services/refresh/catalog?resource=/archive/experiments/EXPT/assessors/ASSESSOR
* /services/refresh/catalog?resource=/archive/experiments/EXPT/resources/LABEL
* /services/refresh/catalog?resource=/archive/experiments/EXPT
* /services/refresh/catalog?resource=/archive/subjects/SUBJECT/resources/LABEL
* /services/refresh/catalog?resource=/archive/subjects/SUBJECT -- will not cascade to children (experiments)

options: refresh operations to perform on this resource(s).  If left blank, then the catalog will be reviewed and updated for validity, but nothing else.

    • checksum: generate checksum's for any entries that are missing them
    • delete: remove entries that do not reference valid files
    • append. add entries for files in the catalog directory (or sub-directory)
    • populateStats: updates the statistics for the resource in the XNAT abstract resource table.

$label.name