User:Rubaaw/Sandbox/API:Managetags

MediaWiki version:
1.23

API documentation edit

Perform management tasks relating to change tags.


action=managetags

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

Perform management tasks relating to change tags.

Specific parameters:
Other general parameters are available.
operation

Which operation to perform:

create
Create a new change tag for manual use.
delete
Remove a change tag from the database, including removing the tag from all revisions, recent change entries and log entries on which it is used.
activate
Activate a change tag, allowing users to apply it manually.
deactivate
Deactivate a change tag, preventing users from applying it manually.
This parameter is required.
One of the following values: activate, create, deactivate, delete
tag

Tag to create, delete, activate or deactivate. For tag creation, the tag must not exist. For tag deletion, the tag must exist. For tag activation, the tag must exist and not be in use by an extension. For tag deactivation, the tag must be currently active and manually defined.

This parameter is required.
reason

An optional reason for creating, deleting, activating or deactivating the tag.

Default: (empty)
ignorewarnings

Whether to ignore any warnings that are issued during the operation.

Type: boolean (details)
tags

Change tags to apply to the entry in the tag management log.

Values (separate with | or alternative): convenient-discussions, possible vandalism, repeating characters
token

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

This parameter is required.

Example edit

GET request edit

Description of script


Response edit

{
    "batchcomplete":""
}

Sample code edit

Create a sub page of this page to host the Python, PHP and JavaScript sample code, then transclude that page into this page. Name the page Sample code n, where n=1,2,3...n depending on the number of examples you have. Look at API:Tags and API:Tags/Sample_code_1 for reference.

User:Rubaaw/Sandbox/API:Managetags/Sample code 1

Demo app(s) edit

  • Add a link to the demo app. Embed an image of the demo if applicable

Possible errors edit

Code Info

Parameter history edit

  • v1.x: Introduced parameter_1, parameter_2
  • v0.x: Deprecated parameter_3

Additional notes edit

See also edit

  • Add link to documentation of related modules