DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:jsonrpc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
devel:jsonrpc [2024-01-12 19:54] andidevel:jsonrpc [2024-05-19 08:44] – Double Word „and“ 2a09:bac3:2f06:1e1::30:9a
Line 1: Line 1:
 ====== JSON-RPC API ====== ====== JSON-RPC API ======
- 
-[[develonly]] 
- 
  
 This API provides access to all [[Remote API]] functionality using a JSON based API. This API provides access to all [[Remote API]] functionality using a JSON based API.
Line 16: Line 13:
 The API allows access via two different protocols: The API allows access via two different protocols:
  
-  - A simplified RPC protocol, where the the method to call is passed as a path segment and the body contains the array of parameters to pass+  - A simplified RPC protocol, where the method to call is passed as a path segment and the body contains the array of parameters to pass
   - Standard conform [[https://www.jsonrpc.org/|JSON-RPC calls]] either using version 1.0, 1.1 or 2.0.   - Standard conform [[https://www.jsonrpc.org/|JSON-RPC calls]] either using version 1.0, 1.1 or 2.0.
  
Line 42: Line 39:
 The main difference to the simplified form is that all info, including the method to call is passed as body: The main difference to the simplified form is that all info, including the method to call is passed as body:
  
-  curl http://localhost/dokuwiki/lib/exe/jsonrpc.php/wiki.getPageInfo \+  curl http://localhost/dokuwiki/lib/exe/jsonrpc.php \
      -H 'Content-Type: application/json' \      -H 'Content-Type: application/json' \
      -H "Authorization: Bearer $token" \      -H "Authorization: Bearer $token" \
-     -d '{"jsonrpc": "2.0", "id": "something", "method": "wiki.corePageInfo", "params": {"page": "wiki:syntax"}}'+     -d '{"jsonrpc": "2.0", "id": "something", "method": "core.getPageInfo", "params": {"page": "wiki:syntax"}}'
  
 Please note, when using version 2.0, batching multiple calls is not supported. Refer to the [[https://www.jsonrpc.org/specification|Specification on how to use this format]]. Please note, when using version 2.0, batching multiple calls is not supported. Refer to the [[https://www.jsonrpc.org/specification|Specification on how to use this format]].
devel/jsonrpc.txt · Last modified: 2024-07-05 13:10 by michaelsy

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki