API:Parameter information
From MediaWiki.org
| This page is part of the MediaWiki action API documentation. |
MediaWiki action API
- Introduction and quick start
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Searching (by title, content, coordinates...)
- 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
- Asserting
| Parameter information | ||
|---|---|---|
| Obtain information about certain API parameters and errors This module cannot be used as a Generator. |
||
| Prefix | none | |
| Required rights | none | |
| Post only? | No | |
| Generated help | Current | |
| Version added |
|
|
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) or submodules such asquery+sitepropquerymodules: A list of query module names (value of theprop=,meta=orlist=parameter) deprecated in MW 1.25mainmodule: Get information about the main (top-level) module as well. Type: bool MW 1.15+pagesetmodule: Get information about the pageset module (providingtitles=and friends) as well. Type: bool MW 1.15-1.24
Example[edit | edit source]
Getting information about action=parse, prop=info query submodule, and a bogus query module:
| Result |
|---|
{
"warnings": {
"paraminfo": {
"*": "The module \"query\" does not have a submodule \"blah\""
}
},
"paraminfo": {
"helpformat": "none",
"modules": [
{
"name": "parse",
"classname": "ApiParse",
"path": "parse",
"group": "action",
"prefix": "",
"source": "MediaWiki",
"sourcename": "MediaWiki",
"licensetag": "GPL-2.0+",
"licenselink": "//en.wikipedia.org/wiki/Special:Version/License/MediaWiki",
"readrights": "",
"helpurls": [
"https://www.mediawiki.org/wiki/API:Parsing_wikitext#parse"
],
"parameters": [
{
"name": "title",
"type": "string"
},
{
"name": "text",
"type": "string"
},
{
"name": "summary",
"type": "string"
},
{
"name": "page",
"type": "string"
},
{
"name": "pageid",
"type": "integer"
},
{
"name": "redirects",
"default": "false",
"type": "boolean"
},
{
"name": "oldid",
"type": "integer"
},
{
"name": "prop",
"default": "text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle|iwlinks|properties",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": [
"text",
"langlinks",
"categories",
"categorieshtml",
"links",
"templates",
"images",
"externallinks",
"sections",
"revid",
"displaytitle",
"headitems",
"headhtml",
"modules",
"indicators",
"iwlinks",
"wikitext",
"properties",
"limitreportdata",
"limitreporthtml"
]
},
{
"name": "pst",
"default": "false",
"type": "boolean"
},
{
"name": "onlypst",
"default": "false",
"type": "boolean"
},
{
"name": "effectivelanglinks",
"default": "false",
"type": "boolean"
},
{
"name": "section",
"type": "string"
},
{
"name": "sectiontitle",
"type": "string"
},
{
"name": "disablepp",
"default": "false",
"type": "boolean"
},
{
"name": "disableeditsection",
"default": "false",
"type": "boolean"
},
{
"name": "generatexml",
"default": "false",
"type": "boolean"
},
{
"name": "preview",
"default": "false",
"type": "boolean"
},
{
"name": "sectionpreview",
"default": "false",
"type": "boolean"
},
{
"name": "disabletoc",
"default": "false",
"type": "boolean"
},
{
"name": "contentformat",
"type": [
"text/x-wiki",
"text/javascript",
"application/json",
"text/css",
"text/plain"
]
},
{
"name": "contentmodel",
"type": [
"wikitext",
"javascript",
"json",
"css",
"text",
"SecurePoll",
"MassMessageListContent",
"flow-board",
"Scribunto",
"JsonSchema"
]
},
{
"name": "mobileformat",
"default": "false",
"type": "boolean"
},
{
"name": "noimages",
"default": "false",
"type": "boolean"
},
{
"name": "mainpage",
"default": "false",
"type": "boolean"
}
]
},
{
"name": "info",
"classname": "ApiQueryInfo",
"path": "query+info",
"group": "prop",
"prefix": "in",
"source": "MediaWiki",
"sourcename": "MediaWiki",
"licensetag": "GPL-2.0+",
"licenselink": "//en.wikipedia.org/wiki/Special:Version/License/MediaWiki",
"readrights": "",
"helpurls": [
"https://www.mediawiki.org/wiki/API:Properties#info_.2F_in"
],
"parameters": [
{
"name": "prop",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": [
"protection",
"talkid",
"watched",
"watchers",
"notificationtimestamp",
"subjectid",
"url",
"readable",
"preload",
"displaytitle"
]
},
{
"name": "testactions",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": "string"
},
{
"name": "token",
"deprecated": "",
"multi": "",
"limit": 50,
"lowlimit": 50,
"highlimit": 500,
"type": [
"edit",
"delete",
"protect",
"move",
"block",
"unblock",
"email",
"import",
"watch"
]
},
{
"name": "continue",
"type": "string"
}
]
}
]
}
}
|
Possible errors[edit | edit source]
None.