MediaWiki API Action
AI-generatedSummary
Executes any MediaWiki API action (e.g. delete, move, protect, rollback) as an authenticated bot user, automatically logging in and attaching a CSRF token, then returns the API response.
Inputs
- wikiUrl — Overrides the site URL from the credentials; the node appends /api.php (trailing slash stripped). Useful for targeting another wiki with the same bot login.
- action (required) — The MediaWiki API action name sent as the
actionfield (e.g. delete, move, protect). - parameters — Repeatable name/value pairs added to the POST form body (e.g. title, reason). Entries with an empty name are skipped. Values are sent as strings; a pair named like a built-in field (action, token, format) would overwrite it.
Output shape
One output item per input item: { success: true, action, response }, where response is the parsed JSON returned by the MediaWiki API.
For each item the node performs a full login (login token, bot login with credentials, CSRF token) before the action, which means several HTTP requests per item. The POST uses a 10-minute timeout. If the API response contains an
error, the node throws (message includes info/code). With Continue On Fail enabled, it instead emits { success: false, error } for that item.
Examples
Example 1: Delete a page named Sandbox with a reason
Action: delete; Parameters: title=Sandbox, reason=Cleanup
Example 2: Move a page to a new title without leaving a redirect
Action: move; Parameters: from=Old title, to=New title, noredirect=1
Example 3: Run an action on a different wiki using the same bot credentials
Wiki URL: https://wiki2.example.com; Action: protect; Parameters: title=Main Page, protections=edit=sysop