Expose a parsoid public web API end point in the MediaWiki API
Closed, ResolvedPublic

Description

We need a public API end point integrating with the general MediaWiki API that provides at least the following functionality:

  • HTML DOM retrieval per page and revision. Basically the /en/Foo?oldid=<n> end point.
  • HTML DOM expansion: POST a DOM (or fragment), return re-expanded DOM
  • HTML DOM saving: POST a modified DOM and a summary, and save it as a new revision.

As long as we are using Wikitext as our storage format, saving requires a conversion to HTML and a separate save step. The individual steps should *internally* be exposed to other users including the VisualEditor extension. There is probably no need to expose the HTML2WT conversion. We should instead aim to provide an HTML-only public interface.

The integration should use an URL schema that makes it easy to map some or all of the functionality to a stand-alone (non-PHP) backend to avoid PHP startup costs in the future.


Version: unspecified
Severity: normal

bzimport added a project: Parsoid-Web-API.Via ConduitNov 22 2014, 1:36 AM
bzimport set Reference to bz48483.
GWicke created this task.Via LegacyMay 15 2013, 12:41 AM
Jdforrester-WMF added a comment.Via ConduitMay 16 2013, 1:52 AM

(In reply to comment #0)

  • HTML DOM saving: POST a modified DOM and a summary, and save it as a new revision.

Just to clarify, we don't need this for June/July (we're doing it in VisualEditor currently) - though it's a nice-to-have. :-)

The real focus for us is the HTML DOM expansion, which we will want ASAP for templates and other generated content blocks.

Kelson added a comment.Via ConduitJul 10 2013, 8:41 PM

Building prod. tools based on Parsoid output (for example to produce offline snasphots) needs this MW API. http://parsoid.wmflabs.org/ can only be a temporary solution...

GWicke added a comment.Via ConduitAug 8 2013, 1:59 AM

Bumped the prority. We should get to this after Wikimania.

GWicke added a comment.Via ConduitAug 23 2013, 4:03 PM

Marco and I are taking this on.

GWicke added a comment.Via ConduitNov 12 2013, 9:58 PM

Once https://gerrit.wikimedia.org/r/#/c/93527/ is merged we'll provide interim access to our internal Parsoid cluster through front-end caches at http://parsoidcache.svc.eqiad.wikimedia.org/. This implements our internal https://www.mediawiki.org/wiki/Parsoid#The_Parsoid_web_API. In the longer term it will be replaced with a more general MediaWiki content API that we are still working on.

GWicke added a comment.Via ConduitDec 3 2013, 10:16 PM

Lowering the priority as this is now live:

http://parsoid-lb.eqiad.wikimedia.org/
https://parsoid-prod.wmflabs.org/ (also supports spdy)

marcoil added a project: Parsoid.Via WebNov 25 2014, 6:34 PM
marcoil set Security to None.
marcoil added a project: MediaWiki-API.
Reedy changed the title from "Expose a public web API end point in the MediaWiki API" to "Expose a parsoid public web API end point in the MediaWiki API".Via WebNov 25 2014, 6:36 PM
Arlolra placed this task up for grabs.Via WebNov 25 2014, 8:10 PM
Arlolra removed a subscriber: MarkTraceur.
Anomie moved this task to Needs plan on the MediaWiki-API workboard.Via WebFeb 19 2015, 7:02 PM
GWicke closed this task as "Resolved".Via WebMar 13 2015, 2:41 AM
GWicke claimed this task.

Now resolved with https://rest.wikimedia.org/ entering beta production.

Anomie added a subscriber: Anomie.Via WebMar 13 2015, 2:39 PM

So this was in MediaWiki-API but didn't actually have anything to do with that project?

mobrovac added a subscriber: mobrovac.Via WebMar 13 2015, 2:44 PM

@Anomie Seems like it was mis-tagged, sorry about that. Will remove the project.

mobrovac removed a project: MediaWiki-API.Via WebMar 13 2015, 2:44 PM

Add Comment