HP OneView REST API Reference
Common REST API Parameters
stdparams.html[10/17/2013 10:36:08 AM]
Example for regex:
name with value 'alertMax'(Case insensitively):
https://{appl}/settings/rest/resources?filter="'name' regex
'alertMax'"
name with value exactly 'alertMax' (Case sensitively):
https://{appl}/settings/rest/resources?filter="'name' sregex
'alertMax'"
name starts with alertMax
https://{appl}/settings/rest/resources?filter="'name' regex
'^alertMax'"
name ends with some words Deviation
https://{appl}/settings/rest/resources?filter="'name' regex
'Deviation$'"
name contains either alert or restore.
https://{appl}/settings/rest/resources?filter="'name' regex
'(alert|restore)'"
force
If set to true, the operation completes even if there are network connectivity issues or resource errors. The
default is false.
Some (but not all) resource update (PUT) and delete (DELETE) APIs that would otherwise fail can be forced to
complete by setting the request parameter force=true. This parameter is only allowed where it is listed in the
individual API specifications.
multiresource
Set to true when the request body is an array of objects to be added, rather than a single object. The default is
false.
This parameter only applies to POST (add) operations when multiple resources are to be added as a single
operation. The objects to be added are specified as an array of resource objects. This parameter is only allowed
where it is listed in the individual API specifications.
query
This parameter is experimental for this release: While generally functional when used in simple cases,
restrictions might be noted in the implementation description.
If the query is supported, the following is the way it works. A general query string that narrows the list of resources
returned by a multi-resource GET (read) request and DELETE (delete) request. The default is no query (all
resources are returned). One advantage query has over filter is that it can have embedded ORs. A single
query parameter can do what would take multiple parameters or multiple GET requests using filter. Use
query for more complex queries.
The query parameter is based on the URI Filter Language. The URI Filter Language was formerly known as the
BTO Query Language or BQL. URI Filter Language uses alphabetic tokens "OR", "AND", "EQ", "NE", "GT", "LT",
"GE", "LE", "LIKE", "IS NULL", "IN" instead of "=", "<>", "!=", ">", "<", ">=", "<=". This change avoids issues caused
when security tools alter the previously-used symbols to prevent cross-site scripting.
Format
query=" {attribute} {operator} ' {value} '"
{attribute}: the resource attribute being filtered (e.g., model, platform, etc.)
{operator}: one of [ EQ, NE, GT, GE, LE, LT, like, IS NULL, AND, OR , IN ]
{value}: the value of the attribute being filtered. For like this is an expression string, supports
SQL wildcard.
Limitations
Expected to work: expressions against top-level strings and numeric properties
Sometimes works: expressions against top-level enum values