cachethq / cachet

🚦 The open-source status page system.
https://cachethq.io
MIT License
13.98k stars 1.55k forks source link

Feature Request: specify a sort order for list of incidents #1872

Closed Bekbolatov closed 8 years ago

Bekbolatov commented 8 years ago

Sometimes one wants to get only the last incidents:
GET .../incidents?...&order=desc

jbrooksuk commented 8 years ago

You can order Incidents by:

And you can filter incidents by:

This is part of the documentation updates I need to do this weekend :)

https://github.com/CachetHQ/Cachet/blob/2.3/app/Models/Incident.php#L72-L91

Bekbolatov commented 8 years ago

Thanks! What about asc/desc? On Jun 2, 2016 1:01 AM, "James Brooks" notifications@github.com wrote:

Closed #1872 https://github.com/CachetHQ/Cachet/issues/1872.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CachetHQ/Cachet/issues/1872#event-679455893, or mute the thread https://github.com/notifications/unsubscribe/ADmM--luljGvtX56u9r6W8toSFA7Limaks5qHo3YgaJpZM4Irv6k .

jbrooksuk commented 8 years ago

You can use the order parameter and asc or desc such as https://demo.cachethq.io/api/v1/incidents?order=desc.