mfeltscher
11 years agoExpert
Get polls ordered by their start_date
Hi there I'm trying to get the active poll with the most recent start date. Therefore I'm looking for a ReST API call to get polls ordered by their start date. Is this possible somehow? How are ...
- 11 years ago
I don't know about polls specifically, but you can't normally order REST query results. However, you can sort the results in FreeMarker, so you can create a custom endpoint to achieve this.
For example, I've used this technique to get a list of all products ordered by average rating.
The FreeMarker reference for sorting sequences is here:
http://freemarker.org/docs/ref_builtins_sequence.html#ref_builtin_sort