2

I've noticed in the API docs for revisions that revision_number may be absent. Yet all examples, e.g. /posts/{ids}/revisions include a revision number for all responses.

I have a colleague who swears they've seen missing revision numbers in the wild, but we cannot come up with examples to speculate about what would trigger this.

In what circumstances would a revision number be omitted? What does it signify? And, given that absent fields should be inferred to be null, if a given revision has no revision number today, might it have one later on, after more revisions?

1 Answer 1

1

There are several events which count as a revision but do not have a number; only edits (to the body, title or tags) have a revision number. Roughly speaking, everything which is listed on a posts revision history page (example) counts as a revision. You can compare that with the API results, and you'll see the revision number is missing for events like

  • (un)protecting the question
  • closing/reopening the question
  • (un)locking the question
  • making the question community wiki
  • posting a bounty

Those events will never get a revision number in the future (unless the API somehow changes, I guess, but that's not likely) and you'll need another way to sort them: on creation date or activity date.

0

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.