2

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?

1 Answer 1

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.

2
  • 1
    Thanks! FWIW, it's not possible to sort in ascending order (I tried sort=creation_date as well). Commented May 10, 2019 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. Commented May 10, 2019 at 14:20

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.