Manual:api.php

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch 0% • ‎English 100% • ‎español 23% • ‎français 0% • ‎日本語 92% • ‎polski 0% • ‎português do Brasil 92% • ‎中文 31%

The api.php file is the external access point for the MediaWiki API. See API:Main page for details on using the API.

Actions taken[edit | edit source]

Several actions are taken by api.php, including:

  • Check for PHP version 5.2.3 or higher and exit with an error message if a lower version is found.
  • Include WebStart.php.
  • Check if the API is enabled ($wgEnableAPI).
  • Do some stuff to make cross-site requests to the API possible. See $wgCrossSiteAJAXdomains.
  • Construct an ApiMain object with the arguments passed via the URL and call its execute() method to do the actual API stuff.
  • Do any deferred updates.
  • Do some logging.

See also[edit | edit source]