API:Restricting API usage

Disabling the entire API

You can disable the API as a whole by setting $wgEnableAPI = false; in LocalSettings.php. The API is enabled by default.

↑Jump back a section

Disabling the write API

You can disable all write modules by setting $wgEnableWriteAPI = false; in LocalSettings.php. The write API is enabled by default as of MediaWiki 1.14, and disabled by default in older versions.

↑Jump back a section

Restricting access to the write API

You can deny certain groups the right to use the write API by denying them the writeapi right. By default, all groups have the writeapi right; however, both the writeapi right and $wgEnableWriteAPI = true; are required in order to use the write API.

↑Jump back a section

Disabling modules

You can disable individual modules for all users by adding a line to LocalSettings.php. Exactly what to add depends on the type of module you want to disable:

↑Jump back a section

Last modified on 23 January 2012, at 18:34