JSPWiki comes with a XML-RPC interface. For more information, see:

XML-RPC Standard API#

Here is now the API as of v1.6.12 (the command prefix being wiki.).

The default URL for this API is <your-wiki-url>/RPC2

  • array getRecentChanges( Date timestamp ): Get list of changed pages since timestamp, which should be in UTC. The result is an array, where each element is a struct:
    • name (string) : Name of the page. The name is UTF-8 with URL encoding to make it ASCII.
    • lastModified (date) : Date of last modification, in UTC.
    • author (string) : Name of the author (if available). Again, name is UTF-8 with URL encoding.
    • version (int) : Current version.
  • A page MAY be specified multiple times. A page MAY NOT be specified multiple times with the same modification date.
  • int getRPCVersionSupported(): Returns 1 with this version of the JSPWiki API.
  • base64 getPage( String pagename ): Get the raw Wiki text of page, latest version. Page name must be UTF-8, with URL encoding. Returned value is a binary object, with UTF-8 encoded page data.
  • base64 getPageVersion( String pagename, int version ): Get the raw Wiki text of page. Returns UTF-8, expects UTF-8 with URL encoding.
  • base64 getPageHTML( String pagename ): Return page in rendered HTML. Returns UTF-8, expects UTF-8 with URL encoding.
  • base64 getPageHTMLVersion( String pagename, int version ): Return page in rendered HTML, UTF-8.
  • array getAllPages(): Returns a list of all pages. The result is an array of strings, again UTF-8 in URL encoding.
  • struct getPageInfo( string pagename ) : returns a struct with elements
    • name (string): the canonical page name, URL-encoded UTF-8.
    • lastModified (date): Last modification date, UTC.
    • author (string): author name, URL-encoded UTF-8.
    • version (int): current version
  • struct getPageInfoVersion( string pagename, int version ) : returns a struct just like plain getPageInfo(), but this time for a specific version.
  • array listLinks( string pagename ): Lists all links for a given page. The returned array contains structs, with the following elements:
    • page (string) : The page name or URL the link is to.
    • type (int) : The link type. This is a string, with the following possible values:
      • "external" : The link is an external hyperlink
      • "local" : This is a local Wiki name for hyperlinking

As you can see, all data is returned in a base64 -type in UTF-8 encoding, regardless of what JSPWiki preference actually is. Also, all incoming or outcoming strings are really UTF-8, but they have been URL-encoded so that the XML-RPC requirement of ASCII is fulfilled.

The UTF-8 API#

This is exactly as the upper API, except that ALL strings should be encoded in UTF-8. Also, instead of base64 type, all methods returning page data return UTF-8 format strings.

This does break the XML-RPC spec somewhat, but for ease of use I think it is important to serve both models. Use which one you like :-).

The default URL for the UTF-8 XML-RPC API is

<your-wiki-url>/RPCU

Errors#

All methods which handle a page in any way can return a Fault. Current fault codes are:

  • 1 : No such page was found.

Authentication code:

Toolbar

Comment signature

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

Here's a short reminder on the most common formatting rules you have at your disposal. A complete list is available in TextFormattingRules.

(empty line)     Make a paragraph break.
----             Horizontal ruler
[link]           Create hyperlink to "link", where "link" can be either an internal 
                 WikiName or an external link (http://)
[text|link]      Create a hyperlink where the link text is different from the actual 
                 hyperlink link.
[text|wiki:link] Create a hyperlink where the link text is different from the 
                 actual hyperlink link, and the hyperlink points to a named Wiki. 
                 This supports interWiki linking.

*                Make a bulleted list (must be in first column). Use more (**) 
                 for deeper indentations.
#                Make a numbered list (must be in first column). Use more (##, ###) 
                 for deeper indentations.

!, !!, !!!       Start a line with an exclamation mark (!) to make a heading. 
                 More exclamation marks mean bigger headings.

__text__         Makes text bold.
''text''         Makes text in italics (notice that these are single quotes ('))
{{text}}         Makes text in monospaced font.
;term:def        Defines 'term' with 'def'.  Use this with empty 'term' to make short comments.
\\               Forced line break (please use sparingly).

|text|more text| Makes a table. Double bars for a table heading.

Don't try to use HTML, since it just won't work.

To embed images just put them available on the web using one of the approved formats, and they will get inlined automatically. To see the list of approved formats, go check SystemInfo.

To make a code block, use triple {'s to open, and triple }'s to close.

(Wondering where this text comes from? It's on a page called Edit Page Help, which you can edit too!)