Topic on Talk:RESTBase

Arlolra (talkcontribs)
Mobrovac-WMF (talkcontribs)

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.

Arlolra (talkcontribs)

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?

Mobrovac-WMF (talkcontribs)

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:

  • domain (host/port): rest.wikimedia.org/en.wikipedia.org
  • path: v1/

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/ .

Arlolra (talkcontribs)

if you can have stuff in there that's domain-agnostic, how do you distinguish the two?

you can still map

en.wikipedia.org/rest-api/v1/ to rest.wikimedia.org/v1/en.wikipedia.org/

GWicke (talkcontribs)

Arlo, all APIs are versioned per logical domain. We could have an additional global version like rest.wikimedia.org/v1/en.wikipedia.org/v1/, but didn't see a strong use case for this, as this would only version the domain part.

Reply to "versioning"