Jump to content

Topic on Talk:Core Platform Team/Initiatives/API Gateway

Pchelolo (talkcontribs)

There's a very old Phabricator task https://phabricator.wikimedia.org/T95229 with all the discussion regarding why we have switched from using rest.wikimedia.org for RESTBase to using project domains with `/api/rest_v1`. We should evaluate whether the reasoning provided in the task and the comments is still valid to avoid repeating the mistakes we've already made.

GLavagetto (WMF) (talkcontribs)

I would very much avoid sharing a domain - what's the advantage, compared to the risk of information leaking between projects for things like authorization?

EvanProdromou (talkcontribs)

Sounds good.

AFAICT, the big downsides to using a specific API domain are the HTTPS initiation and DNS lookup costs. I think that's important if you're already connected to the project domain like en.wikipedia.org, for example, for an in-browser app like VE using the API.

I think it's less of a problem for an API-only client, like a third-party bot or tool (correct me if I'm wrong). I also think it makes things easier for API clients using multiple wikis; they only have to maintain a connection to api.wikimedia.org, not en.wp, en.wv, fr.wb, fr.wt, ...

Since we're not retiring the per-wiki endpoints right now, it seems OK to focus on an API domain; it won't interfere with the current in-browser apps.

Do we need to go further into this?

Reply to "Sharing a domain"