6.5 HP StoreAll OS User Guide

Example queries
Get selected metadata for a given file
The following is one command line:
curl -g "http://99.226.50.92/ibrix_share1/lab/images/xyz.jpg?
nl
attributes=system::size,physician"
This example queries only the file called xyz.jpg in the lab/images subdirectory on the
ibrix_share1 HTTP share. A JSON document is returned containing the system size value and
the custom metadata value for the physician attribute, for this file only.
Get selected system metadata for all files in a given directory
The following is one command line:
curl -g "http://99.226.50.92/ibrix_share1/lab/images/?attributes=
system::mode,system::tier"
This example queries only the directory lab/images on the ibrix_share1 HTTP share. A JSON
document is returned containing the POSIX mode/permission bits and storage tier name for the
lab/images directory itself in addition to the files and directories in lab/images (but not in
any recursive subdirectories, because there is no &recurse option).
Get selected metadata for all files in a given directory
The following is one command line:
curl -g "http://99.226.50.92/ibrix_share1/lab/images/?attributes=
system::size,physician"
This example queries all files in the ibrix_share1 HTTP share in the subdirectory lab/images
of the share, but not files or directories in any subdirectories. A JSON document is returned
containing the system size value and the custom metadata value for the physician attribute, for
all files in lab/images. For files that don’t have a physician attribute, only the system::size
is returned.
Get selected metadata for all files in a given directory tree
The following is one command line:
curl -g "http://99.226.50.92/ibrix_share1/lab/images/?attributes=
system::size,physician&recurse&ordered"
This example queries all files in the lab/images subdirectory of the ibrix_share1 HTTP share,
in addition to the files in all subdirectories, recursively walking the directory tree. A JSON document
is returned containing the system size value and the custom metadata value for the physician
key, for all files and subdirectories in the lab/images directory tree, as well as for the lab/
imagesdirectory itself. The list of files is ordered alphabetically by file name.
Get selected metadata for a page of files in a given directory tree
The following is one command line:
curl -g "http://99.226.50.92/ibrix_share1/lab/images/?attributes=
system::size,physician&recurse&skip=2000&top=100"
This example queries all files in the lab/images subdirectory of the ibrix_share1 HTTP share,
in addition to the files in all subdirectories, recursively walking the directory tree. A JSON document
is returned containing the system size value and the custom metadata value for the physician
key, for result set entries 2001 through 2100. The results are not ordered, which speeds up the
query. In a typical scenario, such as in the example mentioned in this section, the client has already
238 HTTP-REST API file-compatible mode shares