Micro.blog supports primarily 2 APIs for posting to hosted blogs:
- Micropub, the IndieWeb API used in the official Micro.blog apps.
- MetaWeblog, the XML-RPC API used in MarsEdit for macOS.
XML-RPC used to be the standard for blog posting, widely supported in all blogging platforms. It is still used in WordPress today, and I’ve supported it in Micro.blog from the beginning. I’ve always wanted Micro.blog to be compatible with as many apps as possible, especially MarsEdit.
To understand XML-RPC, we have to go way back in blogging history, to 2001 and the original Blogger API by Evan Williams. Micro.blog’s support for XML-RPC still closely matches what the API looked like nearly 20 years ago.
As is obvious from the name, requests and responses in XML-RPC are sent as XML. Common data types such as integers, strings, and structs are encoded with rules outlined in the XML-RPC specification. To create a new post in the original Blogger API with the words “Hello world”, the request to the method
blogger.newPost might look like this:
<?xml version="1.0"?> <methodCall> <methodName>blogger.newPost</methodName> <params> <param> <value><int>app ID</int></value> </param> <param> <value><int>blog ID</int></value> </param> <param> <value><string>manton</string></value> </param> <param> <value><string>mypassword</string></value> </param> <param> <value><string>Hello world.</string></value> </param> <param> <value><boolean>1</boolean></value> </param> </params> </methodCall>
Subsequent blogging platforms extended the Blogger API with their own features. Instead of
blogger.newPost, Movable Type had
mt.newPost with similar parameters, adding a title field. WordPress had
To try to unify future improvements under a vendor-neutral standard, Dave Winer proposed the MetaWeblog API. MetaWeblog switched to passing content as structs, which could more easily be extended with additional fields, and added an image upload API,
metaWeblog.newMediaObject. Dave patterned the field names after RSS:
The MetaWeblog API uses an XML-RPC struct to represent a weblog post. Rather than invent a new vocabulary for the metadata of a weblog post, we use the vocabulary for an item in RSS 2.0. So you can refer to a post’s title, link and description; or its author, comments, enclosure, guid, etc using the already-familiar names given to those elements in RSS 2.0.
Dave wasn’t the only one who hoped to bring consistency between feed formats and a blogging API. A couple years later, AtomPub was created based on Atom feeds.
Ben Trott of Six Apart, makers of Movable Type, blogged at the time about the benefits to basing an API on the Atom feed format, which back then was called Echo:
Benefits to developers: using the same data model and serialization for syndication, archiving, and editing simplifies the development of tools to work with (produce and consume) these formats, for obvious reasons: code written to produce an item in an Echo feed, for example, can also be used for producing data sent in an API request or packaged up for archiving.
AtomPub was adopted in Blogger but is not supported in any other modern blogging platforms. Earlier this year, MarsEdit developer Daniel Jalkut announced that he would also be phasing out support for posting to Blogger.
Between the early 2000s when there was so much activity around blogging standards, and the growth of the IndieWeb and W3C-recommended standard Micropub API in 2017, there was a notable lack of innovation in blogging. Everyone was pulled away to social networks. Platform-specific APIs became the norm. It is because of this lull that XML-RPC survived so long without a modern replacement.
So that brings us to today. Micro.blog has always worked with MarsEdit, but because it’s based on a standard that was frozen, MarsEdit could not support all of Micro.blog’s features. And while Micropub is clearly the future, there is more we could do now without requiring MarsEdit to be adapted for Micropub.
I’ve been working with Daniel to identity what is missing from MetaWeblog and rolling that into a new Micro.blog-specific flavor of XML-RPC. This is essentially what Movable Type and WordPress had done years ago. I had avoided it until now because Micro.blog should default to supporting standards wherever possible before inventing something new.
We talked through this on Core Intuition 416. Now that there’s an alpha of MarsEdit 4.4 available, I’ve documented the new API parameters here. It is based on MetaWeblog, but cleaned up with more consistent field names and support for new features such as creating and editing pages on your blog, server drafts, and downloading all posts.
Micro.blog now shows up in MarsEdit as one of the supported blog systems, along with Tumblr and WordPress:
I’ve been using the new MarsEdit for the last few days, and it really is a big improvement for Micro.blog. Keep an eye out for the final release.
Conversation on Micro.blog