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=tag

(main | tag)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Add or remove change tags from individual revisions or log entries.

Parameters:
rcid

One or more recent changes IDs from which to add or remove the tag.

Type: list of integers
Separate values with | or alternative.
Maximum number of values is 50 (500 for clients allowed higher limits).
revid

One or more revision IDs from which to add or remove the tag.

Type: list of integers
Separate values with | or alternative.
Maximum number of values is 50 (500 for clients allowed higher limits).
logid

One or more log entry IDs from which to add or remove the tag.

Type: list of integers
Separate values with | or alternative.
Maximum number of values is 50 (500 for clients allowed higher limits).
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.

Separate values with | or alternative.
Maximum number of values is 50 (500 for clients allowed higher limits).
reason

Reason for the change.

Default: (empty)
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

This parameter is required.
Examples:
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]

Retrieved from Special:ApiHelp – Max-EuP 2012 on 18 May 2024.

Terms of Use

The Max Planck Encyclopedia of European Private Law, published as a print work in 2012, has been made freely available in 2021 as an online edition at <max-eup2012.mpipriv.de>.

The materials published here are subject to exclusive rights of use as held by the Max Planck Institute for Comparative and International Private Law and the publisher Oxford University Press; they may only be used for non-commercial purposes. Users may download, print, and make copies of the text files being made freely available to the public. Further, users may translate excerpts of the entries and cite them in the context of academic work, provided that the following requirements are met:

  • Use for non-commercial purposes
  • The textual integrity of each entry and its elements is maintained
  • Citation of the online reference according to academic standards, indicating the author, keyword title, work name, and date of retrieval (see Suggested Citation Style).