Sorting

Sorting is available from version 3.3 of the Dataloy API

Within  API 3.3 release is possible sort the result of any search. The following type of sorting are supported:

  • ASCENDING (ascending order,  case - or database sensitive)
  • ASCENDING INSENSITIVE (ascending order, case-insensitive)
  • DESCENDING (descending order, case - or database - sensitive)
  • DESCENDING INSENSITIVE (descending order, case-insensitive)

ASCENDING

http://localhost:8080/ws/rest/Vessel?sort=vesselName(AS)

ASCENDING INSENSITIVE

http://localhost:8080/ws/rest/Vessel?sort=vesselName(ASI)

DESCENDING 

http://localhost:8080/ws/rest/Vessel?sort=vesselName(DS)

DESCENDING INSENSITIVE

http://localhost:8080/ws/rest/Vessel?sort=vesselName(DSI)

 

It is possible use sorting in combination with any filter and pagination:

http://localhost:8080/ws/rest/Vessel?sort=vesselName(DSI)&filter=flag.countryCode(EQ)HK&pageNumber=4&limit=10