3

The /posts/{ids}/revisions method returns all revisions to a post, but it doesn't have the sort and order parameters most methods have. From some quick tests, e.g. this one, I think it always returns them in 'descending' order, i.e. the newest revisions first. But this doesn't seem to be documented somewhere.

Can I rely on this behavior, or is it undefined, and do I need to sort it in the application just to be sure?

2

I think creation_date is a default/universal sorting, unless activity_date is available. (But you know what they say happens when you "ASSUME".)

Evidence for:


Evidence against:

  • It's not explicitly stated anywhere.
  • The various inconsistent behaviors as documented in the unresolved bugs here on Stack Apps. And on Meta Stack Exchange, and on Meta Stack Overflow.




They say that you've made a cost-effective branching decision based on knowledge and experience. And that it in no way precludes you observing-for and reacting-to signs that the assumption was false.

  • 1
    Thanks! FWIW, it's not possible to sort in ascending order (I tried sort=creation_date as well). – Glorfindel May 10 at 8:16
  • @Glorfindel, Yes I forgot to mention that I tried the same thing and also back when I was investigating the /users/{ids}/reputation-history route. – Brock Adams May 10 at 14:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .