| #
                5c3fa123 |  | 12-Mar-2025 | Andreas Gohr <andi@splitbrain.org> | do not return zero error code for API exceptions. fixes #4413 
 | 
| #
                ba15f985 |  | 22-Feb-2024 | Andreas Gohr <andi@splitbrain.org> | API: ignore charset when checking content types
 We still expect all communication to be in UTF-8, but we really don't
 need a charset attribute for that.
 
 fixes #4218, replaces #4219
 
 | 
| #
                d48c2b25 |  | 07-Jan-2024 | Andreas Gohr <andi@splitbrain.org> | API: code style fixes 
 | 
| #
                5e47e6df |  | 07-Jan-2024 | Andreas Gohr <andi@splitbrain.org> | API added simple JSONRPC tests 
 | 
| #
                b433b69e |  | 05-Jan-2024 | Andreas Gohr <andi@splitbrain.org> | API: remove file and date transformations
 We always deal with timestamps or base64 now. Removing some of the magic
 makes everything less complex.
 
 Only affected plugin is confmanager, which needs an
 API: remove file and date transformations
 We always deal with timestamps or base64 now. Removing some of the magic
 makes everything less complex.
 
 Only affected plugin is confmanager, which needs an update.
 show more ...  
 | 
| #
                42e66c7a |  | 30-Nov-2023 | Andreas Gohr <andi@splitbrain.org> | First go at refactoring the API mechanisms
 This introduces an ApiCall class that wraps around the actual method
 that produces the result. This replaces various loose array structures
 that provided t
 First go at refactoring the API mechanisms
 This introduces an ApiCall class that wraps around the actual method
 that produces the result. This replaces various loose array structures
 that provided the meta information before.
 
 The ApiCall streamlines the aggregation of meta information between core
 and plugin methods. Now all data is produced by Reflection based
 introspection. Certain aspects can be overridden if needed. See
 ApiCore::getRemoteInfo() for examples
 
 This change removes the _getMethods() method from remote plugins and
 introduces a getMethods() method. The two are NOT compatible as the
 latter now returns a list of ApiCalls. However when looking at the
 existing plugins, it seems that _getMethods() was nearly 100% obsolete
 with the Reflection based default implementation. So most plugins will
 not be affected at all. Some might now export one or two more methods
 than before because of poor visibility settings (eg. not declaring
 private/protected methods as such).
 
 This change removes the RPC_CALL_ADD hook. Only a single plugin ever
 implemented it. I'm not sure what this hook was supposed to do anyway.
 Being able to declare arbitrarily named API endpoints seems wrong to me
 anyway.
 
 The new ApiCall now also supports passing named instead of positional
 parameters. This will open up a new opportunity to get a proper openapi
 spec running.
 
 Next step is fixing the tests.
 show more ...  
 | 
| #
                8a3002c9 |  | 29-Nov-2023 | splitbrain <splitbrain@users.noreply.github.com> |  Rector and PHPCS fixes 
 | 
| #
                f0319d45 |  | 29-Nov-2023 | Andreas Gohr <andi@splitbrain.org> | Merge pull request #4113 from dokuwiki/jsonrpc-conformity
 JSONRPC Standards
 
 | 
| #
                36d03388 |  | 28-Nov-2023 | Andreas Gohr <andi@splitbrain.org> | JSON-RPC: we do not support named parameters
 Even though this would be valid in JSON-RPC 2.0 we don't support it
 currently. This adds the proper error handling for that.
 
 | 
| #
                8d294593 |  | 28-Nov-2023 | Andreas Gohr <andi@splitbrain.org> | JSON-RPC: throw proper error on invalid JSON 
 | 
| #
                6f8e03f5 |  | 28-Nov-2023 | Andreas Gohr <andi@splitbrain.org> | implement support for JSON-RPC 1.0, 1.1 and 2.0
 This implements the slightly more standardized JSON-RPC standard as an
 alternative to my home-grown version. The same server handled all formats
 inclu
 implement support for JSON-RPC 1.0, 1.1 and 2.0
 This implements the slightly more standardized JSON-RPC standard as an
 alternative to my home-grown version. The same server handled all formats
 including my own simpler variant.
 show more ...  
 | 
| #
                cf927d07 |  | 28-Nov-2023 | splitbrain <splitbrain@users.noreply.github.com> |  Rector and PHPCS fixes 
 | 
| #
                87603a0a |  | 28-Nov-2023 | Andreas Gohr <andi@splitbrain.org> | handle JSON encode/decode errors in JSONRPC API 
 | 
| #
                8fae2e99 |  | 09-Jun-2023 | Andreas Gohr <andi@splitbrain.org> | Check method and content type in JSONRPC server
 Addresses #3991
 
 | 
| #
                f657e5d0 |  | 27-Apr-2023 | Andreas Gohr <andi@splitbrain.org> | Add JSON based alternative to XMLRPC
 XMLRPC is a rather outdated and old-fashioned protocol not much in use
 anymore. Developers prefer simpler, JSON based APIs.
 
 This adds a new "JSONRPC" API. Basic
 Add JSON based alternative to XMLRPC
 XMLRPC is a rather outdated and old-fashioned protocol not much in use
 anymore. Developers prefer simpler, JSON based APIs.
 
 This adds a new "JSONRPC" API. Basically it exposes exactly the same
 method calls as the XMLRPC API but using JSON instead of XML. It's not a
 classical REST API, but should be just as easy to use for developers.
 
 Here is an example call using CURL:
 
 curl http://localhost/dokuwiki/lib/exe/jsonrpc.phs \
 -H 'Content-Type: application/json' \
 -H "Authorization: Bearer $token" \
 -d '["wiki"]'
 
 Please note that the above uses the token auth implemented in #2432.
 Authentication via basic auth or cookies would work as well.
 show more ...  
 |