6.5 HP StoreAll OS User Guide

Metadata queries
You can issue StoreAll REST API commands that query the pathname and custom and system
metadata attributes for a set of files and directories. Queries can be augmented with a search
criterion for a certain system or custom attribute; only files and directories that match the criterion
are included in the results. The query can specify a single file or a directory. If identifying a directory,
the user can query all files in that directory only, or all files in all subdirectories of that directory
recursively.
Retention properties assignment
You can issue StoreAll REST API commands to change a file to the WORM (and optionally retained)
state and set its retention expiration time, subject to the file system’s retention policy settings.
General topics regarding HTTP syntax
Each feature is described in HTTP (with URL-encoded characters where required) and equivalent
curl formats, such as:
PUT command
Enter the following command on one line:
PUT /<urlpath>[/<pathname>]?[version=2&]assign=<attribute1>='<value1>'
nl
[,<attribute2>='<value2>'] HTTP/1.1
curl command
Enter the following command on one line:
curl -g -X PUT
"http[s]://<IP_address>:<port>/<urlpath>[/<pathname>]?[version=2&]
nl
assign=<attribute1>='<value1>'[,<attribute2>='<value2>']"
NOTE: The version was changed to 2 in 6.5. Since the 6.5 release, a new HTTP header response
is returned for each request to identify the API version (Api-Version: 2).
When using this syntax, note the following:
Optional parameters are shown in square brackets [ and ]. Everything enclosed in the brackets
can be omitted from the request. Do not include the square brackets in the request. For example,
the API supports either http or https for all requests, hence the http[s] nomenclature.
Parameters are shown in angle brackets < and >. Replace the parameter with the actual value,
without the angle brackets.
Other characters shown in the syntax (such as =, ?, &, and /) must also be entered as-is in
the request and sometimes must be URL-encoded.
All parameters before the ? (such as pathname) should be entered as strings without any
surrounding quotes in standard URL format.
All parameters after the ? (the query string in HTTP parlance) are either commands, attribute
names, or literals:
Attribute names must be 80 characters or less. The first character must be alphabetic (a-z
or A-Z), followed by a sequence of alphanumeric characters or underscores. No other
characters are allowed. Colon characters (:) are allowed in system attribute names. All
attribute names are case-sensitive.
Literals are either strings or numeric values.
218 HTTP-REST API file-compatible mode shares