CRREL / GRiD-API

9 stars 3 forks source link

Ability to sort returns #41

Closed AlexMountain closed 5 years ago

AlexMountain commented 6 years ago

It would be nice to be able to sort returns by values where it makes sense to do so. We can add this by taking in an additional sort query parameter.

AOI sort options: area, created_at, name, pk, user. Default sort is by pk.
Export sort options: name, pk, started_at, user. Default sort is by pk.
Product sort options: collected_at, name, pk. Default sort is by pk.
Task sort options: name, state, task_id, time_stamp. Default sort is by task_id.
Hook sort options: created_at, event, pk, target. Default sort is by pk.

The - character can be prepended to the sort string to indicate a descending sort.

AlexMountain commented 5 years ago

The above sorts have been implemented and deployed to all systems with the GRiD 1.4.5 release as an enhancement to v3.