<?xmlversion="1.0"?><methodCall><methodName>wiki.putPage</methodName><params><param><value><string>myputpage
</string></value></param><param><value><string>This is my page content</string></value></param><param><value><struct><member><name>sum</name><value><string>Spiceworks</string></value></member><member><name>minor</name><value><boolean>True</boolean></value></member></struct></value></param></params></methodCall>
Available Functions
Functions are listed in the following format:
Name
The name of the function
Parameters
A list of parameters to pass to the function
Data
The type of the returned data
Description
Short explanation what the function does
Since
The DokuWiki (and XML-RPC API Version) this function was introduced
dokuwiki.getPagelist
Name
dokuwiki.getPagelist
Parameters
(string) namespace, (array) options
Data
(array) list of page items
Description
Lists all pages within a given namespace. The options are passed directly to search_allpages().
Since
2009-03-06 (1)
dokuwiki.getVersion
Name
dokuwiki.getVersion
Parameters
-
Data
(string) version number
Description
Returns the DokuWiki version of the remote Wiki.
dokuwiki.getTime
Name
dokuwiki.getTime
Parameters
-
Data
(int) timestamp
Description
Returns the current time at the remote wiki server as Unix timestamp.
Since
2009-03-06 (1)
dokuwiki.getXMLRPCAPIVersion
Name
dokuwiki.getXMLRPCAPIVersion
Parameters
-
Data
(int) version number
Description
Returns the XML RPC interface version of the remote Wiki. This is DokuWiki implementation specific and independent of the supported standard API version returned by wiki.getRPCVersionSupported.
Since
2009-03-06 (1)
dokuwiki.login
Name
dokuwiki.login
Parameters
(string) user, (string) password
Data
(boolean) login successful
Description
Uses the provided credentials to execute a login and will set cookies. This can be used to make authenticated requests afterwards. Your client needs to support cookie handling. Alternatively use HTTP basic auth credentials.
$data['user'] = username
$data['ip'] = ip address
$data['type'] = type of change
$data['sum'] = summary
$data['modified'] = modification date as IXR_Date Object
$data['version'] = page version as timestamp
Description
Returns the available versions of a Wiki page. The number of pages in the result is controlled via the recent configuration setting. The offset can be used to list earlier versions in the history.
$data['name'] = [[:pagename]]
$data['lastModified'] = modification date as IXR_Date Object
$data['author'] = author of the Wiki page.
$data['version'] = page version as timestamp
$data['name'] = [[:pagename]]
$data['lastModified'] = modification date as UTC timestamp
$data['author'] = author of the Wiki page.
$data['version'] = page version as timestamp
Description
Returns information about a specific version of a Wiki page.
$data['type'] = local/extern
$data['page'] = the wiki page (or the complete URL if extern)
$data['href'] = the complete URL
Description
Returns a list of all links contained in a Wiki page.
wiki.getAllPages
Name
wiki.getAllPages
Parameters
-
Data
(array) One item for each page, each item containing the following data:
$data['id'] = id of the page
$data['perms'] = integer denoting the permissions on the page
$data['size'] = size in bytes
$data['lastModified'] = dateTime object of last modification date
Description
Returns a list of all Wiki pages in the remote Wiki.
$data['name'] = page id
$data['lastModified'] = modification date as UTC timestamp
$data['author'] = author
$data['version'] = page version as timestamp
Description
Returns a list of recent changes since given timestamp.
As stated in recent_changes: Only the most recent change for each page is listed, regardless of how many times that page was changed.
wiki.getRecentMediaChanges
Name
wiki.getRecentMediaChanges
Parameters
(int) timestamp
Data
(array) each array item holds the following data:
$data['name'] = media id
$data['lastModified'] = modification date as UTC timestamp
$data['author'] = author
$data['version'] = page version as timestamp
$data['perms'] = media permissions
$data['size'] = media size in bytes
Description
Returns a list of recent changed media since given timestamp.
wiki.getAttachments
Name
wiki.getAttachments
Parameters
(String) namespace, (array) options
Data
(array) each array item holds the following data:
$data['id'] = media id
$data['file'] = name of the file
$data['size'] = size in bytes
$data['mtime'] = upload date as a timestamp
$data['lastModified'] = modification date as XML-RPC Date object
$data['isimg'] = true if file is an image, false otherwise
$data['writable'] = true if file is writable, false otherwise
$data['perms'] = permissions of file
Description
Returns a list of media files in a given namespace. The options are passed directly to search_media().
wiki.getAttachment
Name
wiki.getAttachment
Parameters
(String) id
Data
(string) the data of the file, encoded in base64
Description
Returns the binary data of a media file.
wiki.getAttachmentInfo
Name
wiki.getAttachmentInfo
Parameters
(String) id
Data
(array) an array containing the following information about the file:
$data['size'] = size in bytes
$data['lastModified'] = modification date as XML-RPC Date object
Description
Returns information about a media file.
wiki.putAttachment
Name
wiki.putAttachment
Parameters
(String) id, (base64) data, (array) params
Available parameters are:
$params['ow'] = true if file is to overwrite an already
existing media object of the given id.
Data
Description
Uploads a file as a given media id.
wiki.deleteAttachment
Name
wiki.deleteAttachment
Parameters
(String) id
Data
Description
Deletes a file. Fails if the file is still referenced from any page in the wiki.
Since XML-RPC API Version 7 (API Version 7 is since Release Adora Belle (2012-10-13)) useful hierarchical error codes have been introduced. The following error codes can be returned by the XML-RPC Interface:
Italic rows are just categories. Only normal printed rows are returned by the interface.
100 → Page errors
110 → Page access errors
111 → User is not allowed to read the requested page
112 → User is not allowed to edit the page
113 → manager permission is required
114 → superuser permission is required
120 → Page existence errors
121 → The requested page does not exist
130 → Page edit errors
131 → Empty page id
132 → Empty page content
133 → Page is locked
134 → Positive wordblock check
200 → Media errors
210 → Media access errors
211 → User is not allowed to read the requested media
212 → User is not allowed to delete media
215 → User is not allowed to list media
220 → Media existence errors
221 → The requested media does not exist
230 → Media edit errors
231 → Filename not given
232 → File is still referenced
233 → Could not delete file
300 → Search errors
310 → Argument errors
311 → The provided value is not a valid timestamp
320 → Search result errors
321 → No changes in specified timeframe
400 → User management errors
401 invalid user name given
402 invalid user name given
403 invalid email address given
Additionally there are some server error codes that indicate some kind of server or XML-RPC failure. The codes are the following:
-32600 → Invalid XML-RPC request. Not conforming to specification.
-32601 → Requested method does not exist.
-32602 → Wrong number of parameters or invalid method parameters.
-32603 → Not authorized to call the requested method (No login or invalid login data was given).
-32604 → Forbidden to call the requested method (but a valid login was given).
-32605 → The XML-RPC API has not been enabled in the configuration
-32700 → Parse Error. Request not well formed.
-32800 → Recursive calls to system.multicall are forbidden.