beautypg.com

HP StoreAll Storage User Manual

Page 167

background image

curl -g "http[s]://:/[/[]]?

nl

[version=1][attributes=[,,…]]&query=

nl

[&recurse][&skip=][&top=][&ordered]"

See

“Using HTTP” (page 114)

for information about the IP address, port, and URL path. If the

urlpath

or pathname does not exist, a JSON output of no results is returned (see the

“JSON

response format” (page 168)

), and the HTTP status code 200 (OK) is returned rather than an HTTP

error such as 404 (Not Found).

Description

Parameter

The name of the existing file or directory on the HTTP share, if querying metadata of a
single file/directory. If not present, the query applies to the . Furthermore:

pathname

Directory pathnames must end in a trailing slash /.

If the &recurse identifier is supplied for a directory, the query applies to the entire
directory tree: the directory itself, all files in that directory, and all subdirectories
recursively.

If the &recurse identifier is not supplied and the pathname is for a directory, the
query operates only on the given directory and all files in that directory or directory
of files, but not subdirectories.

If the pathname is for a file, the query applies only to the file

A comma-separated list of system and/or custom metadata attribute names to be returned
in the JSON response for each file or directory matching the query criterion. The special

attr[n]

attribute names *, system::*, and custom::* are described under

“Wildcards”

(page 166)

.

A system and/or custom metadata attribute to be compared against the value as the
query criterion. Only one attribute can be listed per command.

query_attr

The query operation to perform against the query_attr and value, one of:

operator

=

(equals exactly)

!=

(does not equal)

<

(less than)

<=

(less than or equal to)

>

(greater than)

>=

(greater than or equal to)

Only for custom attributes and string-valued system attributes (for example,
system::path

, system::tier):

~

(regular expression match)

!~

(does not match regular expression)

The value to compare against the query_attr using the operator. The value is either
a numeric or string literal. See

“General topics regarding HTTP syntax ” (page 153)

for

details about literals.

query_value

If the recurse attribute is present, the query searches through the given directory and
all of its subdirectories. If the recurse attribute is not present, the query operates only

recurse

on the given file, directory, or directory of files (but not subdirectories). See pathname
earlier in this table for details.

If this attribute is present, it defines the number of records to skip before returning any
results. The value is zero-based. See

“HTTP syntax” (page 166)

.

skip_records

If this attribute is present, it defines the maximum number of total records to return from
the result set. See

“HTTP syntax” (page 166)

.

max_records

If this attribute is present, the list of files and attributes returned is sorted lexicographically
by file name. The use of ordered on large results sets might affect the performance of
the query. Without ordered, files might occur in any order in the result set.

ordered

Metadata queries

167