APIサンドボックス
このページでは、MediaWiki ウェブサービス API を試用できます。 API の使用方法の詳細はAPI のドキュメントをご覧ください。例: Main Pageの内容を取得。操作を選択すると他の例を閲覧できます。 これはサンドボックスですが、このページで実行した操作によってウィキが変更される場合があることにご注意ください。
main
状態: このページに表示されている機能は全て動作するはずですが、この API は未だ活発に開発されており、変更される可能性があります。アップデートの通知を受け取るには、the mediawiki-api-announce メーリングリストに参加してください。
誤ったリクエスト: 誤ったリクエストが API に送られた場合、"MediaWiki-API-Error" HTTP ヘッダーが送信され、そのヘッダーの値と送り返されるエラーコードは同じ値にセットされます。より詳しい情報は API: Errors and warnings を参照してください。
テスト: API のリクエストのテストは、Special:ApiSandboxで簡単に行えます。
action
abusefiltercheckmatch
abusefilterchecksyntax
abusefilterevalexpression
abusefilterunblockautopromote
block
categorytree
changeauthenticationdata
checktoken
cirrus-config-dump
cirrus-mapping-dump
cirrus-settings-dump
clearhasmsg
clientlogin
compare
createaccount
delete
edit
emailuser
expandtemplates
feedcontributions
feedrecentchanges
feedwatchlist
filerevert
geocode
help
imagerotate
import
linkaccount
login
logout
managetags
mergehistory
move
opensearch
options
paraminfo
parse
patrol
protect
purge
query
removeauthenticationdata
resetpassword
revisiondelete
rollback
rsd
setnotificationtimestamp
stashedit
tag
tokens
unblock
undelete
unlinkaccount
upload
userrights
watch
- 実行する操作です。
format
json
json
none
php
rawfm
xml
- 出力する形式です。
- 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.
s-maxage
HTTP キャッシュ コントロール ヘッダー に、この秒数を設定します。エラーがキャッシュされることはありません。
max-age
HTTP キャッシュ コントロール ヘッダー に、この秒数を設定します。エラーがキャッシュされることはありません。
assert
user
bot
- user を設定した場合は利用者がログイン済みかどうかを、bot を指定した場合はボット権限があるかどうかを、それぞれ検証します。
requestid
- 任意の値を指定でき、その値が結果に含められます。リクエストを識別するために使用できます。
servedby
- リクエストを処理したホスト名を結果に含めます。
curtimestamp
- 現在のタイムスタンプを結果に含めます。
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). This must match one of the origins in the
Origin
header 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 theOrigin
header, a 403 response will be returned. If this parameter matches theOrigin
header and the origin is whitelisted, anAccess-Control-Allow-Origin
header will be set.
uselang
- メッセージの翻訳に使用する言語です。action=query&meta=siteinfo は siprop=languages を付けると言語コードの一覧を返します。user を指定することで現在の利用者の個人設定の言語を、content を指定することでこのウィキの本文の言語を使用することもできます。
API モジュール "format=json" の情報を読み込んでいます...
main
format=json