MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=spamregex

(main | spamregex)
  • Denna modul kräver läsrättigheter.
  • Denna modul kräver skrivrättigheter.
  • Denna modul accepterar endast POST-begäranden.
  • Source: Regular Expression Spam Block
  • License: GPL-2.0-or-later

Add entries to SpamRegex or remove already blocked entries from it.

Parametrar:
do

What to do? Either add or delete.

Den här parametern är obligatorisk.
Ett av följande värden: add, delete
modes

Block modes, i.e. should the phrase we're trying to block be blocked in page content (text), edit summaries (summary) or both?

Värden (separerade med | eller alternativ): summary, text
phrase

The spam phrase to be blocked or removed from SpamRegex.

Den här parametern är obligatorisk.
reason

Reason for adding an entry to SpamRegex. Mandatory when adding entries, not used when deleting.

token

A "csrf" token retrieved from action=query&meta=tokens

Den här parametern är obligatorisk.
Examples:
Add the phrase "FooBar" with the reason "Cross-wiki spam" to SpamRegex, blocking it both in page text as well as in edit summaries
api.php?action=spamregex&do=add&phrase=FooBar&reason=Cross-wiki%20spam&modes=summary|text&token=123ABC [open in sandbox]
Remove the phrase "Test, just a test" from SpamRegex
api.php?action=spamregex&do=delete&phrase=Test,%20just%20a%20test&token=123ABC [open in sandbox]