Bantuan API MediaWiki
Ini merupakan laman dokumentasi MediaWiki API yang dihasilkan secara automatik.
Dokumentasi dan contoh-contoh: https://www.mediawiki.org/wiki/API
action=tag
(main | tag)
- Modul ini memerlukan hak membaca.
 - Modul ini memerlukan hak menulis.
 - Modul ini menerima permohonan POST sahaja.
 - Source: MediaWiki
 - License: GPL-2.0-or-later
 
Add or remove change tags from individual revisions or log entries.
Parameter:
- rcid
 One or more recent changes IDs from which to add or remove the tag.
- Type: list of integers
 - Asingkan nilai-nilai dengan "|".
 - Bilangan nilai maksimum adalah 50 (500 untuk bot).
 - revid
 One or more revision IDs from which to add or remove the tag.
- Type: list of integers
 - Asingkan nilai-nilai dengan "|".
 - Bilangan nilai maksimum adalah 50 (500 untuk bot).
 - logid
 One or more log entry IDs from which to add or remove the tag.
- Type: list of integers
 - Asingkan nilai-nilai dengan "|".
 - Bilangan nilai maksimum adalah 50 (500 untuk bot).
 - add
 Tags to add. Only manually defined tags can be added.
- Values (separate with | or alternative):
 - remove
 Tags to remove. Only tags that are either manually defined or completely undefined can be removed.
- Asingkan nilai-nilai dengan "|".
 - Bilangan nilai maksimum adalah 50 (500 untuk bot).
 - reason
 Reason for the change.
- Asal: (kosong)
 - tags
 Tags to apply to the log entry that will be created as a result of this action.
- Values (separate with | or alternative):
 - token
 A "csrf" token retrieved from action=query&meta=tokens
- Parameter ini diwajibkan.
 
Contoh-contoh:
- Add the vandalism tag to revision ID 123 without specifying a reason
 - api.php?action=tag&revid=123&add=vandalism&token=123ABC [open in sandbox]
 - Remove the spam tag from log entry ID 123 with the reason Wrongly applied
 - api.php?action=tag&logid=123&remove=spam&reason=Wrongly+applied&token=123ABC [open in sandbox]