Ticket #6850 (new enhancement)

Opened 7 months ago

Last modified 1 month ago

Suggestion: New XMLRPC API for searching posts

Reported by: redsweater Assigned to: josephscott
Priority: normal Milestone: 2.8
Component: XML-RPC Version:
Severity: normal Keywords:
Cc: redsweater

Description

The limitations of the XMLRPC getRecentPosts API call are often cited as the core limiting factor for many desktop clients. In particular, the fact that only the last "N" posts can be fetched makes it difficult or impossible to provide access to very old posts, without imposing a burden on the server.

A user's request got me thinking and I realized that the API might benefit from a very generalized "search" API that would allow for a huge variety of useful operations without bloating the API namespace too much.

For instance, the search API might take an array of "search parameters", such as:

search string - true if the body, title, etc of a post contains this string post category/tag - only return posts in a given taxonomy post status - useful for retrieving a list of only draft or only published items post id - perhaps a list of post id ranges, so a client could ask for posts {10-15, 18, 21} post date - a date range e.g. only posts from january-june of 2007 post author - this would be awesome for clients to be able to restrict listings to only the particular author

If the API took a "maximum results" parameter as well, its functionality could match exactly "getRecentPosts", if no search parameters are provided.

I think an API like this could be very powerful and also take the pressure off as far as specific requests for accessors to only get draft posts, etc.

Change History

04/26/08 17:49:10 changed by redsweater

  • cc set to redsweater.

I also think this idea could be extended to the APP implementation. For instance a collection listing could be narrowed down by requesting something like:

GET http://myblog.uri/wp-app.php/posts?status=draft&author=Daniel%20Jalkut

I have pinged the atom-pub email list to see what they all think about this idea as it pertains to APP.

10/14/08 21:06:52 changed by matt

  • milestone changed from 2.7 to 2.8.