Last modified: 2014-10-14 00:31:29 UTC
It seems to be possible to get the Parsoid HTML/RDF output through the standard Mediawiki API, but I can't figure out how. For example, this fails: https://en.wikipedia.org/w/api.php?action=visualeditor&paction=parse&page=Main_Page&oldid=598252063 An example would be really helpful.
The VE interface is private and not intended as a public / stable Parsoid API. It just proxies to http://parsoid-lb.eqiad.wikimedia.org/ and adds some more VE-specific information that is not needed if all you are interested in is the content. As it spins up an extra PHP worker it is also slower than accessing the Parsoid API directly. The Parsoid API will be integrated in a new REST content API in the longer term. The URL will change at some point later this year, but the principle will remain the same.
(In reply to Gabriel Wicke from comment #1) > The VE interface is private and not intended as a public / stable Parsoid > API. It just proxies to http://parsoid-lb.eqiad.wikimedia.org/ and adds some > more VE-specific information that is not needed if all you are interested in > is the content. As it spins up an extra PHP worker it is also slower than > accessing the Parsoid API directly. > > The Parsoid API will be integrated in a new REST content API in the longer > term. The URL will change at some point later this year, but the principle > will remain the same. Should this be the Parsoid bug for that, then?
(In reply to James Forrester from comment #2) > Should this be the Parsoid bug for that, then? My understanding is that this bug is about the VE API. http://parsoid-lb.eqiad.wikimedia.org/ links to the documentation at https://www.mediawiki.org/wiki/Parsoid#The_Parsoid_web_API, which has at least one example. This bug can probably be closed, but good to wait for Emmanuel's input.
I see some kind of contradiction in proposing an API on one side action=visualeditor @https://en.wikipedia.org/w/api.php and on the other side telling "this is a private API". I fully understand that this is a work in progress, and thank you very much for you explanation Gabriel. But, IMO the current VE related API status is really puzzling for someone which is not embeded in the Parsoid/VE project. Why not simply remove this documentation (action=visualeditor) as long as this is not really working for everybody? NB: Regarding the Parsoid/API integration work itself, I think there is an other bug open somewhere about that.
Have filed bug 62905 in MW's API to make this possible.
I took the upstream bug in MW core, might as well take this as well.
Change 166519 had a related patch set uploaded by Jforrester: Mark action=visualeditor as an internal API https://gerrit.wikimedia.org/r/166519
Change 166519 merged by jenkins-bot: Mark action=visualeditor as an internal API https://gerrit.wikimedia.org/r/166519