Skip to main content
deleted 1 character in body; edited tags
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

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 behaviourbehavior, or is it undefined, and do I need to sort it in the application just to be sure?

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 behaviour, or is it undefined, and do I need to sort it in the application just to be sure?

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?

Source Link
Glorfindel
  • 6.9k
  • 3
  • 22
  • 49

Are the revisions returned by /posts/{ids}/revisions guaranteed to be returned in descending order?

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 behaviour, or is it undefined, and do I need to sort it in the application just to be sure?