MediaWiki API ヘルプ
ãã®ãã¼ã¸ã¯èªåçæããã MediaWiki API ã®èª¬æææ¸ãã¼ã¸ã§ãã
èª¬æææ¸ã¨ä¾: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
ã¡ã¤ã³ ã¢ã¸ã¥ã¼ã«
- ã½ã¼ã¹: MediaWiki
- ã©ã¤ã»ã³ã¹: GPL-2.0-or-later
ç¶æ : MediaWiki APIã¯ãç©æ¥µçã«ãµãã¼ããããæ¹åãããæçããå®å®ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ããé¿ãããã¨ã¯ãã¦ãã¾ãããæã«ã¯å£ãã夿´ãå ããããããããã¾ãããæ´æ°ã®éç¥ãåãåãã«ã¯ãmediawiki-api-announce ã¡ã¼ãªã³ã°ãªã¹ãã«åå ãã¦ãã ããã
誤ã£ããªã¯ã¨ã¹ã: 誤ã£ããªã¯ã¨ã¹ãã API ã«éãããå ´åã"MediaWiki-API-Error" HTTP ãããã¼ãéä¿¡ããããã®ãããã¼ã®å¤ã¨éãè¿ãããã¨ã©ã¼ã³ã¼ãã¯åãå¤ã«ã»ããããã¾ãããã詳ããæ å ±ã¯ API: Errors and warnings ãåç §ãã¦ãã ããã
ãã¹ã: API ã®ãªã¯ã¨ã¹ãã®ãã¹ãã¯ãSpecial:ApiSandboxã§ç°¡åã«è¡ãã¾ãã
- action
å®è¡ããæä½ã§ãã
- block
- å©ç¨è ããããã¯ãã¾ãã
- changeauthenticationdata
- ç¾å¨ã®å©ç¨è ã®èªè¨¼ãã¼ã¿ã夿´ãã¾ãã
- changecontentmodel
- Change the content model of a page
- checktoken
- action=query&meta=tokens ã®ãã¼ã¯ã³ã®å¦¥å½æ§ã確èªãã¾ãã
- clearhasmsg
- ç¾å¨ã®å©ç¨è
ã®
hasmsgãã©ã°ãæ¶å»ãã¾ãã - clientlogin
- ã¤ã³ã¿ã©ã¯ãã£ãããã¼ã使ç¨ãã¦ã¦ã£ãã«ãã°ã¤ã³ãã¾ãã
- compare
- 2ã¤ã®çéã®å·®åãåå¾ãã¾ãã
- createaccount
- æ°ããå©ç¨è ã¢ã«ã¦ã³ãã使ãã¾ãã
- delete
- ãã¼ã¸ãåé¤ãã¾ãã
- edit
- ãã¼ã¸ã使ãç·¨éãã¾ãã
- emailuser
- å©ç¨è ã«ã¡ã¼ã«ãéä¿¡ãã¾ãã
- expandtemplates
- ã¦ã£ãããã¹ãã«å«ã¾ãããã¹ã¦ã®ãã³ãã¬ã¼ããå±éãã¾ãã
- feedcontributions
- å©ç¨è ã®æç¨¿è¨é²ãã£ã¼ããè¿ãã¾ãã
- feedrecentchanges
- æè¿ã®æ´æ°ãã£ã¼ããè¿ãã¾ãã
- feedwatchlist
- ã¦ã©ãããªã¹ãã®ãã£ã¼ããè¿ãã¾ãã
- filerevert
- ãã¡ã¤ã«ãå¤ãçã«å·®ãæ»ãã¾ãã
- help
- æå®ããã¢ã¸ã¥ã¼ã«ã®ãã«ãã表示ãã¾ãã
- imagerotate
- 1ã¤ä»¥ä¸ã®ç»åãå転ããã¾ãã
- import
- ä»ã®Wikiã¾ãã¯XMLãã¡ã¤ã«ãããã¼ã¸ãåãè¾¼ãã
- linkaccount
- Link an account from a third-party provider to the current user.
- login
- ãã°ã¤ã³ãã¦èªè¨¼ã¯ããã¼ãåå¾ãã¾ãã
- logout
- ãã°ã¢ã¦ããã¦ã»ãã·ã§ã³ãã¼ã¿ãæ¶å»ãã¾ãã
- managetags
- Perform management tasks relating to change tags.
- mergehistory
- ãã¼ã¸ã®å±¥æ´ãçµ±åããã
- move
- ãã¼ã¸ãç§»åãã¾ãã
- opensearch
- OpenSearch ãããã³ã«ã使ç¨ãã¦Wikiå ãæ¤ç´¢ãã¾ãã
- options
- ç¾å¨ã®å©ç¨è ã®è¨å®ã夿´ãã¾ãã
- paraminfo
- API ã¢ã¸ã¥ã¼ã«ã«é¢ããæ å ±ãåå¾ãã¾ãã
- parse
- Parses content and returns parser output.
- patrol
- ãã¼ã¸ã¾ãã¯çã巡忏ã¿ã«ããã
- protect
- ãã¼ã¸ã®ä¿è·ã¬ãã«ã夿´ãã¾ãã
- purge
- æå®ããããã¼ã¸ã®ãã£ãã·ã¥ãç ´æ£ãã¾ãã
- query
- MediaWikiãããã¼ã¿ãåå¾ãã¾ãã
- removeauthenticationdata
- Remove authentication data for the current user.
- resetpassword
- Send a password reset email to a user.
- revisiondelete
- çã®åé¤ããã³å¾©å ãè¡ãã¾ãã
- rollback
- ãã¼ã¸ã®æå¾ã®ç·¨éãåãæ¶ãã
- rsd
- Export an RSD (Really Simple Discovery) schema.
- setnotificationtimestamp
- Update the notification timestamp for watched pages.
- setpagelanguage
- ãã¼ã¸ã®è¨èªã夿´ãã¾ãã
- tag
- åã ã®çã¾ãã¯è¨é²é ç®ã«å¯¾ãã¿ã°ã®è¿½å ã¾ãã¯åé¤ãè¡ãã¾ãã
- unblock
- å©ç¨è ã®ãããã¯ãè§£é¤ãã¾ãã
- undelete
- åé¤ããããã¼ã¸ã®çã復å ãã¾ãã
- unlinkaccount
- Remove a linked third-party account from the current user.
- upload
- Upload a file, or get the status of pending uploads.
- userrights
- å©ç¨è ã®æå±ã°ã«ã¼ãã夿´ãã¾ãã
- validatepassword
- Validate a password against the wiki's password policies.
- watch
- ç¾å¨ã®å©ç¨è ã®ã¦ã©ãããªã¹ãã«ãã¼ã¸ã追å /é¤å»ãã¾ãã
- tokens
- 廿¢äºå®ã§ãã Get tokens for data-modifying actions.
- cspreport
- å é¨ã§ä½¿ç¨ã Used by browsers to report violations of the Content Security Policy. This module should never be used, except when used automatically by a CSP compliant web browser.
- stashedit
- å é¨ã§ä½¿ç¨ã Prepare an edit in shared cache.
- å¤ (次ã®å¤ã®ãããã1ã¤): blockãchangeauthenticationdataãchangecontentmodelãchecktokenãclearhasmsgãclientloginãcompareãcreateaccountãdeleteãeditãemailuserãexpandtemplatesãfeedcontributionsãfeedrecentchangesãfeedwatchlistãfilerevertãhelpãimagerotateãimportãlinkaccountãloginãlogoutãmanagetagsãmergehistoryãmoveãopensearchãoptionsãparaminfoãparseãpatrolãprotectãpurgeãqueryãremoveauthenticationdataãresetpasswordãrevisiondeleteãrollbackãrsdãsetnotificationtimestampãsetpagelanguageãtagãunblockãundeleteãunlinkaccountãuploadãuserrightsãvalidatepasswordãwatchãtokensãcspreportãstashedit
- Default: help
- format
åºåããå½¢å¼ã§ãã
- json
- ãã¼ã¿ã JSON å½¢å¼ã§åºåãã¾ãã
- jsonfm
- ãã¼ã¿ã JSON å½¢å¼ (HTML ã«åãè¾¼ãã å½¢å¼) ã§åºåãã¾ãã
- none
- ä½ãåºåãã¾ããã
- php
- ãã¼ã¿ã PHP ã®ã·ãªã¢ã«åããå½¢å¼ã§åºåãã¾ãã
- phpfm
- ãã¼ã¿ã PHP ã®ã·ãªã¢ã«åããå½¢å¼ (HTML ã«åãè¾¼ãã å½¢å¼) ã§åºåãã¾ãã
- rawfm
- ãã¼ã¿ããããã°è¦ç´ ä»ãã§ JSON å½¢å¼ (HTML ã«åãè¾¼ãã å½¢å¼) ã§åºåãã¾ãã
- xml
- ãã¼ã¿ã XML å½¢å¼ã§åºåãã¾ãã
- xmlfm
- ãã¼ã¿ã XML å½¢å¼ (HTML ã«åãè¾¼ãã å½¢å¼) ã§åºåãã¾ãã
- å¤ (次ã®å¤ã®ãããã1ã¤): jsonãjsonfmãnoneãphpãphpfmãrawfmãxmlãxmlfm
- Default: jsonfm
- maxlag
Maximum lag can be used when MediaWiki is installed on a database replicated cluster. To save actions causing any more site replication lag, this parameter can make the client wait until the replication lag is less than the specified value. In case of excessive lag, error code maxlag is returned with a message like Waiting for $host: $lag seconds lagged.
See Manual: Maxlag parameter for more information.- å: æ´æ°
- smaxage
s-maxageHTTP ãã£ãã·ã¥ ã³ã³ããã¼ã« ãããã¼ ã«ããã®ç§æ°ãè¨å®ãã¾ããã¨ã©ã¼ããã£ãã·ã¥ããããã¨ã¯ããã¾ããã- å: æ´æ°
- Default: 0
- maxage
max-ageHTTP ãã£ãã·ã¥ ã³ã³ããã¼ã« ãããã¼ ã«ããã®ç§æ°ãè¨å®ãã¾ããã¨ã©ã¼ããã£ãã·ã¥ããããã¨ã¯ããã¾ããã- å: æ´æ°
- Default: 0
- assert
user ãè¨å®ããå ´åã¯å©ç¨è ããã°ã¤ã³æ¸ã¿ãã©ããããbot ãæå®ããå ´åã¯ãããæ¨©éããããã©ããããããããæ¤è¨¼ãã¾ãã
- å¤ (次ã®å¤ã®ãããã1ã¤): anonãbotãuser
- assertuser
ç¾å¨ã®å©ç¨è ãæå®ãããå©ç¨è ã§ãããã¨ã確èªãã¾ãã
- å: å©ç¨è åã使ã£ãå©ç¨è
- requestid
ä»»æã®å¤ãæå®ã§ãããã®å¤ãçµæã«å«ãããã¾ãããªã¯ã¨ã¹ããèå¥ããããã«ä½¿ç¨ã§ãã¾ãã
- servedby
ãªã¯ã¨ã¹ããå¦çãããã¹ãåãçµæã«å«ãã¾ãã
- å: çå½å¤ (詳細)
- curtimestamp
ç¾å¨ã®ã¿ã¤ã ã¹ã¿ã³ããçµæã«å«ãã¾ãã
- å: çå½å¤ (詳細)
- responselanginfo
çµæã«uselangã¨errorlangã«ä½¿ç¨ãããè¨èªãå«ãã¾ãã
- å: çå½å¤ (詳細)
- origin
When accessing the API using a cross-domain AJAX request (CORS), set this to the originating domain. This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body).
For authenticated requests, this must match one of the origins in the
Originheader exactly, so it has to be set to something like https://en.wikipedia.org or https://meta.wikimedia.org. If this parameter does not match theOriginheader, a 403 response will be returned. If this parameter matches theOriginheader and the origin is whitelisted, theAccess-Control-Allow-OriginandAccess-Control-Allow-Credentialsheaders will be set.For non-authenticated requests, specify the value *. This will cause the
Access-Control-Allow-Originheader to be set, butAccess-Control-Allow-Credentialswill befalseand all user-specific data will be restricted.- uselang
ã¡ãã»ã¼ã¸ã®ç¿»è¨³ã«ä½¿ç¨ããè¨èªã§ããaction=query&meta=siteinfo 㯠siprop=languages ãä»ããã¨è¨èªã³ã¼ãã®ä¸è¦§ãè¿ãã¾ããuser ãæå®ãããã¨ã§ç¾å¨ã®å©ç¨è ã®å人è¨å®ã®è¨èªããcontent ãæå®ãããã¨ã§ãã®ã¦ã£ãã®æ¬æã®è¨èªã使ç¨ãããã¨ãã§ãã¾ãã
- Default: user
- errorformat
Format to use for warning and error text output.
- plaintext
- Wikitext with HTML tags removed and entities replaced.
- wikitext
- Unparsed wikitext.
- html
- HTML.
- raw
- Message key and parameters.
- none
- No text output, only the error codes.
- bc
- Format used prior to MediaWiki 1.29. errorlang and errorsuselocal are ignored.
- å¤ (次ã®å¤ã®ãããã1ã¤): bcãhtmlãnoneãplaintextãrawãwikitext
- Default: bc
- errorlang
Language to use for warnings and errors. action=query&meta=siteinfo with siprop=languages returns a list of language codes, or specify content to use this wiki's content language, or specify uselang to use the same value as the uselang parameter.
- Default: uselang
- errorsuselocal
æå®ãããå ´åãã¨ã©ã¼ããã¹ãã¯MediaWikiåå空éãããã¼ã«ã«ã«ã«ã¹ã¿ãã¤ãºãããã¡ãã»ã¼ã¸ã使ç¨ãã¾ãã
- å: çå½å¤ (詳細)
- ã¡ã¤ã³ ã¢ã¸ã¥ã¼ã«ã®ãã«ã
- api.php?action=help [ãµã³ãããã¯ã¹ã§éã]
- ãã¹ã¦ã®ãã«ãã1ã¤ã®ãã¼ã¸ã«
- api.php?action=help&recursivesubmodules=1 [ãµã³ãããã¯ã¹ã§éã]
ãã¼ã¿å
Input to MediaWiki should be NFC-normalized UTF-8. MediaWiki may attempt to convert other input, but this may cause some operations (such as edits with MD5 checks) to fail.
Parameters that take multiple values are normally submitted with the values separated using the pipe character, e.g. param=value1|value2 or param=value1%7Cvalue2. If a value must contain the pipe character, use U+001F (Unit Separator) as the separator and prefix the value with U+001F, e.g. param=%1Fvalue1%1Fvalue2.
Some parameter types in API requests need further explanation:
- boolean
çå½å¤ã®ãã©ã¡ã¼ã¿ã¼ã¯HTMLã®ãã§ãã¯ããã¯ã¹ã®ããã«æ©è½ãã¾ã: ãã©ã¡ã¼ã¿ã¼ãæå®ããã¦ããã°ãå¤ã«é¢ããããçã§ããã¨æ¨å®ãã¾ããå½ã®å¤ã«ã¤ãã¦ã¯ããã¿ã¡ã¼ã¿ã¼èªä½ãçç¥ãã¦ãã ããã
- expiry
æéã¯ãç¸å¯¾å¤ï¼ä¾ãã°ã5 months ã 2 weeksï¼ã¾ãã¯çµ¶å¯¾å¤ï¼ä¾ãã°ã2014-09-18T12:34:56Zï¼ã®ã©ã¡ããã§æå®ãã¾ããæéãå®ããªãå ´åã¯ãinfinite, indefinite, infinity ã¾ã㯠never ãç¨ãã¾ãã
- timestamp
Timestamps may be specified in several formats, see the Timestamp library input formats documented on mediawiki.org for details. ISO 8601 date and time is recommended: 2001-01-15T14:56:00Z. Additionally, the string now may be used to specify the current timestamp.
Templated parameters
Templated parameters support cases where an API module needs a value for each value of some other parameter. For example, if there were an API module to request fruit, it might have a parameter fruits to specify which fruits are being requested and a templated parameter {fruit}-quantity to specify how many of each fruit to request. An API client that wants 1 apple, 5 bananas, and 20 strawberries could then make a request like fruits=apples|bananas|strawberries&apples-quantity=1&bananas-quantity=5&strawberries-quantity=20.
ã¯ã¬ã¸ãã
API ã®éçºè :
- Roan Kattouw (2007å¹´9æ-2009å¹´ã®ä¸»ä»»éçºè )
- Victor Vasiliev
- Bryan Tong Minh
- Sam Reed
- Yuri Astrakhan (使è ã2006å¹´9æ-2007å¹´9æã®ä¸»ä»»éçºè )
- Brad Jorsch (2013å¹´-ç¾å¨ã®ä¸»ä»»éçºè )
ã³ã¡ã³ããææ¡ã質å㯠[email protected] ã«ãéããã ããã ãã°ã¯ãã¡ãã¸ãå ±åãã ãã: https://phabricator.wikimedia.org/