API Explorer
API Explorer
Getting Started
Authentication and Authorization
Asset Management
Storage Management
Protection Policies
Inventory Source Management
Monitoring
Compliance

Sort the Result

In this tutorial, you can learn how to tailor responses according to your sorting requirements.

In PowerProtect Data Manager REST API, sorting is accomplished by using the query parameter orderby:

?orderby=<field-name-1> ASC,<field-name-2> DESC

For example, if you want to get the activities sorted by createTime in descending order and duration in ascending order:

curl --request GET \
  --url 'https://<your-ppdm-server>:8443/api/v2/activities?orderby=createTime%20DESC%2Cduration%20ASC' \
  --header 'authorization: Bearer <access-token>'

Each field that can be sorted within a response is marked as x-ppdm-sort:true in the API specification document.