XML-RPC Interface

# Introduction

Back to the developer docs index

This document contains information on the XML-RPC interface that BLOG:CMS provides, and the error messages it spits out. Please note that the specification of this interface might still undergo changes in the future.

The URL for the BLOG:CMS XML-RPC interface is:
http://www.yourserver.com/yourpath/nucleus/xmlrpc/server.php

# The Blogger API (XML-RPC)

BLOG:CMS implements the Blogger API. This allows for tools and services that can communicate with Blogger, to be able to also communicate with BLOG:CMS. Because the way BLOG:CMS works, some interpretations of parameters are slightly different, see the notes below for more info. The structure of method calls and responses are, of course, exactly the same as the methods at Blogger.

Here's the list of available methods. Click them to get more information (links go to either the Blogger API or the Blogger API Mailinglist).

- blogger.newPost
- blogger.editPost
- blogger.getPost
- blogger.deletePost
- blogger.getUsersBlogs
- blogger.getRecentPosts
- blogger.getUserInfo
- blogger.getTemplate
- blogger.setTemplate

Since BLOG:CMS is structured somewhat differently inside, there are some differences in the way parameters are handled. An overview:

- Appkeys are ignored.
- Next to the body of a post, a BLOG:CMS-item also has a title and a category. Blogger only has the body (known as 'contents'). To be able to use the extra parts, you can use `<title>` and `<category>` in the contents you send to BLOG:CMS. These tags are only added in the getRecentPosts call
- What is known under Blogger as 'templates', is known under BLOG:CMS as 'skins'. There can be more than one skin on the system, and each skin can be used by different blogs. The blogger.setTemplate and blogger.getTemplate methods will affect the default skin for the chosen blog, as selected in the BLOG:CMS blog settings. The 'main' and 'archiveIndex' template types refer to the BLOG:CMS skinparts 'index' and 'archivelist'
- The `publish` parameter is used to determine wether a new post is to be added as a draft or not. When using `blogger.editPost`, the `publish` parameter is ignored unless it turns a draft into a published item
- When using the `getUserInfo` call, the 'lastname' in the result will be empty and 'firstname' will contain the full name. This is because BLOG:CMS does not make a difference between first name and last name
- The `getRecentPostst`-method returns `authorName` and `title` as extra parameters. Blogger has been returning these also (although undocumented)

# metaWeblog API

Since v1.1, BLOG:CMS also supports the metaWeblog API, which is an extention to the Blogger API.

In BLOG:CMS v2.5, support was added for the `newMediaObject` and `getRecentPosts` methods as well (they weren't in the original metaWeblog specification)

A list of available methods is listed below (see the specification for more info):

- metaWeblog.newPost
- metaWeblog.editPost
- metaWeblog.getPost
- metaWeblog.getCategories
- metaWeblog.newMediaObject (v2.5)
- metaWeblog.getRecentPosts (v2.5)

# Movable Type API

Since v2.5, BLOG:CMS supports the methods from the Movable Type API.

The list of available methods is listed below:

- mt.supportedMethods
- mt.supportedTextFilters
- mt.publishPost
- mt.getCategoryList
- mt.getPostCategories
- mt.setPostCategories
- mt.getRecentPostTitles
- mt.getTrackbackPings

Some notes:

- BLOG:CMS only supports one category for each item. This means that all categories except the 'primary' category for an item will be ignored.
- Trackback is not implemented in the BLOG:CMS core (it's avalailable as a plugin instead). Because of this, `mt.getTrackbackPings` will return an empty array by default.
- BLOG:CMS doesn't have text filters, so `mt.getSupportedTextFilters` returns an empty array.

# Error Codes

Below is an overview of the types of errors you can get back from the methods:

Error Code | Error Message
--- | ---
801 | Login Error (probably bad username/password combination)
802 | No Such Blog
803 | Not a Team Member
804 | Cannot add Empty Items
805 | Amount parameter must be in range 1..20 (getRecentItems)
806 | No Such Item
807 | Not Allowed to Alter Item
808 | Invalid media type
809 | File is too large (max. upload filesize)
810 | Other error on newMediaObject (message will contain more info about what happened)
other codes < 100 | Errors encountered by the Useful Inc. XML-RPC implementation
other codes > 100 | Errors encountered by the XML parser