why https://rest.wikimedia.org/en.wikipedia.org/v1/?doc as opposed to https://rest.wikimedia.org/v1/en.wikipedia.org/?doc
ie. why isn't the domain included in the version?
why https://rest.wikimedia.org/en.wikipedia.org/v1/?doc as opposed to https://rest.wikimedia.org/v1/en.wikipedia.org/?doc
ie. why isn't the domain included in the version?
This allows us more flexibility in that each domain may run different versions of the API, which closely resembles the current state of WM projects - not all of them run the same MW version, nor do they have the same features enabled.
you're versioning the api though ... if a domain wants to use an older version, they would still have that option
you don't anticipate any future use case that isn't partitioned by domain?
Ah, I see, the confusion is about the URI itself. We do not have any particular restrictions on the domain name itself, it can be "blah" as far as we are concerned, so you can have also stuff in there that are domain-agnostic. This layout allows us to activate/deactivate stuff per-domain easily.
A side note: the URL rest.wikimedia.org/en.wikipedia.org/v1/ should be though of as:
What this allows us is a (possible future) mapping to domains themselves directly, so that e.g. en.wikipedia.org/rest-api/ (or any other path) can be transparently mapped to rest.wikimedia.org/en.wikipedia.org/ .