sort_by resolved_at in rest API

rest-api

(Mattias Frånberg) #1

Maybe I’m misunderstanding the API, but these two calls give me the same response (sorting by asc vs desc), so it seems like resolved_at doesn’t respect the sort_by:

curl -s -X GET --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Authorization: Token token=<TOKEN>' 'https://api.pagerduty.com/incidents?until=2018-08-30&offset=0&statuses%5B%5D=resolved&sort_by=resolved_at%3Aasc'

curl -s -X GET --header 'Accept: application/vnd.pagerduty+json;version=2' --header 'Authorization: Token token=<TOKEN>' 'https://api.pagerduty.com/incidents?until=2018-08-30&offset=0&statuses%5B%5D=resolved&sort_by=resolved_at%3Adesc'


(Jay Chiarella) #2

Hi Mattias,

Thanks for reporting this issue. I’ve been able to reproduce this issue as well

Could you please send us a note at support@pagerduty.com with this information you posted?

We have created a ticket for the engineering team to look into this, and we can keep you updated on when this issue is resolved with the open ticket.

Jay


(system) #3