HP OneView REST API Reference
Common REST API Parameters
stdparams.html[10/17/2013 10:36:08 AM]
owner with specify multiple values 'administrator' or 'infrastructure':
https:// {appl} /rest/tasks?query="owner IN
('administrator','infrastructure')"
'AND' operator displays a record if both the first condition and the second condition are true.
Example for AND:
name with value 'Task Resource V2' AND name with value 'Task Resource V2':
https:// {appl} /rest/tasks?query="name EQ 'Task Resource V1' AND
name EQ 'Task Resource V2'"
'OR' operator displays a record if either the first condition or the second condition is true.
Example for OR:
name with value either 'Task Resource V2' OR 'Task Resource V2':
https:// {appl} /rest/tasks?query="name EQ 'Task Resource V1' OR name
EQ 'Task Resource V2'"
Combination of AND and OR Symbol
Example for 'OR' and 'AND' combination:
name with value either 'Task Resource V2' OR 'Task Resource V2' AND name with value 'Delete
alerts.':
https:// {appl} /rest/tasks?query="name EQ 'Task Resource V1' OR name
EQ 'Task Resource V2' AND name EQ 'Delete alerts.'"
'like' support the SQL Wildcard notations * (0 or more chars) , _ (any single char), and exact match. This
pattern matches the entire string. The 'like' is Case sensitively
Example for like:
owner with value exactly 'administrator'
https:// {appl} /rest/tasks?query="owner like administrator"
Using wild card operator '*' to match 0 or more characters
https:// {appl} /rest/tasks?query="owner like admin*"
sort
The sort order of the returned data set. By default, the sort order is based on the create time, with the oldest entry
first.
The format of the sort parameter is similar to the "order by" clause in SQL.
Format
Default sort on single attribute:
sort={attribute}:ascending|descending
Default sort on multiple attributes:
sort={attribute}:ascending|descending,{2nd
attribute}:ascending|descending...
Alphanumeric sort on single attribute:
sort={attribute}:ascending|descending:natural
Alphanumeric sort on multiple attributes:
sort={attribute}:ascending|descending:natural,{2nd
attribute}:ascending|descending:natural...
{attribute}: the resource attribute used as the primary sort key
{2nd attribute}: the resource attribute used as the secondary sort key
(additional sort keys as needed)
Example