Orderby Parameter

The orderby query parameter is used to sort items in a resource collection to be returned in a response.

The parameter accepts the array data type. To sort a resource collection use the orderby query parameter in the following format:

GET https://<hostname>:<port>/api/<version>/Endpoint?orderby=[{"property":"<property>","direction":"<direction>"}]

where:

  • <property> is a resource property name.
  • <direction> is a direction specifier.

The Veeam Backup for Google Cloud REST API accepts the following direction specifiers:

Direction Specifier

Description

ASC

Defines the ascending order of the resource collection representation.

DESC

Defines the descending order of the resource collection representation.

Examples

  • To sort plans by their state, send the following request:

GET https://123.123.123.123:13140/api/5.0/Plans?orderby=[{"property":"state","direction":"ASC"}]

  • To sort recovery locations by their type and name, send the following request:

GET https://123.123.123.123:13140/api/5.0/RecoveryLocations?orderby=[{"property":"type","direction":"ASC"},{"property":"name","direction":"ASC"}]

To learn more about properties of a specific resource that can be used as Sort query parameter values, see the REST API Reference.