Available from version 1.23.0 (Gerrit change 100996)
Occurs before ApiMain's execute is called to process the request.

Define function:
public static function onApiBeforeMain( &$main ) { ... }

Attach hook:
$wgHooks['ApiBeforeMain'][] = 'MyExtensionHooks::onApiBeforeMain';
Called from: api.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiBeforeMain extensions.

Details Edit

  • &$main: ApiMain being used for request

See also Edit


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.