API:Parameter information
From MediaWiki.org
![]() |
This page is part of the MediaWiki API documentation. |
Language: | English • Deutsch • polski |
---|
Quick overview:
- Quick start guide
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Search suggestions
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
MediaWiki version: | = 1.12 |
Obtaining parameter information[edit | edit source]
You can obtain information about modules and their parameters through action=paraminfo.
Parameters[edit | edit source]
modules
: A list of top-level module names (value of theaction=
parameter)querymodules
: A list of query module names (value of theprop=
,meta=
orlist=
parameter)
Example[edit | edit source]
Getting information about action=parse and prop=info
Result |
---|
The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0" encoding="utf-8"?> <api> <paraminfo> <modules> <module classname="ApiParse" description="This module parses wikitext and returns parser output" prefix="" name="parse"> <parameters> <param name="title" default="API" description="Title of page the text belongs to" /> <param name="text" /> <param name="page" /> <param name="oldid" /> <param name="prop" default="text|langlinks|categories|links|templates|images|externallinks|sections|revid" multi="" limit="500" description="Which pieces of information to get. NOTE: Section tree is only generated if there are more than 4 sections, or if the __TOC__ keyword is present"> <type> <t>text</t> <t>langlinks</t> <t>categories</t> <t>links</t> <t>templates</t> <t>images</t> <t>externallinks</t> <t>sections</t> <t>revid</t> </type> </param> </parameters> </module> </modules> <querymodules> <module classname="ApiQueryInfo" description="Get basic page information such as namespace, title, last touched date, ..." prefix="in" name="info"> <parameters> <param name="prop" multi="" limit="500" description="Which additional properties to get: "protection" - List the protection level of each page "talkid" - The page ID of the talk page for each non-talk page "subjectid" - The page ID of the parent page for each talk page"> <type> <t>protection</t> <t>talkid</t> <t>subjectid</t> </type> </param> <param name="token" multi="" limit="500" description="Request a token to perform a data-modifying action on a page"> <type> <t>edit</t> <t>delete</t> <t>protect</t> <t>move</t> <t>block</t> <t>unblock</t> <t>email</t> </type> </param> </parameters> </module> <module name="blah" missing="" /> </querymodules> </paraminfo> </api> |
The above content has been placed in a collapsed box for improved usability. |
Possible errors[edit | edit source]
None.