Table of Contents

jsonrpc Plugin

Compatible with DokuWiki

2008-05-05

plugin JSON-RPC interface to interact with DokuWiki from other Programms using Ajax Request

Last updated on
2010-12-14
Provides
Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with ajax, json

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Configuration

Functions

Request (method invocation)

Properties:

Response

Serverresponse, properties:

ErrorCodes

Code Message Description
-32700 Parse error Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
-32600 Invalid Request The JSON sent is not a valid Request object.
-32601 Method not found The method does not exist / is not available.
-32602 Invalid params Invalid method parameter(s).
-32603 Internal error Internal JSON-RPC error.
-32099 to -32000 Server error Reserved for implementation-defined server-errors.

Programm components

Javascript(YUI) Sample Code

  YUI().use("io-base", function(Y) {
      var uri = sUrl + 'Your/Path/To/DokuWiki/lib/plugins/jsonrpc/jsonrpc.php';
      var js_request = {
          jsonrpc: '2.0',
          id: '',
          method : {
              methodName : 'wiki.putPage'
          },
          params : [
              {string : 'myNamespace:myPage'},
              {string : "==== myPage ==== \n This is my new Page!"}
          ]};
      var json_request  = YAHOO.lang.JSON.stringify(js_request);
      var cfg = {
          method: 'POST',
          data:json_request,
          headers: {
              'Content-Type':'application/json'
          },
          arguments: p.obj
      }
      var request = Y.io(uri,cfg);
  });