devel:xmlrpc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:xmlrpc [2021-09-20 16:50] – add php-xml package basebuilder | devel:xmlrpc [2024-01-31 23:57] (current) – [Adding methods to the XML-RPC API] Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== XML-RPC ====== | ====== XML-RPC ====== | ||
- | DokuWiki has a [[wp>XML-RPC]] API which can be used to access/interact with your wiki from other applications. The API implements the [[http:// | + | XML-RPC |
+ | |||
+ | |||
+ | The API implements the [[http:// | ||
Plugins can add their own calls to the API using [[devel: | Plugins can add their own calls to the API using [[devel: | ||
- | Questions and suggestions to extend and improve the API should be directed to the [[: | + | Note: there is also a [[jsonrpc|JSON-RPC]] API which provides the same functionality but is based on JSON rather XML. |
===== Get It Working ===== | ===== Get It Working ===== | ||
- | - You need at least the 2008-03-31 release of DokuWiki. | ||
- Set the [[config: | - Set the [[config: | ||
- Set the [[config: | - Set the [[config: | ||
Line 41: | Line 44: | ||
<?xml version=" | <?xml version=" | ||
- | | + | < |
< | < | ||
< | < | ||
- | | + | |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | </ | + | </ |
</ | </ | ||
- | | + | </ |
</ | </ | ||
<code xml> | <code xml> | ||
- | | + | <?xml version=" |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
</ | </ | ||
Line 63: | Line 66: | ||
<code xml> | <code xml> | ||
- | | + | <?xml version=" |
< | < | ||
- | < | + | |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | </ | + | </ |
- | </ | + | </ |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | </ | + | </ |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | </ | + | </ |
- | </ | + | </ |
- | </ | + | </ |
- | </ | + | </ |
- | </ | + | </ |
</ | </ | ||
</ | </ | ||
Line 165: | Line 168: | ||
^ Name | '' | ^ Name | '' | ||
- | ^ Parameters | + | ^ Parameters |
- | ^ Data | (array) array with 4 lists of pageids < | + | |
+ | | ||
+ | ]</ | ||
+ | ^ Data | (array) array with 4 lists of pageids < | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ]</ | ||
^ Description | Allows you to lock or unlock a whole bunch of pages at once. Useful when you are about to do an operation over multiple pages. | | ^ Description | Allows you to lock or unlock a whole bunch of pages at once. Useful when you are about to do an operation over multiple pages. | | ||
^ Since | 2009-03-06 (1) | | ^ Since | 2009-03-06 (1) | | ||
+ | |||
+ | ==== dokuwiki.createUser ==== | ||
+ | |||
+ | ^ Name | '' | ||
+ | ^ Parameters | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ], | ||
+ | ' | ||
+ | ]</ | ||
+ | ^ Data | (bool) true if the user is created | | ||
+ | ^ Description | Create a user. Returns 400 range [[# | ||
+ | ^ Since | 2022-06-24 | | ||
+ | |||
==== dokuwiki.deleteUsers ==== | ==== dokuwiki.deleteUsers ==== | ||
Line 205: | Line 235: | ||
^ Name | '' | ^ Name | '' | ||
^ Parameters | ^ Parameters | ||
- | ^ Data | (array) each array item holds the following data: \\ \\ < | + | ^ Data | (array) each array item holds the following data: \\ \\ < |
+ | $data[' | ||
+ | $data[' | ||
+ | $data[' | ||
+ | $data[' | ||
+ | $data[' | ||
^ Description | ^ Description | ||
Line 323: | Line 358: | ||
==== wiki.putAttachment ==== | ==== wiki.putAttachment ==== | ||
^ Name | '' | ^ Name | '' | ||
- | ^ Parameters | + | ^ Parameters |
+ | existing media object of the given id.</ | ||
^ Data | | | ^ Data | | | ||
- | ^ Description | Uploads a file as a given media id. Available parameters are: \\ \\ < | + | ^ Description | Uploads a file as a given media id. | |
==== wiki.deleteAttachment ==== | ==== wiki.deleteAttachment ==== | ||
Line 332: | Line 368: | ||
^ Data | | | ^ Data | | | ||
^ Description | Deletes a file. Fails if the file is still referenced from any page in the wiki. | | ^ Description | Deletes a file. Fails if the file is still referenced from any page in the wiki. | | ||
+ | |||
+ | ==== plugin.acl.listAcls ==== | ||
+ | ^ Name | '' | ||
+ | ^ Parameters | ||
+ | ^ Data | (array) of ACLs {scope, user, permission}' | ||
+ | ^ Description | Get the list of all ACLs. | | ||
==== plugin.acl.addAcl ==== | ==== plugin.acl.addAcl ==== | ||
Line 348: | Line 390: | ||
=====Adding methods to the XML-RPC API===== | =====Adding methods to the XML-RPC API===== | ||
Use [[plugintype> | Use [[plugintype> | ||
+ | |||
+ | A summary of recent plugins which indicate Remote support: | ||
+ | |||
+ | ---- pluginquery ----- | ||
+ | SELECT: name, description | ||
+ | WHERE: | ||
+ | VALUES: 63, 128, @DATEMOSTRECENT@, | ||
+ | headline: Remote plugins compatible with last two releases | ||
+ | ----- | ||
To implement such a plugin please have a look at the [[remote plugins|remote plugins development documentation]]. | To implement such a plugin please have a look at the [[remote plugins|remote plugins development documentation]]. | ||
Line 384: | Line 435: | ||
* //320 -> Search result errors// | * //320 -> Search result errors// | ||
* 321 -> No changes in specified timeframe | * 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: | Additionally there are some server error codes that indicate some kind of server or XML-RPC failure. The codes are the following: |
devel/xmlrpc.1632149410.txt.gz · Last modified: 2021-09-20 16:50 by basebuilder