راهنمای واسط برنامهنویسی کاربردی مدیاویکی
این یک صفحهٔ مستندات برای واسط برنامهنویسی کاربردی مدیاویکی است که بهطور خودکار ایجاد شده است.
مستندات و نمونهها: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
General information
وضعیت: تمام ویژگیهایی که در این صفحه نمایش یافتهاند باید کار بکنند، ولی رابط برنامهنویسی کاربردی کماکان در حال توسعه است، و ممکن است در هر زمان تغییر بکند. به عضویت فهرست پست الکترونیکی mediawiki-api-announce در بیایید تا از تغییرات باخبر شوید.
درخواستهای معیوب: وقتی درخواستهای معیوب به رابط برنامهنویسی کاربردی فرستاده شوند، یک سرایند اچتیتیپی با کلید «MediaWiki-API-Erorr» فرستاده میشود و بعد هم مقدار سرایند و هم کد خطای بازگردانده شده هر دو به یک مقدار نسبت داده میشوند. برای اطلاعات بیشتر API: Errors and warnings را ببینید.
آزمایش: برای انجام درخواستهای API آزمایشی Special:ApiSandbox را ببینید.
Request methods
Action API requests may use GET and POST methods. Prefer using the GET method, which allows requests to be routed to faster replica servers and responses to be cached, unless the length of the URL with parameters would exceed its length limit (commonly 8000 bytes), or a module only accepts POST requests.
Parameters for POST requests may be sent in the query part of the request URL (like in GET requests) and in the POST request body, and mixing both ways in one request is allowed. Certain parameters such as passwords must be sent in the request body. If the same parameter is sent as part of the URL and also in the request body, it must have the same value in both places.
Data types
Input to MediaWiki should be NFC-normalized UTF-8. MediaWiki may attempt to convert other input, but this may cause some operations (such as edits with MD5 checks) to fail.
Parameters that take multiple values are normally submitted with the values separated using the pipe character, e.g. param=value1|value2 or param=value1%7Cvalue2. If a value must contain the pipe character, use U+001F (Unit Separator) as the separator and prefix the value with U+001F, e.g. param=%1Fvalue1%1Fvalue2.
Some parameter types in API requests need further explanation:
- boolean
Boolean parameters work like HTML checkboxes: if the parameter is specified, regardless of value, it is considered true. For a false value, omit the parameter entirely.
- expiry
Expiry values may be relative (e.g. 5 months or 2 weeks) or absolute (e.g. 2014-09-18T12:34:56Z). For no expiry, use infinite, indefinite, infinity or never.
- timestamp
Timestamps may be specified in several formats, see the Timestamp library input formats documented on mediawiki.org for details. ISO 8601 date and time is recommended: 2001-01-15T14:56:00Z. The string now may be used to specify the current time.
Limits
Most API modules can accept up to ۵۰ inputs in multivalue parameters, and can return up to ۵۰۰ results per query (۵۰ results for slow queries).
For users with the apihighlimits right (رباتها ؤ مدیران), the limits are increased to ۵۰۰ inputs and ۵٬۰۰۰ results (۵۰۰ results for slow queries).
Templated parameters
Templated parameters support cases where an API module needs a value for each value of some other parameter. For example, if there were an API module to request fruit, it might have a parameter fruits to specify which fruits are being requested and a templated parameter {fruit}-quantity to specify how many of each fruit to request. An API client that wants 1 apple, 5 bananas, and 20 strawberries could then make a request like fruits=apples|bananas|strawberries&apples-quantity=1&bananas-quantity=5&strawberries-quantity=20.
پودمان اصلی
- منبع: MediaWiki
- مجوز: GPL-2.0-or-later
Specify the action to perform, the format of the response, and options that apply to all API modules.
- action
عملیاتی که باید انجام شود. این پارامتر باید جهت سهولت استفاده در اشکالزدایی، تحلیل، و مسیریابی یا فیلتر کردن درخواست، به عنوان بخشی از URL درخواست (نه بدنهٔ POST) ارسال شود.
- abusefiltercheckmatch
- بررسی کنید تا ببینید پالایهٔ ویرایش با مجموعهای از متغیرها، یک ویرایش، یا یک رویداد سیاههٔ پالایهٔ ویرایش کاربر مطابق است یا خیر.
- abusefilterchecksyntax
- نحو یک پالایهٔ ویرایش را بررسی کنید.
- abusefilterevalexpression
- یک عبارت پالایهٔ ویرایش را ارزشیابی میکند.
- abusefilterunblockautopromote
- باز کردن یک کاربر از ارتقاء خودکار بر پایهٔ نتیجهٔ پالایهٔ ویرایش.
- abuselogprivatedetails
- مشاهدهٔ جزئیات خصوصی یک مدخل سیاههٔ ویرایش.
- acquiretempusername
- دریافت یک نام کاربری برای کاربر موقت و ذخیرهٔ آن در نشست کنونی، در صورتی که ایجاد حساب موقت فعال باشد و کاربر کنونی از سامانه خارج شده باشد. اگر نامی از قبل ذخیره شده باشد، همان نام را بازمیگرداند.
- antispoof
- بررسی یک نام کاربری به وسیلهٔ آزمونهای بهنجارسازی عبارات سردرگمکننده
- block
- بستن یک کاربر.
- centralauthtoken
- دریافت یک بلیط ورود متمرکز برای ارسال یک درخواست تأییدشده به یک ویکی متصل شده.
- centralnoticecdncacheupdatebanner
- درخواست پاکسازی محتوای بنر ذخیرهشده در حافظۀ نهان CDN (پیشانه) برای کاربران ناشناس، برای بنر و زبان مورد درخواست
- centralnoticechoicedata
- Get data needed to choose a banner for a given project and language
- centralnoticequerycampaign
- Get all configuration settings for a campaign.
- changeauthenticationdata
- تغییر دادۀ اصالتسنجی برای کاربر کنونی
- changecontentmodel
- تغییر مدل محتوای یک صفحه
- checktoken
- بررسی اعتبار بلیط از action=query&meta=tokens.
- clearhasmsg
- پرچم
hasmsgرا برای کاربر جاری پاک کن. - clientlogin
- ورود به ویکی با استفاده از گردش کار تعاملی.
- communityconfigurationedit
- Change the content of a configuration provider in Community configuration
- compare
- تفاوت بین ۲ صفحه را بیابید.
- createaccount
- ایجاد یک حساب تازه کاربری
- createlocalaccount
- ایجاد اجباری یک حساب محلی. حساب مرکزی باید موجود باشد.
- cxdelete
- Delete a draft translation created using the Content Translation extension.
- cxtoken
- Get JWT tokens to authenticate with cxserver.
- delete
- حذف صفحه
- deleteglobalaccount
- حذف یک کاربر سراسری
- discussiontoolsedit
- فرستادن یک نظر در یک صفحهٔ بحث.
- discussiontoolsfindcomment
- Find a comment by its ID or name.
- discussiontoolsgetsubscriptions
- دریافت وضعیت اشتراک مبحثهای مشخصشده.
- discussiontoolssubscribe
- اشتراک (یا لغو اشتراک) برای دریافت آگاهسازیها دربارهٔ یک مبحث.
- discussiontoolsthank
- Send a public thank-you notification for a comment.
- echocreateevent
- Manually trigger a notification to a user
- echomarkread
- علامت گذاری آگاهسازیها به عنوان خوانده شده برای کاربر کنونی
- echomarkseen
- علامت گذاری آگاهسازیها به عنوان دیده شده برای کاربر کنونی.
- echomute
- بیصدا یا باصدا کردن اعلانها از کاربران یا صفحههای خاص.
- edit
- ایجاد و ویرایش صفحه
- editmassmessagelist
- ویرایش فهرست گیرندگان پیام انبوه.
- emailuser
- ایمیل به کاربر
- expandtemplates
- گسترش همه الگوها در ویکی نبشته
- featuredfeed
- یک فید از محتوای برگزیده را باز میگرداند..
- feedcontributions
- خوراک مشارکتهای یک کاربر را برمیگرداند.
- feedrecentchanges
- خوراک تغییرات اخیر را برمیگرداند.
- feedwatchlist
- برگرداندن خوراک فهرست پیگیری.
- filerevert
- واگردانی فایل به یک نسخه قدیمی
- globalblock
- بستن یا باز کردن یک کاربر بهطور سراسری.
- globalpreferenceoverrides
- Change local overrides for global preferences for the current user.
- globalpreferences
- تغییر ترجیحات سراسری کاربر کنونی.
- globaluserrights
- افزودن/حذف یک حساب به/از یک گروه سراسری.
- growthmanagementorlist
- Manage information in the structured mentor list (usually stored in MediaWiki:GrowthMentors.json). This module can be used by both current and future mentors (to add themselves or change their details) and administrators (for all users).
- growthmentordashboardupdatedata
- Schedule an extraordinary update of the mentee overview module in the mentor dashboard. You can only schedule one update per two hours for performance reasons.
- growthsetmenteestatus
- Set mentee's status (allows mentees to enable/disable mentorship module, or to opt-out entirely, which deletes the mentee/mentor relationship)
- growthsetmentor
- مربی کاربر را مشخص کنید. تغییر به طور عمومی ثبت خواهد شد.
- growthstarmentee
- Mark or unmark a mentee as starred by current user (stored privately and not logged)
- help
- نمایش راهنمای پودمانهای مشخصشده.
- homepagequestionstore
- تهیهٔ سوالات قالببندی شده ارسالشده از طریق ماژولهای صفحهٔ اصلی
- imagerotate
- این پودمان غیرفعال شده است.
- import
- Import a page from another wiki, or from an XML file.
- jsonconfig
- Allows direct access to JsonConfig subsystem.
- languagesearch
- Search for language names in any script.
- linkaccount
- Link an account from a third-party provider to the current user.
- login
- Log in and get authentication cookies.
- logout
- خروج به همراه پاک نمودن اطلاعات این نشست
- managetags
- Perform management tasks relating to change tags.
- massmessage
- فرستادن یک پیام به فهرستی از صفحهها.
- mergehistory
- ادغام تاریخچههای صفحه
- move
- انتقال صفحه
- opensearch
- جستجو در ویکی بااستفاده از پروتکل اوپنسرچ.
- options
- تغییر ترجیحات کاربر جاری
- paraminfo
- Obtain information about API modules.
- parse
- Parses content and returns parser output.
- patrol
- گشتزنی یک صفحه یا نسخهٔ ویرایشی.
- protect
- تغییر سطح محافظت صفحه
- purge
- Purge the cache for the given titles.
- query
- Fetch data from and about MediaWiki.
- removeauthenticationdata
- Remove authentication data for the current user.
- resetpassword
- Send a password reset email to a user.
- revisiondelete
- Delete and undelete revisions.
- rollback
- Undo the last edit to the page.
- rsd
- Export an RSD (Really Simple Discovery) schema.
- setglobalaccountstatus
- تنظیم وضعیت یک حساب سراسری.
- setnotificationtimestamp
- Update the notification timestamp for watched pages.
- setpagelanguage
- Change the language of a page.
- shortenurl
- کوتاه کردن یک نشانی اینترنتی بلند به یک نشانی اینترنتی کوتاه
- sitematrix
- گرفتن فهرست وبگاههای ویکیمدیا
- spamblacklist
- Validate one or more URLs against the spam block list.
- streamconfigs
- Exposes event stream config. Returns only format=json with formatversion=2.
- strikevote
- اجازه میدهد که مدیران رأیی را خط بزنند یا از خطخوردگی به درش آورند.
- sxdelete
- Delete the draft section translation and its parallel corpora from database.
- tag
- Add or remove change tags from individual revisions or log entries.
- templatedata
- واکشی دادههای ذخیرهشده توسط افزونهٔ الگوداده.
- thank
- پیام تشکری به یک ویرایشگر ارسال کنید.
- titleblacklist
- Validate a page title, filename, or username against the TitleBlacklist.
- torblock
- Check if an IP address is blocked as a Tor exit node.
- transcodereset
- کاربران با دسترسی 'فرارمزگردانی-بازنشانی' میتوانند یک فرارمزگردانی را بازنشانی و مجدد اجرا کنند.
- unblock
- بازکردن کاربر.
- undelete
- احیای نسخههای یک صفحهٔ حذفشده.
- unlinkaccount
- Remove a linked third-party account from the current user.
- upload
- بارگذاری یک پرونده یا دریافت وضعیت بارگذاریهای در انتظار.
- userrights
- تغییر گروهی که کاربر در آن عضو است.
- validatepassword
- Validate a password against the wiki's password policies.
- watch
- Add or remove pages from the current user's watchlist.
- webapp-manifest
- بازگشت بیانیهٔ اپلیکیشن وب
- webauthn
- API Module to communicate between server and client during registration/authentication process.
- bouncehandler
- داخلی Receive a bounce email and process it to handle the failing recipient.
- categorytree
- داخلی پودمان داخلی برای افزونهٔ درخت رده
- chartinfo
- داخلی Retrieve current count of how many unique Chart page usages there are. Multiple uses of the same chart on the same page are considered a single use.
- cirrus-check-sanity
- داخلی Reports on the correctness of a range of page ids in the search index
- cirrus-config-dump
- داخلی دامپ تنظیمات سیروسسرچ
- cirrus-profiles-dump
- داخلی Dump of CirrusSearch profiles for this wiki.
- cirrus-schema-dump
- داخلی Dump of CirrusSearch schema (settings and mappings) for this wiki.
- codemirror-validate
- داخلی بررسی خطاهای اعتبارسنجی در محتوای دادهشده
- collection
- داخلی API module for performing various operations on a wiki user's collection.
- cspreport
- داخلی Used by browsers to report violations of the Content Security Policy. This module should never be used, except when used automatically by a CSP compliant web browser.
- cxcheckunreviewed
- داخلی Check if any fast, unreviewed translation has been published recently for the current user.
- cxfavoritesuggestions
- داخلی Add or remove a favorite suggestion to the current user's list.
- cxpublish
- داخلی ذخیرهٔ یک صفحهٔ ایجادشده با استفاده از افزودهٔ ترجمهٔ محتوا
- cxpublishsection
- داخلی ذخیره صفحهٔ ایجادشده با استفاده از ویژگی ترجمهٔ بخش افزونهٔ ترجمهٔ محتوا.
- cxsave
- داخلی This module allows to save draft translations by section to save bandwidth and to collect parallel corpora.
- cxsplit
- داخلی Create and save a section translation to database, for every translated section of the given article translation
- discussiontoolscompare
- داخلی Get information about comment changes between two page revisions.
- discussiontoolspageinfo
- داخلی فرادادهٔ مورد نیاز برای راهاندازی ابزارهای گفتوگو را برمیگرداند
- discussiontoolspreview
- داخلی پیشنمایش یک پیام در یک صفحهٔ گفتگو
- echopushsubscriptions
- داخلی Manage push subscriptions for the current user.
- editcheckreferenceurl
- داخلی Check the status of a URL for use as a reference.
- fancycaptchareload
- داخلی کپچای جدید دریافت کن.
- growthinvalidateimagerecommendation
- داخلی Invalidate an image recommendation.
- growthinvalidatepersonalizedpraisesuggestion
- داخلی Invalidates a suggestion of a praiseworthy mentee in the Personalized praise module on the Mentor dashboard
- growthinvalidaterevisetonerecommendation
- داخلی Drop a 'Revise Tone' recommendation for a given page.
- helppanelquestionposter
- داخلی مدیریت ارسال سوالهای میز کمک برای کاربر کنونی.
- jsondata
- داخلی Retrieve localized JSON data.
- jsontransform
- داخلی Retrieve JSON data transformed by a Lua function.
- parser-migration
- داخلی تجزیه صفحه با دو تظیمات متفاوت
- readinglists
- داخلی Reading list write operations.
- sanitize-mapdata
- داخلی Performs data validation for Kartographer extension
- scribunto-console
- داخلی Internal module for servicing XHR requests from the Scribunto console.
- securepollauth
- داخلی به یک ویکی راهدور اجازه میدهد تا پیش از اعطای دسترسی برای رأیدادن در انتخابات، کاربران را تأیید هویت کند
- stashedit
- داخلی Prepare an edit in shared cache.
- sxsave
- داخلی Save the draft section translation and store the parallel corpora
- timedtext
- داخلی Provides timed text content for usage by <track> elements
- ulslocalization
- داخلی Get the localization of ULS in the given language.
- ulssetlang
- داخلی Update user's preferred interface language.
- visualeditor
- داخلی HTML5 یک صفحه را از خدمت پارسوید برمیگرداند.
- visualeditoredit
- داخلی ذخیره صفحه HTML5 به مدیاویکی (تبدیل به متن ویکی با سرویس پارسوید)
- wikimediaeventsblockededit
- داخلی Log information about blocked edit attempts
- wikimediaeventshcaptchaeditattempt
- داخلی Log edit diff when hCaptcha challenge is shown but edit is incomplete
- یکی از مقدارهای زیر: abusefiltercheckmatch، abusefilterchecksyntax، abusefilterevalexpression، abusefilterunblockautopromote، abuselogprivatedetails، acquiretempusername، antispoof، block، centralauthtoken، centralnoticecdncacheupdatebanner، centralnoticechoicedata، centralnoticequerycampaign، changeauthenticationdata، changecontentmodel، checktoken، clearhasmsg، clientlogin، communityconfigurationedit، compare، createaccount، createlocalaccount، cxdelete، cxtoken، delete، deleteglobalaccount، discussiontoolsedit، discussiontoolsfindcomment، discussiontoolsgetsubscriptions، discussiontoolssubscribe، discussiontoolsthank، echocreateevent، echomarkread، echomarkseen، echomute، edit، editmassmessagelist، emailuser، expandtemplates، featuredfeed، feedcontributions، feedrecentchanges، feedwatchlist، filerevert، globalblock، globalpreferenceoverrides، globalpreferences، globaluserrights، growthmanagementorlist، growthmentordashboardupdatedata، growthsetmenteestatus، growthsetmentor، growthstarmentee، help، homepagequestionstore، imagerotate، import، jsonconfig، languagesearch، linkaccount، login، logout، managetags، massmessage، mergehistory، move، opensearch، options، paraminfo، parse، patrol، protect، purge، query، removeauthenticationdata، resetpassword، revisiondelete، rollback، rsd، setglobalaccountstatus، setnotificationtimestamp، setpagelanguage، shortenurl، sitematrix، spamblacklist، streamconfigs، strikevote، sxdelete، tag، templatedata، thank، titleblacklist، torblock، transcodereset، unblock، undelete، unlinkaccount، upload، userrights، validatepassword، watch، webapp-manifest، webauthn، bouncehandler، categorytree، chartinfo، cirrus-check-sanity، cirrus-config-dump، cirrus-profiles-dump، cirrus-schema-dump، codemirror-validate، collection، cspreport، cxcheckunreviewed، cxfavoritesuggestions، cxpublish، cxpublishsection، cxsave، cxsplit، discussiontoolscompare، discussiontoolspageinfo، discussiontoolspreview، echopushsubscriptions، editcheckreferenceurl، fancycaptchareload، growthinvalidateimagerecommendation، growthinvalidatepersonalizedpraisesuggestion، growthinvalidaterevisetonerecommendation، helppanelquestionposter، jsondata، jsontransform، parser-migration، readinglists، sanitize-mapdata، scribunto-console، securepollauth، stashedit، sxsave، timedtext، ulslocalization، ulssetlang، visualeditor، visualeditoredit، wikimediaeventsblockededit، wikimediaeventshcaptchaeditattempt
- پیشفرض: help
- format
فرمت خروجی.
- یکی از مقدارهای زیر: json، jsonfm، none، rawfm، xml، xmlfm
- پیشفرض: jsonfm
- maxlag
بیشینهٔ تأخیر زمانی میتواند استفاده شود که مدیاویکی روی یک خوشهٔ همگونسازیشدهٔ پایگاه داده نصب شده باشد. برای جلوگیری از اینکه اقدامات باعث تأخیر همگونسازی بیشتر در سایت شوند، این پارامتر میتواند کارخواه را تا زمانی که تأخیر همگونسازی کمتر از مقدار مشخصشده باشد، منتظر نگه دارد. در صورت تأخیر بیش از حد، کد خطای maxlag همراه با پیامی مانند Waiting for $host: $lag seconds lagged بازگردانده میشود.
برای اطلاعات بیشتر، راهنما: پارامتر Maxlag را ببینید.- نوع: عدد صحیح
- smaxage
تنظيم
s-maxageسرآیند کنترل حافضهٔ نهان HTTP بر اين تعداد ثانيهها. خطاها هرگز در حافظه نهان نمیشوند.- نوع: عدد صحیح
- The value must be no less than ۰.
- پیشفرض: 0
- maxage
تنظيم
s-maxageسرآیند کنترل حافضهٔ نهان HTTP بر اين تعداد ثانيهها. خطاها هرگز در حافظه نهان نمیشوند.- نوع: عدد صحیح
- The value must be no less than ۰.
- پیشفرض: 0
- assert
بررسی اینکه اگر روی user تنظیم شده باشد، کاربر وارد شده باشد (از جمله احتمالاً به عنوان کاربر موقت)، اگر روی anon تنظیم شده باشد، وارد نشده باشد، یا اگر روی bot باشد، اختیارات کاربر ربات را داشته باشد.
- یکی از مقدارهای زیر: anon، bot، user
- assertuser
تأیید این که کاربر کنونی همان کاربر نامدار است.
- نوع: کاربر، توسط هریک از نام کاربری ؤ حساب کاربری موقت
- requestid
هر مقداری که در اینجا وارد شود در پاسخ گنجانده میشود. ممکن است برای تمايز بين درخواستها بکار رود.
- servedby
نام ميزبانی که درخواست را سرويس داده در نتايج گنجانده شود.
- نوع: بولی (جزئیات)
- curtimestamp
برچسب زمان کنونی را در نتیجه قرار دهید.
- نوع: بولی (جزئیات)
- responselanginfo
گنجاندن زبان مورد استفاده برای userlang و errorlang در نتیجه.
- نوع: بولی (جزئیات)
- origin
هنگام دسترسی به API با استفاده از درخواست AJAX فرادامنهای (CORS)، این مقدار را روی دامنهٔ مبدأ تنظیم کنید. این پارامتر باید در هر درخواست پیشپرواز (pre-flight) گنجانده شود، و بنابراین باید بخشی از URL درخواست باشد (نه بدنهٔ POST).
برای درخواستهای احرازهویتشده، این مقدار باید دقیقاً با یکی از مبدأها در سرآیند
Originمطابقت داشته باشد، بنابراین باید روی چیزی مانند https://en.wikipedia.org یا https://meta.wikimedia.org تنظیم شود. اگر این پارامتر با سرآیندOriginمطابقت نداشته باشد، پاسخ ۴۰۳ بازگردانده خواهد شد. اگر این پارامتر با سرآیندOriginمطابقت داشته باشد و مبدأ مجاز باشد، سرآیندهایAccess-Control-Allow-OriginوAccess-Control-Allow-Credentialsتنظیم خواهند شد.برای درخواستهای احرازهویتنشده، مقدار * را مشخص کنید. این کار باعث تنظیم سرآیند
Access-Control-Allow-Originمیشود، اما مقدارAccess-Control-Allow-Credentialsبرابر باfalseخواهد بود و تمامی دادههای اختصاصی کاربر محدود خواهند شد.- crossorigin
هنگام دسترسی به API با استفاده از درخواست AJAX فرادامنهای (CORS) و استفاده از ارائهدهندهٔ نشستی که در برابر حملات جعل درخواست بینسایتی (CSRF) ایمن است (مانند OAuth)، از این به جای
origin=*استفاده کنید تا درخواست احرازهویتشده انجام شود (یعنی از سامانه خارج نشود). این پارامتر باید در هر درخواست پیشپرواز (pre-flight) گنجانده شود، و بنابراین باید بخشی از URL درخواست باشد (نه بدنهٔ POST).توجه داشته باشید که بیشتر ارائهدهندگان نشست، از جمله نشستهای استاندارد مبتنی بر کوکی، از CORS احرازهویتشده پشتیبانی نمیکنند و نمیتوان از آنها با این پارامتر استفاده کرد.
- نوع: بولی (جزئیات)
- uselang
زبانی که برای ترجمهٔ پیامها استفاده میشود. action=query&meta=siteinfo&siprop=languages فهرستی از کدهای زبان را بازمیگرداند. میتوانید user را برای استفاده از ترجیح زبان کاربر کنونی یا content را برای استفاده از زبان محتوای این ویکی مشخص کنید.
- پیشفرض: user
- variant
گونهٔ زبان. تنها در صورتی کار میکند که زبان مبنا از تبدیل گونه پشتیبانی کند.
- errorformat
قالبی بهمنظور استفاده برای متن خروجی هشدار و خطا
- plaintext
- ویکیمتن با برچسبهای اچتیامال حذفشده و موجودیتهای جایگزینشده.
- wikitext
- ویکیمتن تجزیهنشده.
- html
- HTML
- raw
- کلید پیام و پارامترها.
- none
- بدون متن خروجی، فقط شناسههای خطا.
- bc
- قالب مورد استفاده تا پیش از مدیاویکی ۱.۲۹. از errorlang و errorsuselocal چشمپوشی میشود.
- یکی از مقدارهای زیر: bc، html، none، plaintext، raw، wikitext
- پیشفرض: bc
- errorlang
زبانی که برای هشدارها و خطاها استفاده میشود. action=query&meta=siteinfo&siprop=languages فهرستی از کدهای زبان را بازمیگرداند. content را برای استفاده از زبان محتوای این ویکی یا uselang را برای استفاده از همان مقدار پارامتر uselang مشخص کنید.
- پیشفرض: uselang
- errorsuselocal
در صورت وارد شدن، متن خطاها از پیامهای سفارشیسازیشدهٔ محلی از فضای نام مدياويکي استفاده خواهند کرد.
- نوع: بولی (جزئیات)
- centralauthtoken
When accessing the API using a cross-domain AJAX request (CORS), use this to authenticate as the current SUL user. Use action=centralauthtoken on this wiki to retrieve the token, before making the CORS request. Each token may only be used once, and expires after ۶۰ seconds. This should be included in any pre-flight request, and therefore should be included in the request URI (not the POST body).
On this wiki the expected value is a JSON Web Token, which may be validated by proxy servers in front of MediaWiki. If the token has expired or is otherwise invalid, you may receive a HTTP error from a proxy in a different format than a normal API error.
- راهنما برای پودمان اصلی.
- api.php?action=help [باز کردن در صفحهٔ تمرین]
- همهٔ راهنماها در یک صفحه.
- api.php?action=help&recursivesubmodules=1&toc [باز کردن در صفحهٔ تمرین]
اعتبار
API developers:
- Yuri Astrakhan (creator, lead developer Sep 2006–Sep 2007)
- Roan Kattouw (lead developer Sep 2007–2009)
- Victor Vasiliev
- Bryan Tong Minh
- Sam Reed
- Brad Jorsch (lead developer 2013–2020)
Please send your comments, suggestions and questions to mediawiki-api@lists.wikimedia.org or file a bug report at https://phabricator.wikimedia.org/.
