Sorting resource lists

Content Platform Tenant Management Help

File Size
4269 KB
Part Number

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 namespaces by name or by hard quota. You can sort user accounts by username.

To specify a sort property and sort order, you use these query parameters in the GET request:

specifies the property you want to sort by. Valid values are:
  • For the namespaces and dataAccessPermissions resources, name and hardQuota
  • For the userAccounts resource, username
This parameter is optional. For the namespaces and dataAccessPermissions resources, the default is name.
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 in descending order by hard quota:

curl -k -i -H "Accept: application/xml"
    -H "Authorization: HCP YWxscm9sZXM=:04EC9F614D89FF5C7126D32ACB448382"    "

These considerations apply to sorting resource lists:

  • The sortType and sortOrder parameters are valid only with the namespaces, userAccounts, and dataAccessPermissions resources.
  • You can page, sort, and filter resource lists in the same request.