Skip to main content

XML-RPC Service

You need to invoke this service using an XML-RPC Client.

The following methods are available :

blogger.deletePost

Types of arguments : string, string, string, string, string
Type of return : string
string appkey: Not applicable for WordPress, can be any value and will be ignored.
int postid
string username
string password
bool publish: Will be ignored.

Return Values
bool true

blogger.getRecentPosts

Types of arguments : string, string, string, string, string
Type of return : string
Retrieve list of recent posts.

Parameters
string appkey: Not applicable for WordPress, can be any value and will be ignored.
int blogId: Not applicable for WordPress, can be any value and will be ignored.
string username
string password
int numberOfPosts: Optional.
Return Values
array
struct (see #blogger.getPost)

blogger.getUserInfo

Types of arguments : string, string, string
Type of return : string
returns userinfo for particular user...

blogger.getUsersBlogs

Types of arguments : string, string, string
Type of return : string
Parameters
string appkey: Not applicable for WordPress, can be any value and will be ignored.
string username
string password
Return Values
array
    struct
        string blogid
        string url: Homepage URL for this blog.
        string blogName
        bool isAdmin
        string xmlrpc: URL endpoint to use for XML-RPC requests on this blog.

metaWeblog.deletePost

Types of arguments : string, string, string, string, string
Type of return : string
Parameters
    string appkey: Not applicable for WordPress, can be any value and will be ignored.
    int postid
    string username
    string password
    bool publish: Will be ignored (WP compat.)
Return Values
    bool true
Errors
401
    If the user does not have permission to delete this post.
404
    If no post with that postid exists.

metaWeblog.editPost

Types of arguments : string, string, string, string, string
Type of return : string

  

metaWeblog.getCategories

Types of arguments : string, string, string
Type of return : string
takes the blogid, and returns a list of categories

Parameters
    int blogid
    string username
    string password
Return Values
    array
    struct
    string categoryId
    string parentId
    string categoryName
    string categoryDescription
    string description: Name of the category, equivalent to categoryName.
    string htmlUrl
    string rssUrl

metaWeblog.getPost

Types of arguments : string, string, string
Type of return : string
returns an existing post

metaWeblog.getRecentPosts

Types of arguments : string, string, string, string
Type of return : string
returns a list of recent posts...

metaWeblog.getUsersBlogs

Types of arguments : string, string, string
Type of return : string

  

metaWeblog.newMediaObject

Types of arguments : string, string, string, string
Type of return : string
Parameters
    int blogid
    string username
    string password
    struct data
    string name: Filename.
    string type: File MIME type.
    string bits: base64-encoded binary data.
    bool overwrite: Optional. Overwrite an existing attachment of the same name. (Added in WordPress 2.2)
Return Values
    struct
        string id (Added in WordPress 3.4)
        string file: Filename.
        string url
        string type

metaWeblog.newPost

Types of arguments : string, string, string, string, string
Type of return : string
mt's newpost function...

mt.getCategoryList

Types of arguments : string, string
Type of return : string
takes the blogid, and returns a list of categories

mt.getPostCategories

Types of arguments : string, string, string
Type of return : string
returns a list of categories for postid *postid*

mt.publishPost

Types of arguments : string, string, string
Type of return : string
sets post status with id=postid to 'publish'

mt.setPostCategories

Types of arguments : string, string, string, string
Type of return : string
mt version of setpostcats
takes a primary as argument

mt.supportedMethods

Types of arguments :
Type of return : string
returns the xmlrpc-server's list of supported methods

mt.supportedTextFilters

Types of arguments :
Type of return : string

  

system.listMethods

Types of arguments : string
Type of return : string
system.listMethods() => ['add', 'subtract', 'multiple']

Returns a list of the methods supported by the server.

system.methodHelp

Types of arguments : string, string
Type of return : string
system.methodHelp('add') => "Adds two integers together"

Returns a string containing documentation for the specified method.

system.methodSignature

Types of arguments : string, string
Type of return : string
Returns the signature details for a specified method

method
    The name of the XML-RPC method to get the details for

system.multicall

Types of arguments : string, string
Type of return : string
system.multicall([{'methodName': 'add', 'params': [2, 2]}, ...]) => [[4], ...]

Allows the caller to package multiple XML-RPC calls into a single
request.

See http://www.xmlrpc.com/discuss/msgReader$1208

wp.deletePost

Types of arguments :
Type of return : string

  

wp.getCategories

Types of arguments : string, string, string
Type of return : string
Parameters
    int blog_id
    string username
    string password
Return Values
    array
        struct
            int categoryId
            int parentId
            string description
            string categoryName
            string htmlUrl
            string rssUrl
example from wordpress.com
[{'categoryDescription': '',
  'categoryId': 1356,
  'categoryName': 'Blogroll',
  'description': 'Blogroll',
  'htmlUrl': 'https://rubelongfellow.wordpress.com/category/blogroll/',
  'parentId': 0,
  'rssUrl': 'https://rubelongfellow.wordpress.com/category/blogroll/feed/'},
 {'categoryDescription': '',
  'categoryId': 42431,
  'categoryName': 'Gearhead',
  'description': 'Gearhead',
  'htmlUrl': 'https://rubelongfellow.wordpress.com/category/gearhead/',
  'parentId': 0,
  'rssUrl': 'https://rubelongfellow.wordpress.com/category/gearhead/feed/'},
 {'categoryDescription': '',
  'categoryId': 1,
  'categoryName': 'Uncategorized',
  'description': 'Uncategorized',
  'htmlUrl': 'https://rubelongfellow.wordpress.com/category/uncategorized/',
  'parentId': 0,
  'rssUrl': 'https://rubelongfellow.wordpress.com/category/uncategorized/feed/'}]

wp.getComments

Types of arguments :
Type of return : string

  

wp.getMediaItem

Types of arguments : string, string, string, string
Type of return : string
Parameters

    int blog_id
    string username
    string password
    int attachment_id

Return Values

    struct
        string attachment_id (Added in WordPress 3.4)
        datetime date_created_gmt
        int parent: ID of the parent post.
        string link: URL to the media item itself (the actual .jpg/.pdf/etc file, eg http://domain.tld/wp-content/uploads/2013/09/foo.jpg)
        string title
        string caption
        string description
        MediaItemMetadata metadata
        string thumbnail: URL to the media item thumbnail (eg http://domain.tld/wp-content/uploads/2013/09/foo-150x150.jpg)

wp.getMediaLibrary

Types of arguments : string, string, string, string
Type of return : string
int blog_id
string username
string password
struct filter: Optional (and all members are optional).
    int number: Total number of media items to retrieve.
    int offset
    int parent_id: Limit to attachments on this post ID. 0 shows unattached media items. Empty string shows all media items.
    string mime_type
array
    struct: see #wp.getMediaItem

wp.getOptions

Types of arguments : string, string, string, string
Type of return : string
int blog_id
string username
string password
struct
    string option
return:
    array
    struct
        string desc
        string readonly
        string option

wp.getPost

Types of arguments : string, string, string, string, string
Type of return : string
Parameters
int blog_id
string username
string password
int post_id
array fields: Optional. List of field or meta-field names to include in response.

wp.getPostFormats

Types of arguments :
Type of return : string

  

wp.getPostStatusList

Types of arguments :
Type of return : string

  

wp.getPosts

Types of arguments : string, string, string, string
Type of return : string
struct filter: Optional.
string post_type
string post_status
int number
int offset
string orderby
string order

wp.getProfile

Types of arguments : string, string, string, string
Type of return : string
Return Values
struct: See #wp.getUser.

wp.getTaxonomies

Types of arguments :
Type of return : string

  

wp.getTerms

Types of arguments :
Type of return : string

  

wp.getUser

Types of arguments : string, string, string, string, string
Type of return : string
struct: Note that the exact fields returned depends on the fields parameter.
string user_id
string username1
string first_name
string last_name
string bio
string email1
string nickname
string nicename1
string url
string display_name1
datetime registered1
roles

wp.getUsers

Types of arguments :
Type of return : string

  

wp.getUsersBlogs

Types of arguments : string, string
Type of return : string
wp.getUsersBlogs
Retrieve the blogs of the users.

Parameters
    string username
    string password
Return Values
    array
        struct
            boolean isAdmin # whether user is admin or not
            string url # url of blog
            string blogid
            string blogName
            string xmlrpc

wp.newCategory

Types of arguments : string, string, string, string
Type of return : string

  

wp.newPost

Types of arguments : string, string, string, string
Type of return : string
creates a new post
returns the post's id

wp.newTerm

Types of arguments : string, string, string, string
Type of return : string
wp.newTerm
Parameters
    int blog_id
    string username
    string password
    struct content
        string name
        string taxonomy
        string slug: Optional.
        string description: Optional.
        int parent: Optional.
Return Values
    string term_id

wp.ping

Types of arguments :
Type of return : string

  

wp.uploadFile

Types of arguments : string, string, string, string, string
Type of return : string
int blogid
string username
string password
struct data
    string name: Filename.
    string type: File MIME type.
    base64 bits: binary data. Needs to be base64-encoded.
    bool overwrite: Optional. Has no effect (see 17604). Was intended to overwrite an existing attachment of the same name. (Added in WordPress 2.2)
    int post_id: Optional. Allows an attachment to be assigned to a post. (User must have permission to edit the assigned post)

Return Values
struct
    string id (Added in WordPress 3.4)
    string file: Filename.
    string url
    string type