You can sort the results of an endpoint by passing the sort parameter. The sort parameter should be a comma-separated list of fields to sort by. You can also specify the sort order by appending asc or desc to the field name.
Copy
Ask AI
GET /api/incidents?sort=id
To reverse the sort order, you can prefix the field name with a hyphen.
Copy
Ask AI
GET /api/incidents?sort=-id
Each endpoint may support different fields for sorting. Check the documentation for the specific endpoint you are working with.