You can retrieve a sorted list of items of a particular resource type by specifying the property you want to sort by and the sort order in the GET request. You can sort
To specify a sort property and sort order, you use these query parameters in the GET request:
•sortType=property-name specifies the property you want to sort by. Valid values are:
oFor the
oFor the userAccounts resource, username
This parameter is optional. For the
•sortOrder=(ascending|descending) specifies the order in which to sort the listed items.
This parameter is optional. The default is ascending.
For example, this GET request sorts the list of
curl -k -i -H "Accept: application/xml"
-H "Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382" "https://admin.hcp.example.com:9090/mapi/tenants?sortType=hardQuota
&sortOrder=descending&prettyprint"
These considerations apply to sorting resource lists:
•The sortType and sortOrder parameters are valid only with the
•You can page, sort, and filter resource lists in the same request. For information about paging, see Paging through resource lists. For information about filtering, see Filtering resource lists.
© 2015, 2020 Hitachi Vantara LLC. All rights reserved.