HP OneView REST API Reference

Common REST API Parameters
stdparams.html[10/17/2013 10:36:08 AM]
HP OneView REST API Reference
Common REST API Parameters
Name Description
count
Optional parameter that specifies the number of resources to return from each API invocation. The number of
resources returned on each call is referred to as a page. If you specify a count, the API attempts to return the
specified number of resources, however this may be limited due to response time constraints and/or actual number
of resources available to return. The results include the total number of resources that match the filter or
query, the actual count returned, and the URIs to go to the next page, previous page, or both. If necessary, you
can make several requests using the URI for the next or previous page (or different start parameters) to get the
desired count.
This parameter only applies to GET (read) requests that return a list of resources. Use start and count to
retrieve a large set of resources in smaller groups.
Example
Return the first 100 items in a list of resources, sorted by the name attribute:
sort=name:ascending&start=0&count=100
filter
This parameter is experimental for this release: While generally functional when used in simple cases,
restrictions might be noted in the implementation description.
A general filter/query string that narrows the list of resources returned by a multi-resource GET (read) request and
DELETE (delete) request. The default is no filter (all resources are returned).
The filter parameter specifies a general filter/query string. This query string narrows the selection of resources
returned from a GET request that returns a list of resources. The filter parameter is not used on URIs representing
an individual resource, only on collection URIs.
Format
filter="[not] {attribute} {operator} '{value}'"
{attribute}: the resource attribute being filtered (for example, model, platform, etc.). Valid
attributes include simple data types for each API set (string, int), not complex data types.
{operator}: one of [ =, <>, >, >=, <, <=, matches, regex, ==, smatches,
sregex, sne ]
{value}: the value of the attribute being filtered. For
matches this is an expression string, supports SQL wildcard.
regex this is a regular expression string
Limitations
Expected to work: expressions against top-level strings and numeric properties
Sometimes works: expressions against top-level enum values
Not expected to work: expressions that reference nested fields
Commas (',') in attribute values passed into the 'filter' parameter are known to cause problems
Notes
Multiple filter statements represent an AND predicate
OR is accomplished via multiple GET requests
NOT is used to negate the condition
The operands [ >, >=, <, <= ] only apply to numeric attributes
Equals (=, eq, EQ), Not Equals(<>, ne, NE), regex and matches can be used for case-insensitive
string comparisons on 'values'.