Extension:GlobalPreferences/API

Getting global preferences
If only the effective preferences for a user are required, the usual  can be used, however if you need to know where is every preference value coming from, you will need to use this API.

Possible errors
None.

Token
To change options, a CSRF token is required.

Tokens can be obtained via

Changing options
GlobalPreferences provides two modules to change preferences,  and. They work exactly like  and have the same parameters.

Parameters

 * Resetting a global preference means it will not be global anymore while resetting a local override means that the global preference will be used.
 * Resetting a global preference means it will not be global anymore while resetting a local override means that the global preference will be used.


 * Note: Providing only names of preferences without equal sign (e.g. ) results in resetting them. In the case of an arbitrary   name/value pair, the resetting should result in the removal of the name/value pair—except it doesn't currently.



The change parameter cannot be used to set a value which contains a pipe character "|", as it is used by the API to separate options. If you need to set such a value (for example, a user signature) use an optionname & optionvalue pair.

Example
Note: In this example, all parameters are passed in a GET request for the sake of simplicity. However, changing preferences requires POST requests; GET requests will cause an error.

Possible errors
In addition to :