HP OneView REST API Reference

Common REST API Parameters
stdparams.html[10/17/2013 10:36:08 AM]
Sort the returned list of resources by the name field in ascending order, then by status in descending
order:
sort=name:asc,status:desc
Sort alphanumerically the returned list of resources by the name field in ascending order, then then sort by
status in descending order:
sort=name:asc:natural,status:desc
Limitations:
1. The alphanumeric sort option should not be used with DISTINCT query. The below query does not work
in postgres sql if you use DISTINCT in 'select' and any database function in 'order by' clause For
example, query:
select DISTINCT name from table1 order by lower(name))
results in the error:
SELECT DISTINCT, ORDER BY expressions must appear in select list.
This is a limitation from hibernate. When a Criteria is set with DISTINCT using Projections as shown in the
following example, it generates a similar SQL, which fails on execution with the same error.:
criteria.setProjection(Projections.distinct(Projections.property("firstName")));
The alphanumeric sort format should not be used when a criteria is set with Distinct.
2. The DB function for alphanumeric sort is slower, which can delay receiving the result data set.
Note:
- Alphanumeric sort is available as an optional feature which should be used with caution. HP
recommends using default sort in cases like these.
- The format of sort string is case-insensitive. Alternatively, short form asc and desc can be used for
ascending and descending respectively.
start
The 0-based index of the first resource to return (start=0 starts with the first available resource). If the specified
count does not return all resources within the maximum allowed time (see count), use the start parameter to
view additional resource pages. The default value for start is 0 (first available resource).
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. Note that the start and count parameters are applied to the
results, based on the specified sort order and any filter or query parameters. The same sort and
filter/query parameters must be present on requests for subsequent "pages."
view
Return a specific subset of the attributes of the resource or collection by specifying the name of a predefined view.
The default view is expand (show all attributes of the resource, and all elements of collections or resources).
Format
view="{view-name}"
Many views are specific to the resource type. The following named views are common across some
resource types.
expand
The expand view (the default when no view parameter is specified) returns all client-visible
attributes of the resource. In the case of collections (including collections that are members of
the requested resource), this includes the individual elements of the collection.
summary
For individual resources, the summary view returns only a subset of the client-visible attributes
of the resource, suitable for a high-level summary. Each resource type interprets the summary
view as appropriate for that resource type. For collection URIs (or for any collections that are
members of the requested resource), the summary view does not return the individual elements
of the collection.
deep
In many cases a given resource can contain references to other resources in the form of a URI.
For example, the default view of a task resource includes an associated resource URI. The
deep view will expand that URI to show the actual resource designated by that URI.
Notes
See the individual resource API specifications for additional views supported by those resources.