Napov?da k MediaWiki API

Toto je automaticky generovana dokumenta?ni stranka k MediaWiki API.

Dokumentace a p?iklady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

Hlavni modul

Stav: V?echny funkce uvedene na teto strance by m?ly fungovat, ale API se stale aktivn? vyviji a m??e se kdykoli zm?nit. Upozorn?ni na zm?ny ziskate p?ihla?enim se k e-mailove konferenci mediawiki-api-announce .

Chybne po?adavky: Pokud jsou do API zaslany chybne po?adavky, bude vracena HTTP hlavi?ka s kli?em ?MediaWiki-API-Error“ a hodnota teto hlavi?ky a chybovy kod budou nastaveny na stejnou hodnotu. Vice informaci najdete v dokumentaci .

Parametry:
action

Ktera akce se ma provest.

abusefiltercheckmatch
Check to see if an AbuseFilter matches a set of variables, an edit, or a logged AbuseFilter event.
abusefilterchecksyntax
Zkontroluje syntaxi filtru zneu?iti.
abusefilterevalexpression
Vyhodnoti vyraz filtra zneu?iti.
abusefilterunblockautopromote
Unblocks a user from receiving autopromotions due to an abusefilter consequence.
abuselogprivatedetails
Zobrazit tajne detaily zaznamu v protokolu zneu?iti
acquiretempusername
Acquire a temporary user username and stash it in the current session, if temp account creation is enabled and the current user is logged out. If a name has already been stashed, returns the same name.
antispoof
Check a username against AntiSpoof's normalisation checks.
block
Zablokovat u?ivatele.
centralauthtoken
Fetch a centralauthtoken for making an authenticated request to an attached wiki.
centralnoticecdncacheupdatebanner
Request the purge of banner content stored in the CDN (front-end) cache for anonymous users, for the requested banner and language
centralnoticechoicedata
Get data needed to choose a banner for a given project and language
centralnoticequerycampaign
Get all configuration settings for a campaign.
changeauthenticationdata
Change authentication data for the current user.
changecontentmodel
Change the content model of a page
checktoken
Check the validity of a token from action=query&meta=tokens .
cirrus-config-dump
Dump of CirrusSearch configuration.
cirrus-mapping-dump
Dump of CirrusSearch mapping for this wiki.
cirrus-profiles-dump
Dump of CirrusSearch profiles for this wiki.
cirrus-settings-dump
Dump of CirrusSearch settings for this wiki.
clearhasmsg
Clears the hasmsg flag for the current user.
clientlogin
Log in to the wiki using the interactive flow.
compare
Vrati rozdil dvou stranek.
createaccount
Vytvo?it novy u?ivatelsky u?et.
createlocalaccount
Forcibly create a local account. The central account must exist.
cxdelete
Smazat koncept p?eklad? vytvo?eny pomoci roz?i?eni P?eklad Obsahu.
cxsuggestionlist
Spravujte seznam navrh?. P?idejte navrhy do seznam? a odstra?te je.
cxtoken
Ziskejte JWT ?etony pro ov??ovani pomoci cxserveru.
delete
Smazat stranku.
deleteglobalaccount
Delete a global user.
discussiontoolsedit
Prida? spravu na diskusnu stranku.
discussiontoolsfindcomment
Find a comment by its ID or name.
discussiontoolsgetsubscriptions
Ziskat stavy odb?ru danych temat.
discussiontoolssubscribe
P?ihla?eni (nebo odhla?eni) p?ijmu oznameni o tematu.
echocreateevent
Manually trigger a notification to a user
echomarkread
Mark notifications as read for the current user.
echomarkseen
Mark notifications as seen for the current user.
echomute
Mute or unmute notifications from certain users or pages.
edit
Vytva?et a upravovat stranky.
editmassmessagelist
Edit a mass message delivery list.
emailuser
Poslat u?ivateli e-mail.
expandtemplates
Rozbali v?echny ?ablony ve wikitextu.
featuredfeed
Returns a featured content feed.
feedcontributions
Vrati kanal p?isp?vk? u?ivatele.
feedrecentchanges
Returns a recent changes feed.
feedwatchlist
Returns a watchlist feed.
filerevert
Revertovat soubor na star?i verzi.
globalblock
Globally block or unblock a user.
globalpreferenceoverrides
Change local overrides for global preferences for the current user.
globalpreferences
Change global preferences of the current user.
globaluserrights
Add/remove a user to/from global groups.
growthmanagementorlist
Spravovat informace ve strukturovanem seznamu mentor? (obvykle ulo?ene na strance MediaWiki:GrowthMentors.json ). Tento modul mohou pou?ivat jak sou?asni, tak budouci mento?i (aby se p?idali nebo zm?nili informace o sob?). Modul mohou pou?it take spravci, kte?i mohou zm?nit informace o v?ech u?ivatelich.
growthmentordashboardupdatedata
Naplanovat mimo?adnou aktualizaci modulu "Va?i nova?ci". Z vykonnostnich d?vod? m??ete naplanovat maximaln? jednu aktualizaci ka?de dv? hodiny.
growthsetmenteestatus
Nastavit stav nova?ka (dovoluje u?ivateli vypnout/zapnout modul mentorstvi, anebo se zcela z mentorskeho programu vyvazat, co? sma?e vztah mezi mentorem a mentorovanym).
growthsetmentor
Nastavit mentora u?ivatele. Zm?na bude ve?ejn? zaznamenana.
growthstarmentee
Nastavit nova?ka jako ozna?eneho hv?zdi?kou (ulo?eno soukrom? a nelogovano)
help
Zobrazuje napov?du k uvedenym modul?m.
homepagequestionstore
Obtain formatted questions posted via homepage modules
imagerotate
Tento modul byl deaktivovan.
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
Log out and clear session data.
managetags
Perform management tasks relating to change tags.
massmessage
Send a message to a list of pages.
mergehistory
Merge page histories.
move
P?esunout stranku.
opensearch
Vyhledavani na wiki pomoci protokolu OpenSearch.
options
Change preferences of the current user.
paraminfo
Obtain information about API modules.
parse
Parses content and returns parser output.
patrol
Patrol a page or revision.
protect
Zm?nit urove? zam?eni stranky.
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
Nastavit stav globalniho u?tu
setnotificationtimestamp
Update the notification timestamp for watched pages.
setpagelanguage
Change the language of a page.
shortenurl
Zkratit dlouhe URL na krat?i.
sitematrix
Get Wikimedia sites list.
spamblacklist
Validate one or more URLs against the spam block list.
streamconfigs
Exposes event stream config. Returns only format=json with formatversion=2.
strikevote
Allows admins to strike or unstrike a vote.
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
Fetch data stored by the TemplateData extension.
thank
Send a thank-you notification to an editor.
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
Users with the 'transcode-reset' right can reset and re-run a transcode job.
unblock
Unblock a user.
undelete
Undelete revisions of a deleted page.
unlinkaccount
Remove a linked third-party account from the current user.
upload
Upload a file, or get the status of pending uploads.
userrights
Change a user's group membership.
validatepassword
Validate a password against the wiki's password policies.
watch
Add or remove pages from the current user's watchlist.
webapp-manifest
Returns a webapp manifest.
webauthn
API Module to communicate between server and client during registration/authentication process.
bouncehandler
Internal. Receive a bounce email and process it to handle the failing recipient.
categorytree
Internal. Internal module for the CategoryTree extension.
cirrus-check-sanity
Internal. Reports on the correctness of a range of page ids in the search index
collection
Internal. API module for performing various operations on a wiki user's collection.
cspreport
Internal. 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
Internal. Check if any fast, unreviewed translation has been published recently for the current user.
cxpublish
Internal. Ulo?i? ?lanok vytvoreny pomocou roz?irenia Content Translation.
cxpublishsection
Internal. Save a section created using the Content Translation extension's section translation feature.
cxsave
Internal. Tento modul vam umo??uje ukladat navrhy p?ekladu podle jednotlivych ?asti, abyste u?et?ili ?i?ku pasma a vytvo?ili paralelni korpus.
cxsplit
Internal. Create and save a section translation to database, for every translated section of the given article translation
discussiontoolscompare
Internal. Ziskat informace o zm?nach komenta?? mezi dv?ma revizemi stranky.
discussiontoolspageinfo
Internal. Vraci metadata pot?ebna k inicializaci Diskusnich nastroj?.
discussiontoolspreview
Internal. Nahled zpravy na strance diskuse.
echopushsubscriptions
Internal. Manage push subscriptions for the current user.
editcheckreferenceurl
Internal. Check the status of a URL for use as a reference.
fancycaptchareload
Internal. Get a new FancyCaptcha.
growthinvalidateimagerecommendation
Internal. Zneplatnit navrh obrazku.
growthinvalidatepersonalizedpraisesuggestion
Internal. Zneplatni navrh nova?ka k ocen?ni v modulu Za?lete ocen?ni svym nova?k?m na Nast?nce mentora
helppanelquestionposter
Internal. Handle questions posted via the help panel for the current user.
jsondata
Internal. Retrieve localized JSON data.
oathvalidate
Internal. Validate a two-factor authentication (OATH) token.
parser-migration
Internal. Analyzuje stranku pomoci dvou odli?nych konfiguraci Tidy.
readinglists
Internal. Reading list write operations.
sanitize-mapdata
Internal. Performs data validation for Kartographer extension
scribunto-console
Internal. Internal module for servicing XHR requests from the Scribunto console.
securepollauth
Internal. Allows a remote wiki to authenticate users before granting access to vote in the election.
stashedit
Internal. Prepare an edit in shared cache.
sxsave
Internal. Save the draft section translation and store the parallel corpora
timedtext
Internal. Provides timed text content for usage by <track> elements
ulslocalization
Internal. Get the localization of ULS in the given language.
ulssetlang
Internal. Update user's preferred interface language.
visualeditor
Internal. Returns HTML5 for a page from the Parsoid service.
visualeditoredit
Internal. Save an HTML5 page to MediaWiki (converted to wikitext via the Parsoid service).
wikimediaeventsblockededit
Internal. Log information about blocked edit attempts
Jedna z nasledujicich hodnot: abusefiltercheckmatch , abusefilterchecksyntax , abusefilterevalexpression , abusefilterunblockautopromote , abuselogprivatedetails , acquiretempusername , antispoof , block , centralauthtoken , centralnoticecdncacheupdatebanner , centralnoticechoicedata , centralnoticequerycampaign , changeauthenticationdata , changecontentmodel , checktoken , cirrus-config-dump , cirrus-mapping-dump , cirrus-profiles-dump , cirrus-settings-dump , clearhasmsg , clientlogin , compare , createaccount , createlocalaccount , cxdelete , cxsuggestionlist , cxtoken , delete , deleteglobalaccount , discussiontoolsedit , discussiontoolsfindcomment , discussiontoolsgetsubscriptions , discussiontoolssubscribe , 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 , cirrus-check-sanity , collection , cspreport , cxcheckunreviewed , cxpublish , cxpublishsection , cxsave , cxsplit , discussiontoolscompare , discussiontoolspageinfo , discussiontoolspreview , echopushsubscriptions , editcheckreferenceurl , fancycaptchareload , growthinvalidateimagerecommendation , growthinvalidatepersonalizedpraisesuggestion , helppanelquestionposter , jsondata , oathvalidate , parser-migration , readinglists , sanitize-mapdata , scribunto-console , securepollauth , stashedit , sxsave , timedtext , ulslocalization , ulssetlang , visualeditor , visualeditoredit , wikimediaeventsblockededit
Default: help
format

Format vystupu.

json
Vypisuje data ve formatu JSON.
jsonfm
Vypisuje data ve formatu JSON (v ?itelne HTML podob?).
none
Nevypisuje nic.
php
Vypisuje data v serializa?nim formatu PHP.
phpfm
Vypisuje data v serializa?nim formatu PHP (v ?itelne HTML podob?).
rawfm
Data v?etn? ladicich prvk? vypisuje ve formatu JSON (v ?itelne HTML podob?).
xml
Vypisuje data ve formatu XML.
xmlfm
Vypisuje data ve formatu XML (v ?itelne HTML podob?).
Jedna z nasledujicich hodnot: json , jsonfm , none , php , phpfm , rawfm , xml , xmlfm
Default: jsonfm
maxlag

Maximalni zpo?d?ni lze pou?it, kdy? je MediaWiki nainstalovano na cluster s replikovanou databazi. Abyste se vyhnuli zhor?ovani u? tak ?patneho replika?niho zpo?d?ni, m??ete timto parametrem nechat klienta ?ekat, dokud replika?ni zpo?d?ni neklesne pod uvedenou hodnotu. V p?ipad? p?ili? vysokeho zpo?d?ni se vrati chybovy kod ? maxlag “ s hla?enim typu ? Waiting for $host: $lag seconds lagged “.
Vice informaci najdete v p?iru?ce .

Type: integer
smaxage

Nastavi HTTP hlavi?ku pro ?izeni ke?ovani s-maxage na uvedeny po?et sekund. Chyby se neke?uji nikdy.

Type: integer
The value must be no less than 0.
Default: 0
maxage

Nastavi HTTP hlavi?ku pro ?izeni ke?ovani max-age na uvedeny po?et sekund. Chyby se neke?uji nikdy.

Type: integer
The value must be no less than 0.
Default: 0
assert

Pokud je nastaveno na ? user “, ov??i, ?e je u?ivatel p?ihla?en, pokud je nastaveno na ? bot “, ov??i, ?e ma opravn?ni ?bot“.

Jedna z nasledujicich hodnot: anon, bot, user
assertuser

Ov??it, ?e sou?asnym u?ivatelem je uvedeny u?ivatel.

Typ: u?ivatel, uvedeny jako cokoli z: pou?ivate?ske meno a Do?asny u?ivatel
requestid

Libovolna zde uvedena hodnota bude zahrnuta v odpov?di. Lze pou?it pro rozli?eni po?adavk?.

servedby

Zahrnout do odpov?di nazev hostitele, ktery po?adavek obslou?il.

Type: boolean ( details )
curtimestamp

Zahrnout do odpov?di aktualni ?asove razitko.

Type: boolean ( details )
responselanginfo

Include the languages used for uselang and errorlang in the result.

Type: boolean ( details )
origin

Pokud k API p?istupujete pomoci mezidomenoveho AJAXoveho po?adavku (CORS), nastavte tento parametr na domenu p?vodu. Musi byt sou?asti v?ech p?edb??nych po?adavk?, tak?e musi byt sou?asti URI po?adavku (nikoli t?la POSTu).

U autentizovanych po?adavk? hodnota musi p?esn? odpovidat jednomu z p?vod? v hlavi?ce Origin , tak?e musi byt nastavena na n?co jako https://en.wikipedia.org nebo https://meta.wikimedia.org . Pokud parametr neodpovida hlavi?ce Origin , bude vracena odpov?? 403. Pokud parametr odpovida hlavi?ce Origin a tento p?vod je na bile listin?, budou nastaveny hlavi?ky Access-Control-Allow-Origin a Access-Control-Allow-Credentials .

U neautentizovanych po?adavk? uve?te hodnotu * . To zp?sobi nastaveni hlavi?ky Access-Control-Allow-Origin , ale hlavi?ka Access-Control-Allow-Credentials bude false a budou omezena v?echna data specificka pro u?ivatele.

uselang

Jazyk, ktery se ma pou?it pro p?eklad hla?eni. Pomoci action=query&meta=siteinfo se siprop=languages ziskate seznam jazykovych kod? nebo zadejte ? user “ pro pou?iti p?edvoleneho jazyka aktualniho u?ivatele ?i ? content “ pro pou?iti jazyka obsahu teto wiki.

Default: user
variant

Variant of the language. Only works if the base language supports variant conversion.

errorformat

Format to use for warning and error text output

plaintext
Wikitext with HTML tags removed and entities replaced.
wikitext
Unparsed wikitext.
html
HTML
raw
Message key and parameters.
none
No text output, only the error codes.
bc
Format used prior to MediaWiki 1.29. errorlang and errorsuselocal are ignored.
Jedna z nasledujicich hodnot: bc, html, none, plaintext, raw, wikitext
Default: bc
errorlang

Language to use for warnings and errors. action=query&meta=siteinfo&siprop=languages returns a list of language codes. Specify content to use this wiki's content language or uselang to use the same value as the uselang parameter.

Default: uselang
errorsuselocal

If given, error texts will use locally-customized messages from the MediaWiki namespace.

Type: boolean ( details )
centralauthtoken

Tento token pou?ivejte p?i p?istupu k API pomoci mezidomenoveho AJAX po?adavku (CORS) pro autentizaci jako aktualni u?ivatel SUL. P?ed provedenim CORS requestu ziskejte na teto wiki token pomoci action=centralauthtoken . Ka?dy token lze pou?it pouze jednou a expiruje po 10 sekundach. M?l by se pou?it v p?ipadnem p?edb??nem po?adavku, tak?e by se m?l objevit v URI po?adavku (nikoli t?lu POST).

Opravn?ni:
writeapi
Pou?itie API na zapis
Ud?leno skupinam: all, user a bot
apihighlimits
Pou?ivani vy??ich limit? v API dotazech (pomale dotazy: 500, rychle dotazy: 5000). Limity pro pomale dotazy se vztahuji i na vicehodnotove parametry.
Ud?leno skupinam: bot a sysop

Datove typy

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 - 15 T 14 : 56 : 00 Z . Additionally, the string now may be used to specify the current timestamp.

?ablonovane parametry

?ablonovane parametry umo??uji situace, kdy modul API pot?ebuje hodnotu pro ka?dou hodnotu n?jakeho jineho parametru. Pokud by nap?iklad existoval modul API pro ziskani ovoce, mohl by mit parametr ovoce , kterym se ur?i po?adovane druhy ovoce, a ?ablonovany parametr {ovoce}-po?et , kterym se ur?i po?adovane po?ty jednotlivych druh?. Klient API, ktery by cht?l 1 jablko, 5 banan? a 20 jahod, by mohl vytvo?it po?adavek ovoce=jablka|banany|jahody&jablka-po?et=1&banany-po?et=5&jahody-po?et=20 .

Zasluhy

Vyvoja?i API:

  • Jurij Astrachan (tv?rce, hlavni vyvoja? za?i 2006 ? za?i 2007)
  • Roan Kattouw (hlavni vyvoja? za?i 2007?2009)
  • Viktor Vasiljev
  • Bryan Tong Minh
  • Sam Reed
  • Brad Jorsch (hlavni vyvoja? 2013?2020)

Sve komenta?e, navrhy ?i dotazy posilejte na mediawiki-api@lists.wikimedia.org nebo zalo?te chybove hla?eni na https://phabricator.wikimedia.org/ .