If only the effective preferences for a user are required, the usual meta=userinfo&uiprop=options can be used, however if you need to know where is every preference value coming from, you will need to use this API.
GlobalPreferences provides two modules to change preferences, action=globalpreferences and action=globalpreferenceoverrides. They work exactly like action=options and have the same 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.
resetkinds: List of types of preferences to reset when the reset parameter is set. (Default: all)
change: Pipe-separated list of changes, formatted name=value (e.g. skin=vector), value cannot contain pipe characters.
Note: Providing only names of preferences without equal sign (e.g.hideminor|skin) results in resetting them.
optionname: A name of a preference which should have an optionvalue set.
optionvalue: A value of the preference specified by the optionname, can contain pipe characters.
token: A "csrf" token retrieved from action=query&meta=tokens
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.
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.