CINXE.COM

MediaWiki API help - Wikipedia

<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>MediaWiki API help - Wikipedia</title> <script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"b2b62f01-9d91-447b-bae1-3919e96ea302","wgCanonicalNamespace":"Special","wgCanonicalSpecialPageName":"ApiHelp","wgNamespaceNumber":-1,"wgPageName":"Special:ApiHelp","wgTitle":"ApiHelp","wgCurRevisionId":0,"wgRevisionId":0,"wgArticleId":0,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Special:ApiHelp","wgRelevantArticleId":0,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{ "levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":0,"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"user.options":"loading","mediawiki.hlist":"ready","mediawiki.apipretty":"ready","mediawiki.skinning.interface":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["mediawiki.page.ready","ext.centralNotice.geoIP","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups", "ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.cx.eventlogging.campaigns"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cmediawiki.apipretty%2Chlist%7Cmediawiki.skinning.interface&amp;only=styles&amp;skin=apioutput"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;safemode=1&amp;skin=apioutput"></script> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="MediaWiki API help - Wikipedia"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Special:ApiHelp"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Special:ApiHelp"> <link rel="license" href="https://www.mediawiki.org/wiki/Special:MyLanguage/Copyright"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns--1 ns-special mw-special-ApiHelp page-Special_ApiHelp rootpage-Special_ApiHelp skin-apioutput action-view"><div class="mw-body" role="main"> <h1 id="firstHeading">MediaWiki API help</h1> <div class="mw-body-content"> <div id="mw-content-text" class="mw-body-content"><p>This is an auto-generated MediaWiki API documentation page. </p><p>Documentation and examples: <a class="external free" href="https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page">https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page</a> </p><h2 class="apihelp-header apihelp-module-name" dir="ltr" lang="en" id="query+alldeletedrevisions">list=alldeletedrevisions (adr)</h2><div class="apihelp-linktrail">(<a href="/wiki/Special:ApiHelp/main" class="apihelp-linktrail" dir="ltr" lang="en">main</a> | <a href="/wiki/Special:ApiHelp/query" class="apihelp-linktrail" dir="ltr" lang="en">query</a> | <b dir="ltr" lang="en">alldeletedrevisions</b>)</div> <div class="apihelp-block apihelp-flags"><ul><li><span class="apihelp-flag-readrights">This module requires read rights.</span></li><li><span class="apihelp-flag-generator">This module can be used as a generator.</span></li><li><span class="apihelp-source">Source: <span dir="ltr" lang="en">MediaWiki</span></span></li><li><span class="apihelp-license">License: <a href="/wiki/Special:Version/License/MediaWiki" title="Special:Version/License/MediaWiki"><span dir="ltr" lang="en">GPL-2.0-or-later</span></a></span></li></ul></div> <p>List all deleted revisions by a user or in a namespace. </p> <div class="apihelp-block apihelp-help-urls"><ul><li><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/API:Alldeletedrevisions" dir="ltr">https://www.mediawiki.org/wiki/Special:MyLanguage/API:Alldeletedrevisions</a></li></ul></div> <div class="apihelp-block apihelp-parameters"><div class="apihelp-block-head">Specific parameters:</div><div class="apihelp-block-header">Other general parameters are available.</div><dl><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrprop">adrprop</span></dt><dd class="description"><p>Which properties to get for each revision: </p><dl><dt><span dir="ltr" lang="en">ids</span></dt> <dd>The ID of the revision.</dd> <dt><span dir="ltr" lang="en">flags</span></dt> <dd>Revision flags (minor).</dd> <dt><span dir="ltr" lang="en">timestamp</span></dt> <dd>The timestamp of the revision.</dd> <dt><span dir="ltr" lang="en">user</span></dt> <dd>User that made the revision. If the user has been revision deleted, a <samp>userhidden</samp> property will be returned.</dd> <dt><span dir="ltr" lang="en">userid</span></dt> <dd>User ID of the revision creator. If the user has been revision deleted, a <samp>userhidden</samp> property will be returned.</dd> <dt><span dir="ltr" lang="en">size</span></dt> <dd>Length (bytes) of the revision.</dd> <dt><span dir="ltr" lang="en">slotsize</span></dt> <dd>Length (bytes) of each revision slot.</dd> <dt><span dir="ltr" lang="en">sha1</span></dt> <dd>SHA-1 (base 16) of the revision. If the content has been revision deleted, a <samp>sha1hidden</samp> property will be returned.</dd> <dt><span dir="ltr" lang="en">slotsha1</span></dt> <dd>SHA-1 (base 16) of each revision slot. If the content has been revision deleted, a <samp>sha1hidden</samp> property will be returned.</dd> <dt><span dir="ltr" lang="en">contentmodel</span></dt> <dd>Content model ID of each revision slot.</dd> <dt><span dir="ltr" lang="en">comment</span></dt> <dd>Comment by the user for the revision. If the comment has been revision deleted, a <samp>commenthidden</samp> property will be returned.</dd> <dt><span dir="ltr" lang="en">parsedcomment</span></dt> <dd>Parsed comment by the user for the revision. If the comment has been revision deleted, a <samp>commenthidden</samp> property will be returned.</dd> <dt><span dir="ltr" lang="en">content</span></dt> <dd>Content of each revision slot. If the content has been revision deleted, a <samp>texthidden</samp> property will be returned. For performance reasons, if this option is used, <var>adrlimit</var> is enforced to 50.</dd> <dt><span dir="ltr" lang="en">tags</span></dt> <dd>Tags for the revision.</dd> <dt><span dir="ltr" lang="en">roles</span></dt> <dd>List content slot roles that exist in the revision.</dd> <dt><span dir="ltr" lang="en">parsetree</span></dt> <dd><span class="apihelp-deprecated">Deprecated.</span> Use <kbd><a href="/w/api.php?action=help&amp;modules=expandtemplates">action=expandtemplates</a></kbd> or <kbd><a href="/w/api.php?action=help&amp;modules=parse">action=parse</a></kbd> instead. The XML parse tree of revision content (requires content model <code>wikitext</code>). For performance reasons, if this option is used, <var>adrlimit</var> is enforced to 50.</dd></dl></dd><dd class="info">Values (separate with <kbd>|</kbd> or <a href="/w/api.php?action=help&amp;modules=main#main/datatypes">alternative</a>): comment, content, contentmodel, flags, ids, parsedcomment, roles, sha1, size, slotsha1, slotsize, tags, timestamp, user, userid, parsetree</dd><dd class="info">Default: ids|timestamp|flags|comment|user</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrslots">adrslots</span></dt><dd class="description"><p>Which revision slots to return data for, when slot-related properties are included in <var>adrprops</var>. If omitted, data from the <kbd>main</kbd> slot will be returned in a backwards-compatible format. </p></dd><dd class="info">Values (separate with <kbd>|</kbd> or <a href="/w/api.php?action=help&amp;modules=main#main/datatypes">alternative</a>): main</dd><dd class="info">To specify all values, use <kbd>*</kbd>.</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrcontentformat-{slot}">adrcontentformat-{slot}</span></dt><dd class="description"><p>Content serialization format used for output of content. </p></dd><dd class="info">This is a <a href="/w/api.php?action=help&amp;modules=main#main/templatedparams">templated parameter</a>. When making the request, <var>{slot}</var> in the parameter's name should be replaced with values of <var>adrslots</var>.</dd><dd class="info">One of the following values: application/json, application/octet-stream, application/unknown, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrlimit">adrlimit</span></dt><dd class="description"><p>Limit how many revisions will be returned. If <var>adrprop=content</var>, <var>adrprop=parsetree</var>, <var>adrdiffto</var> or <var>adrdifftotext</var> is used, the limit is 50. If <var>adrparse</var> is used, the limit is 1. </p></dd><dd class="info">Type: integer or <kbd>max</kbd></dd><dd class="info">The value must be between 1 and 500.</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrexpandtemplates">adrexpandtemplates</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Use <kbd><a href="/w/api.php?action=help&amp;modules=expandtemplates">action=expandtemplates</a></kbd> instead. Expand templates in revision content (requires adrprop=content). </p></dd><dd class="info">Type: boolean (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/boolean">details</a>)</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrgeneratexml">adrgeneratexml</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Use <kbd><a href="/w/api.php?action=help&amp;modules=expandtemplates">action=expandtemplates</a></kbd> or <kbd><a href="/w/api.php?action=help&amp;modules=parse">action=parse</a></kbd> instead. Generate XML parse tree for revision content (requires adrprop=content). </p></dd><dd class="info">Type: boolean (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/boolean">details</a>)</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrparse">adrparse</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Use <kbd><a href="/w/api.php?action=help&amp;modules=parse">action=parse</a></kbd> instead. Parse revision content (requires <var>adrprop=content</var>). For performance reasons, if this option is used, <var>adrlimit</var> is enforced to 1. </p></dd><dd class="info">Type: boolean (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/boolean">details</a>)</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrsection">adrsection</span></dt><dd class="description"><p>Only retrieve the content of the section with this identifier. </p></dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrdiffto">adrdiffto</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Use <kbd><a href="/w/api.php?action=help&amp;modules=compare">action=compare</a></kbd> instead. Revision ID to diff each revision to. Use <kbd>prev</kbd>, <kbd>next</kbd> and <kbd>cur</kbd> for the previous, next and current revision respectively. For performance reasons, if this option is used, <var>adrlimit</var> is enforced to 50. </p></dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrdifftotext">adrdifftotext</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Use <kbd><a href="/w/api.php?action=help&amp;modules=compare">action=compare</a></kbd> instead. Text to diff each revision to. Only diffs a limited number of revisions. Overrides <var>adrdiffto</var>. If <var>adrsection</var> is set, only that section will be diffed against this text. For performance reasons, if this option is used, <var>adrlimit</var> is enforced to 50. </p></dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrdifftotextpst">adrdifftotextpst</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Use <kbd><a href="/w/api.php?action=help&amp;modules=compare">action=compare</a></kbd> instead. Perform a pre-save transform on the text before diffing it. Only valid when used with <var>adrdifftotext</var>. </p></dd><dd class="info">Type: boolean (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/boolean">details</a>)</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrcontentformat">adrcontentformat</span></dt><dd class="info"><strong class="apihelp-deprecated">Deprecated.</strong></dd><dd class="description"><p>Serialization format used for <var>adrdifftotext</var> and expected for output of content. </p></dd><dd class="info">One of the following values: application/json, application/octet-stream, application/unknown, application/x-binary, text/css, text/javascript, text/plain, text/unknown, text/x-wiki, unknown/unknown</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adruser">adruser</span></dt><dd class="description"><p>Only list revisions by this user. </p><p><strong>Note:</strong> Due to <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgMiserMode" class="extiw" title="mw:Special:MyLanguage/Manual:$wgMiserMode">miser mode</a>, using <var>adruser</var> and <var>adrnamespace</var> together may result in fewer than <var>adrlimit</var> results returned before continuing; in extreme cases, zero results may be returned. </p></dd><dd class="info">Type: user, by any of username, IP, Temporary user, interwiki name (e.g. "prefix&gt;ExampleName") and user ID (e.g. "#12345")</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrnamespace">adrnamespace</span></dt><dd class="description"><p>Only list pages in this namespace. </p><p><strong>Note:</strong> Due to <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgMiserMode" class="extiw" title="mw:Special:MyLanguage/Manual:$wgMiserMode">miser mode</a>, using <var>adruser</var> and <var>adrnamespace</var> together may result in fewer than <var>adrlimit</var> results returned before continuing; in extreme cases, zero results may be returned. </p></dd><dd class="info">Values (separate with <kbd>|</kbd> or <a href="/w/api.php?action=help&amp;modules=main#main/datatypes">alternative</a>): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 100, 101, 118, 119, 126, 127, 710, 711, 828, 829</dd><dd class="info">To specify all values, use <kbd>*</kbd>.</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrstart">adrstart</span></dt><dd class="description"><p>The timestamp to start enumerating from. </p></dd><dd class="info">May only be used with <var>adruser</var>.</dd><dd class="info">Type: timestamp (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/timestamp">allowed formats</a>)</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrend">adrend</span></dt><dd class="description"><p>The timestamp to stop enumerating at. </p></dd><dd class="info">May only be used with <var>adruser</var>.</dd><dd class="info">Type: timestamp (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/timestamp">allowed formats</a>)</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrdir">adrdir</span></dt><dd class="description"><p>In which direction to enumerate: </p><dl><dt><span dir="ltr" lang="en">newer</span></dt> <dd>List oldest first. Note: adrstart has to be before adrend.</dd> <dt><span dir="ltr" lang="en">older</span></dt> <dd>List newest first (default). Note: adrstart has to be later than adrend.</dd></dl></dd><dd class="info">One of the following values: newer, older</dd><dd class="info">Default: older</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrfrom">adrfrom</span></dt><dd class="description"><p>Start listing at this title. </p></dd><dd class="info">Cannot be used with <var>adruser</var>.</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrto">adrto</span></dt><dd class="description"><p>Stop listing at this title. </p></dd><dd class="info">Cannot be used with <var>adruser</var>.</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrprefix">adrprefix</span></dt><dd class="description"><p>Search for all page titles that begin with this value. </p></dd><dd class="info">Cannot be used with <var>adruser</var>.</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrexcludeuser">adrexcludeuser</span></dt><dd class="description"><p>Don't list revisions by this user. </p></dd><dd class="info">Cannot be used with <var>adruser</var>.</dd><dd class="info">Type: user, by any of username, IP, Temporary user, interwiki name (e.g. "prefix&gt;ExampleName") and user ID (e.g. "#12345")</dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrtag">adrtag</span></dt><dd class="description"><p>Only list revisions tagged with this tag. </p></dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrcontinue">adrcontinue</span></dt><dd class="description"><p>When more results are available, use this to continue. More detailed information on how to continue queries <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/API:Continue" class="extiw" title="mw:Special:MyLanguage/API:Continue">can be found on mediawiki.org</a>. </p></dd><dt><span dir="ltr" lang="en" id="query+alldeletedrevisions:adrgeneratetitles">adrgeneratetitles</span></dt><dd class="description"><p>When being used as a generator, generate titles rather than revision IDs. </p></dd><dd class="info">Type: boolean (<a href="/w/api.php?action=help&amp;modules=main#main/datatype/boolean">details</a>)</dd></dl></div> <div class="apihelp-block apihelp-examples"><div class="apihelp-block-head">Examples:</div><dl><dt>List the last 50 deleted contributions by user <kbd>Example</kbd>.</dt><dd><a href="/w/api.php?action=query&amp;list=alldeletedrevisions&amp;adruser=Example&amp;adrlimit=50" dir="ltr" rel="nofollow">api.php?action=query&amp;list=alldeletedrevisions&amp;adruser=Example&amp;adrlimit=50</a> <a href="/wiki/Special:ApiSandbox#action=query&amp;list=alldeletedrevisions&amp;adruser=Example&amp;adrlimit=50"><small>[open in sandbox]</small></a></dd><dt>List the first 50 deleted revisions in the main namespace.</dt><dd><a href="/w/api.php?action=query&amp;list=alldeletedrevisions&amp;adrdir=newer&amp;adrnamespace=0&amp;adrlimit=50" dir="ltr" rel="nofollow">api.php?action=query&amp;list=alldeletedrevisions&amp;adrdir=newer&amp;adrnamespace=0&amp;adrlimit=50</a> <a href="/wiki/Special:ApiSandbox#action=query&amp;list=alldeletedrevisions&amp;adrdir=newer&amp;adrnamespace=0&amp;adrlimit=50"><small>[open in sandbox]</small></a></dd></dl></div> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/wiki/Special:ApiHelp">https://en.wikipedia.org/wiki/Special:ApiHelp</a>"</div></div> </div> </div> <script>(RLQ=window.RLQ||[]).push(function(){mw.log.warn("This page is using the deprecated ResourceLoader module \"mediawiki.skinning.interface\".\n[1.43] The use of the `interface-message-box` feature with SkinModule is deprecated in favor of CodexModule. Please remove this feature.More information can be found at [[mw:Manual:ResourceLoaderSkinModule]]. ");mw.config.set({"wgHostname":"mw-api-ext.codfw.main-77696c9df4-nxhjb","wgBackendResponseTime":148});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10