On Fri, Jul 24, 2015 at 10:58 AM, Ricordisamoa <ricordisamoa@openmailbox.org
wrote:
RESTBase could help you there. With one API call, you can get the (stored) latest HTML revision of a page in Parsoid format~[1], but without the need to wait for Parsoid to parse it (if the latest revision is in RESTBase's storage).
What if it isn't?
If it is not in storage, then it will be generated transparently. This should only sometimes happen when you request a revision less than a handful of seconds after it was saved.
There is also section API support (you can get individual HTML
fragments of a page by ID, and send only those back for transformation into wikitext~[2]). There is also support for page editing (aka saving), but these endpoints have not yet been enabled for WMF wikis in production due to security concerns.
Then I guess HTML would have to be converted into wikitext before saving? +1 API call
As Marko mentioned, the HTML save end point is not yet enabled in production. Once it is, you will be able to directly POST modified HTML to save it, without adding a VisualEditor tag or having to perform extra API requests.
Gabriel