MediaWiki API ヘルプ
ãã®ãã¼ã¸ã¯èªåçæããã MediaWiki API ã®èª¬æææ¸ãã¼ã¸ã§ãã
èª¬æææ¸ã¨ä¾: https://www.mediawiki.org/wiki/API
ã¡ã¤ã³ ã¢ã¸ã¥ã¼ã«
- Source: MediaWiki
- License: GPL-2.0-or-later
ç¶æ : MediaWiki APIã¯ãç©æ¥µçã«ãµãã¼ããããæ¹åãããæçããå®å®ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ããé¿ãããã¨ã¯ãã¦ãã¾ãããæã«ã¯å£ãã夿´ãå ããããããããã¾ãããã¢ãããã¼ãã®éç¥ãåãåãã«ã¯ãthe mediawiki-api-announce ã¡ã¼ãªã³ã°ãªã¹ãã«åå ãã¦ãã ããã
誤ã£ããªã¯ã¨ã¹ã: 誤ã£ããªã¯ã¨ã¹ãã API ã«éãããå ´åã"MediaWiki-API-Error" HTTP ãããã¼ãéä¿¡ããããã®ãããã¼ã®å¤ã¨éãè¿ãããã¨ã©ã¼ã³ã¼ãã¯åãå¤ã«ã»ããããã¾ãããã詳ããæ å ±ã¯ API: Errors and warnings ãåç §ãã¦ãã ããã
ãã¹ã: API ã®ãªã¯ã¨ã¹ãã®ãã¹ãã¯ãSpecial:ApiSandboxã§ç°¡åã«è¡ãã¾ãã
- action
å®è¡ããæä½ã§ãã
- block
- å©ç¨è ããããã¯ãã¾ãã
- changeauthenticationdata
- Change authentication data for the current user.
- checktoken
- action=query&meta=tokens ã®ãã¼ã¯ã³ã®å¦¥å½æ§ã確èªãã¾ãã
- clearhasmsg
- ç¾å¨ã®å©ç¨è
ã®
hasmsgãã©ã°ãæ¶å»ãã¾ãã - clientlogin
- Log in to the wiki using the interactive flow.
- compare
- 2ã¤ã®çéã®å·®åãåå¾ãã¾ãã
- createaccount
- æ°ããå©ç¨è ã¢ã«ã¦ã³ãã使ãã¾ãã
- 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.
- 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
- Change preferences of the current user.
- paraminfo
- API ã¢ã¸ã¥ã¼ã«ã«é¢ããæ å ±ãåå¾ãã¾ãã
- parse
- Parses content and returns parser output.
- patrol
- ãã¼ã¸ã¾ãã¯çã巡忏ã¿ã«ããã
- protect
- ãã¼ã¸ã®ä¿è·ã¬ãã«ã夿´ãã¾ãã
- purge
- æå®ããããã¼ã¸ã®ãã£ãã·ã¥ãç ´æ£ãã¾ãã
- query
- Fetch data from and about MediaWiki.
- removeauthenticationdata
- Remove authentication data for the current user.
- resetpassword
- Send a password reset email to a user.
- revisiondelete
- çã®åé¤ããã³å¾©å ãè¡ãã¾ãã
- rollback
- Undo the last edit to the page.
- rsd
- Export an RSD (Really Simple Discovery) schema.
- setnotificationtimestamp
- Update the notification timestamp for watched pages.
- setpagelanguage
- ãã¼ã¸ã®è¨èªã夿´ãã¾ãã
- stashedit
- Prepare an edit in shared cache.
- 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.
- å¤ (次ã®å¤ã®ãããã1ã¤): blockãchangeauthenticationdataãchecktokenãclearhasmsgãclientloginãcompareãcreateaccountãcspreportã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ãstasheditãtagãunblockãundeleteãunlinkaccountãuploadãuserrightsãvalidatepasswordãwatchãtokens
- æ¢å®å¤: 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
- æ¢å®å¤: 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.- Type: integer
- smaxage
s-maxageHTTP ãã£ãã·ã¥ ã³ã³ããã¼ã« ãããã¼ ã«ããã®ç§æ°ãè¨å®ãã¾ããã¨ã©ã¼ããã£ãã·ã¥ããããã¨ã¯ããã¾ããã- Type: integer
- æ¢å®å¤: 0
- maxage
max-ageHTTP ãã£ãã·ã¥ ã³ã³ããã¼ã« ãããã¼ ã«ããã®ç§æ°ãè¨å®ãã¾ããã¨ã©ã¼ããã£ãã·ã¥ããããã¨ã¯ããã¾ããã- Type: integer
- æ¢å®å¤: 0
- assert
user ãè¨å®ããå ´åã¯å©ç¨è ããã°ã¤ã³æ¸ã¿ãã©ããããbot ãæå®ããå ´åã¯ãããæ¨©éããããã©ããããããããæ¤è¨¼ãã¾ãã
- å¤ (次ã®å¤ã®ãããã1ã¤): userãbot
- assertuser
ç¾å¨ã®ã¦ã¼ã¶ã¼ãæå®ãããã¦ã¼ã¶ã¼ã§ãããã¨ã確èªãã¾ãã
- Type: user name
- requestid
ä»»æã®å¤ãæå®ã§ãããã®å¤ãçµæã«å«ãããã¾ãããªã¯ã¨ã¹ããèå¥ããããã«ä½¿ç¨ã§ãã¾ãã
- servedby
ãªã¯ã¨ã¹ããå¦çãããã¹ãåãçµæã«å«ãã¾ãã
- Type: boolean (details)
- curtimestamp
ç¾å¨ã®ã¿ã¤ã ã¹ã¿ã³ããçµæã«å«ãã¾ãã
- Type: boolean (details)
- responselanginfo
çµæã«uselangã¨errorlangã«ä½¿ç¨ãããè¨èªãå«ãã¾ãã
- Type: boolean (details)
- 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 ãæå®ãããã¨ã§ãã®ã¦ã£ãã®æ¬æã®è¨èªã使ç¨ãããã¨ãã§ãã¾ãã
- æ¢å®å¤: 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ã¤): plaintextãwikitextãhtmlãrawãnoneãbc
- æ¢å®å¤: 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.
- æ¢å®å¤: uselang
- errorsuselocal
æå®ãããå ´åãã¨ã©ã¼ããã¹ãã¯MediaWikiåå空éãããã¼ã«ã«ã«ã«ã¹ã¿ãã¤ãºãããã¡ãã»ã¼ã¸ã使ç¨ãã¾ãã
- Type: boolean (details)
- ã¡ã¤ã³ ã¢ã¸ã¥ã¼ã«ã®ãã«ã
- 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.
Some parameter types in API requests need further explanation:
- boolean
- Boolean parameters work like HTML checkboxes: if the parameter is specified, regardless of value, it is considered true. For a false value, omit the parameter entirely.
- timestamp
- Timestamps may be specified in several formats. ISO 8601 date and time is recommended. All times are in UTC, any included timezone is ignored.
- ISO 8601 date and time, 2001-01-15T14:56:00Z (punctuation and Z are optional)
- ISO 8601 date and time with (ignored) fractional seconds, 2001-01-15T14:56:00.00001Z (dashes, colons, and Z are optional)
- MediaWiki format, 20010115145600
- Generic numeric format, 2001-01-15 14:56:00 (optional timezone of GMT, +##, or -## is ignored)
- EXIF format, 2001:01:15 14:56:00
- RFC 2822 format (timezone may be omitted), Mon, 15 Jan 2001 14:56:00
- RFC 850 format (timezone may be omitted), Monday, 15-Jan-2001 14:56:00
- C ctime format, Mon Jan 15 14:56:00 2001
- Seconds since 1970-01-01T00:00:00Z as a 1 to 13 digit integer (excluding 0)
- The string now
- alternative multiple-value separator
- 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.
ã¯ã¬ã¸ãã
API ã®éçºè :
- Roan Kattouw (2007å¹´9æ-2009å¹´ã®ä¸»ä»»éçºè )
- Victor Vasiliev
- Bryan Tong Minh
- Sam Reed
- Yuri Astrakhan (使è ã2006å¹´9æ-2007å¹´9æã®ä¸»ä»»éçºè )
- Brad Jorsch (2013å¹´-ç¾å¨ã®ä¸»ä»»éçºè )
ã³ã¡ã³ããææ¡ã質å㯠mediawiki-api@lists.wikimedia.org ã«ãéããã ããã ãã°ã¯ãã¡ãã¸ãå ±åãã ãã: https://phabricator.wikimedia.org/