Sorting Parameter
The sort query parameter allows you to sort the requested collection.
- By default, sorting is in ascending order based on the attribute specified. To sort in descending order, prepend the attribute with a hyphen (
-). - Check the details for a specific resource to see the default sorting attribute and order, and if an attribute is sortable.
- Use sort=field for ascending order or sort=-field for descending, and separate several fields with commas: sort=-updated_at,id.
- The default is newest ID first.
- Fields that can't be sorted are ignored.
https://api.eventtemple.com/v2/events?sort=id # ASC
https://api.eventtemple.com/v2/events?sort=-id # DESCUpdated 30 minutes ago
Did this page help you?
