1.5

Table Of Contents
Table 9-3. Query Parameters
Parameter Name Parameter Description Default
type
The type of the query. Type names are case-sensitive. See
“Query Types,” on page 202.
None. This parameter is
required for all typed
queries, and is not allowed
for any packaged query.
sortAsc=attribute-name Sort results by attribute-name in ascending order. Sorted by database ID
sortDesc=attribute-name Sort results by attribute-name in descending order. Sorted by database ID
page
If the query result spans multiple pages, return this page.
page=1
pageSize
Number of records per page. If this number exceeds
configured maxPageSize, then only maxPageSize records are
returned.
defaultPageSize
format
One of the following types:
references
Returns a reference to each object,
including its name, type, and href
attributes.
records
Returns all database records for each
object, with each record as an attribute.
idrecords
Identical to the records format, except
that object references are returned in id
format rather than href format.
format=records
fields
Comma-separated list of attribute names to return Returns all attributes
offset
Integer value specifying the first record to return. Record
numbers < offset are not returned.
offset=0
filter
Filter expression. See Table 9-4 None
Filter Expressions
You can filter query results by appending an optional filter to your query request. A filter comprises one or
more subexpressions drawn from the following set of operators.
Table 9-4. Query Filter Expressions
Operator Example Operation
==
attribute==value Matches. The example evaluates to true if attribute
matches value in a case-insensitive comparison.
Asterisk (*) characters that appear anywhere in
value are treated as wildcards that match any
character string.
!=
attribute!=value Does not match. The example evaluates to true if
attribute does not match value in a case-insensitive
comparison. Wildcard characters not allowed.
;
attribute1==value1;attribute2!=value2 Logical AND. The example evaluates to true only if
attribute1 matches value1 and attribute2 does not
match value2
,
attribute1==value1,attribute2==value2 Logical OR. The example evaluates to true if either
attribute1 matches value1 or attribute2 matches value2
vCloud API Programming Guide
212 VMware, Inc.