API:Revisiondelete

From MediaWiki.org
Jump to: navigation, search
This page is part of the MediaWiki action API documentation.

MediaWiki action API

v · d · e

Delete and undelete revisions.

Parameters[edit]

  • type: Type of revision deletion being performed. Possible values: revision, archive, oldimage, filearchive, logging.
  • target: Page title for the revision deletion, if required for the type. Targets are always required for archive, oldimage, and filearchive operations, and may be required for revision and logging operations.
  • ids: Identifiers for the revisions to be deleted. No more than 50 (500 for bots) allowed.
  • hide: What to hide for each revision. Possible values: content, comment, user.
  • show: What to unhide for each revision. Possible values: content, comment, user.
  • suppress: Whether to suppress data from administrators as well as others. Possible values: yes, no, nochange. (Default: nochange)
  • reason: Reason for the deletion or undeletion.
  • tags: Tags to apply to the entry in the deletion log. 1.29+
  • token: A "csrf" token retrieved from action=query&meta=tokens

Example[edit]

Hide all information about revision ID 71. (The target, Sample Page, is unnecessary in this case.)




action=revisiondelete

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

Delete and undelete revisions.

Parameters:
type

Type of revision deletion being performed.

This parameter is required.
One of the following values: revision, archive, oldimage, filearchive, logging
target

Page title for the revision deletion, if required for the type.

ids

Identifiers for the revisions to be deleted.

This parameter is required.
Separate values with | or alternative. Maximum number of values is 50 (500 for bots).
hide

What to hide for each revision.

Values (separate with | or alternative): content, comment, user
show

What to unhide for each revision.

Values (separate with | or alternative): content, comment, user
suppress

Whether to suppress data from administrators as well as others.

One of the following values: yes, no, nochange
Default: nochange
reason

Reason for the deletion or undeletion.

tags

Tags to apply to the entry in the deletion log.

Values (separate with | or alternative):
token

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

This parameter is required.