Jump to content

Help:ApiSandbox

From mediawiki.org
(Redirected from API sandbox)
PD Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info.
Some old revisions for this page were imported under CC BY-SA license. Only new contributions are PD.
PD

ApiSandbox lets developers experiment with the MediaWiki API in a browser form. It was inspired by a Google Summer of Code proposal by Salil P. A..

Usage

[edit]

On a wiki with ApiSandbox installed, go to Special:ApiSandbox. Choose action, format and other parameters. The sandbox displays interactive help for every request parameter. Then click the "Make request" button. ApiSandbox makes the request to api.php on your behalf and displays the result below in the format you chose. You can copy the request URL (and POST data, if needed) for reuse.

You can preload ApiSandbox form parameters by putting the query string to api.php in the URL fragment, for example the query /w/api.php?action=languagesearch&search=Maratih&typos=1 becomes Special:ApiSandbox#action=languagesearch&format=json&search=Maratih&typos=1.

Note that, despite it being called a sandbox, any write requests performed with this extension will modify the wiki.