internal package Foswiki::Plugins::ConfigurePlugin

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview

Remote Procedure Call (RPC) interface

RPC calls are handled via the JsonRpcContrib. Callers must authenticate as admins, or the request will be rejected with a 403 status.

Note: If Foswiki is running in 'bootstrap' mode (without a LocalSite.cfg) then all calls are automatically assumed to be from an admin. As soon as a LocalSite.cfg is put in place, then the authentication set up therein will apply, and users are required to logged in as admins.

Entry points for each of the static methods published by the Foswiki::Configure::Query class are supported. See that class for descriptions.

Invocation examples

Call using a URL of the format:

https://matisse.oca.eu/foswiki/bin/jsonrpc/configure

while POSTing a request encoded according to the JSON-RPC 2.0 specification:

{
  jsonrpc: "2.0", 
  method: "getspec", 
  params: {
     get : { keys: "{DataDir}" },
     depth : 0
  }, 
  id: "caller's id"
}

.spec format

The format of .spec files is documented in detail in There are two node types in the .spec tree:

SECTIONs have:
  • headline (default UNKNOWN, the root is usually '')
  • typename (always SECTION)
  • children - array of child nodes (sections and keys)

Key entries (such as {DataDir}) have:
  • keys e.g. {Store}{Cupboard}
  • typename (from the .spec)
  • Other keys from the .spec e.g. SIZE, FEEDBACK, CHECK

Topic revision: r1 - 21 Nov 2014, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback