beautypg.com

Combining expressions with the and operator, Regular expressions – HP StoreAll Storage User Manual

Page 235

background image

Description

Parameter

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 218)

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 234)

.

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 234)

.

max_records

If this attribute is present, the list of files and attributes returned is sorted lexicographically
by JSON key field (for example, pathname for default query mode or poid for bypoid

ordered

mode, see

“Query mode” (page 231)

). The use of ordered on large results sets might

affect the performance of the query. Without ordered, the JSON keys might occur in
any order in the result set.

If this attribute is present, it returns the freshness dates in the response header. See

“Freshness” (page 305)

.

freshness

If this attribute is present, live and deleted files are considered in the JSON output
response. The JSON key will be the poid field instead pathname. See

“Query mode”

(page 231)

.

bypoid

Combining expressions with the and operator

You can combine up to 10 expressions with the and operator.

That is, you can combine system and custom metadata in multiple expressions and can also repeat
the same attribute more than once. However, the following combinations may need some attention:

If system::deleteTime is included, the bypoid attribute should be included in the request,
otherwise a HTTP 400 Bad request will be returned.

The combination of live file attributes and deleted file attributes are not allowed even with the
bypoid attribute, and a this type of request will return an HTTP 409 Conflict error.

The formatting of the AND operator depends on the HTTP client tool you are using.

Table 29 Supported formats for the and operator

Supported format

HTTP client tool

+AND%+

CURL

Web browser, such as Microsoft Explorer or Mozilla Firefox

+AND+

You can also replace + with a space before and
after the and operator.

An example of AND being used to combined two expressions (format for the CURL tool)

curl -g http://10.10.21.203/api/?attributes=system::size&query=system::size>0%20and%20system::size<10240

Regular expressions

The arguments to the regular expression operators (~ and !~) are POSIX regular expressions, as
described in POSIX 1003.1-2008 at

http://pubs.opengroup.org/onlinepubs/9699919799

/,

section 9, Regular Expressions.

Metadata queries 235