Page MenuHomePhabricator

GlobalUserPage clients should expose information in the API
Open, LowPublic

Description

AFAICS, there is no way, short of parsing the HTML page, to determine that a user page is a global user page.

There should be a way to determine this via the API, probably as a page property or maybe in userinfo.

It should also be possible to load the global user page from the local user page, using the API. i.e. expose sufficient information for the user-agent to determine which API endpoint should be queried to get the raw wikitext of the user page (and any subpages also hosted on the global site).

Event Timeline

jayvdb created this task.Feb 14 2015, 7:22 AM
jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a project: GlobalUserPage.
jayvdb added a subscriber: jayvdb.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 14 2015, 7:22 AM

So I'm thinking that we would have prop=globaluserpage which would indicate whether a page that does not currently exist has a global user page shown, and then somewhere expose the API url being used in meta=siteinfo. Does that sound good?

jayvdb added a comment.EditedFeb 14 2015, 7:40 AM

We already have 'imageinfo' which provides 'imagerepository', which is essentially the same concept. If we add prop=globaluserpage, would we also have a prop=globaltemplatepage , globalmodulepage, globalgadgetfoo, etc for every new type of remotely hosted page? I'd hope not.

As the file pages are also loaded from the file repo, unless there is a local page, the new property should encompass that and any future instance where the storage is found at a different API endpoint than the local site. And if the prop is queried on a page which is local, it should use 'local'.

Aklapper triaged this task as Low priority.Feb 16 2015, 12:07 PM
Ricordisamoa added a subscriber: Ricordisamoa.
Anomie added a subscriber: Anomie.Jun 5 2015, 9:18 PM

So I'm thinking that we would have prop=globaluserpage which would indicate whether a page that does not currently exist has a global user page shown, and then somewhere expose the API url being used in meta=siteinfo. Does that sound good?

Another option would be to add a hook to easily add additional inprops to prop=info, since it seems like the proposed prop=globaluserpage would return just one boolean.

I also like jayvdb's idea of some sort of "prop=foreignrepos" (and a meta more generic than meta=filerepoinfo) that could be used by foreign file repos, GlobalUserPage, maybe Wikibase (to indicate the corresponding Q-page), and anything else in the future that pulls stuff from a remote source. Although that might take a little thought to do right.

Deskana renamed this task from GUP clients should expose information in the API to GlobalUserPage clients should expose information in the API.Jun 27 2015, 5:07 AM
Deskana set Security to None.
Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:03 PM