This page is a translated version of the page API and the translation is 29% complete.

مدیاویکی چندین رابط برنامه‌نویسی کاربردی (API) دارد.

سه API مهم در مدیاویکی عبارتند از:

توجه داشته باشید که هم MediaWiki Action API و هم MediaWiki JavaScript API ساختاری ماژولار دارند: هر دو توسط افزونه‌ها قابل گسترش هستند، به همین دلیل ماژول‌های API در دسترس ممکن است از یک ویکی به ویکی دیگر متفاوت باشند.[1] While the API modules built into MediaWiki Core are available in most MediaWiki wikis, built-in Action API modules can also be disabled .

Within the context of the MediaWiki website the Action API can be accessed from JavaScript via the mw.Api JavaScript API. (mw.ForeignApi for allowed cross-site requests, e.g. between WMF wikis.) For libraries to access the MediaWiki Action API from your favorite programming language, see API:Client code .

Other web APIs

This table: مشاهده · بحث · ویرایش
API Availability URL base Example
MediaWiki Action API Included with MediaWiki

Enabled on Wikimedia projects

/api.php https://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Earth
MediaWiki REST API Included with MediaWiki 1.35+

Enabled on Wikimedia projects

/rest.php https://en.wikipedia.org/w/rest.php/v1/page/Earth
Wikimedia REST API Not included with MediaWiki

Available for Wikimedia projects only

/api/rest https://en.wikipedia.org/api/rest_v1/page/title/Earth
For commercial-scale APIs for Wikimedia projects, see Wikimedia Enterprise

See also

Suggestions and ideas for the MediaWiki APIs are tracked on فابریکاتور :

Footnotes

  1. For extending the Action API, see API:Extensions . For information about JavaScript modules, see ResourceLoader .