API:Changing wiki content
Changing wiki content through the API is enabled by default as of MediaWiki 1.14; it can be disabled by setting $wgEnableWriteAPI = false; in LocalSettings.php. In MediaWiki 1.13 and earlier, you have to explicitly enable the write API with $wgEnableWriteAPI = true;
Please see the appropriate subsection for detailed information for each module.
- Edit about the action to create new articles or modify existing ones.
- Move about the action to rename or move articles.
- Rollback about the action to rollback the last series of contributions to a page.
- Delete about the action to delete existing articles.
- Undelete about the action to view and restore deleted revisions.
- Protect about the action to change the protection levels for a page.
- Block about the actions to block and unblock a user.
- Watch about the action to watch and unwatch pages.
- Email about the action to send email to other users.
- Patrol about the action to patrol changes.
- Import about the action to import pages from other wikis.
- User group membership about the action to add and remove users to and from groups.
- Upload about the action to upload files.
- Tokens about the action to get session-based tokens required for some actions.
Possible errors[edit | edit source]
Some wikis restrict the use of these modules to certain groups of users, or disallow it altogether. All aforementioned modules can return the following errors:
|noapiwrite||Editing of this wiki through the API is disabled. Make sure the
|writeapidenied||You're not allowed to edit this wiki through the API|