Sorting

Sorting.

To sort data, specify sort as a request parameter. Also, specify the column by which you want to sort.

Examples

For example, sort by the studentName column, in ascending order:

curl -X GET 
  -H "X-Appery-Database-Id: 544a5cdfe4b03d005b6233b9" 
  -d 'sort=studentName'
  https://api.appery.io/1/db/collections/students
To sort in descending order, specify the column name with - before it:

curl -X GET 
  -H "X-Appery-Database-Id: 544a5cdfe4b03d005b6233b9" 
  -d 'sort=-studentName' 
  https://api.appery.io/1/db/collections/students
You can also sort by more than one column:
curl -X GET 
  -H "X-Appery-Database-Id: 544a5cdfe4b03d005b6233b9" 
  -d 'sort=studentName,studentId' 
  https://api.appery.io/1/db/collections/students