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
devel:jsonrpc [2024-02-06 14:10] andidevel:jsonrpc [2024-05-19 08:44] (current) – Double Word „and“ 2a09:bac3:2f06:1e1::30:9a
Line 13: 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 39: 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.1707225010.txt.gz · Last modified: 2024-02-06 14:10 by andi

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