NIH | National Cancer Institute | NCI Wiki  

If your user account has the Read permission level on a collection in DME, the following command allows you to retrieve all metadata associated with that collection:

dm_get_collection [optional parameters] <collection-path>


The following table describes each parameter: 

ParameterDescription
[-h]If you want to print a usage (help) message for this command, specify this option.
[-D <REST-response>]

An optional parameter, specifying a path and filename in your local system. The system always creates a response file:

  • If you specify this parameter, the system saves the response from the server to the specified file in the specified location.
  • If you omit this parameter, the system saves the file as get-item-response-header.tmp in your home directory.
[-o <metadata-file>]

An optional parameter, specifying a path and filename in your local system. The system always creates a metadata file:

  • If you specify this parameter, the system saves the metadata to the specified file in the specified location.
  • If you omit this parameter, the system prints the metadata to standard output and saves the file as get-item-response-message.json.tmp in your home directory.

The metadata includes information about the data file, a list of attribute values for the file, and a list of attribute values for the parent collection.

<collection-path> 
The path to the collection in DME.

For example, the following command allows you to retrieve the metadata associated with the PI_Lab1 collection:

dm_get_collection /Example_Archive/PI_Lab1


The basic format of the command output is as follows:

{
    "collections": [
        {
            "collection": {...},
            "metadataEntries": {
                "parentMetadataEntries": [...],
                "selfMetadataEntries": [...]
            }
        }
    ]
}

In this format, the "collection" and "selfMetadataEntries" elements provide information about the collection you specified, while the "parentMetadataEntries" element provides information about the collection that contains the collection you specified.