Pomoć oko Medijavikijevog API-ja
Ovo je automatski generisana dokumentacija za Medijaviki API
Dokumentacija i primeri: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
Glavni modul
- Izvor: MediaWiki
- Licenca: GPL-2.0-or-later
Status: The MediaWiki API is a mature and stable interface that is actively supported and improved. While we try to avoid it, we may occasionally need to make breaking changes; subscribe to the mediawiki-api-announce mailing list for notice of updates.
Erroneous requests: When erroneous requests are sent to the API, an HTTP header will be sent with the key "MediaWiki-API-Error" and then both the value of the header and the error code sent back will be set to the same value. For more information see API: Errors and warnings.
Testing: For ease of testing API requests, see Special:ApiSandbox.
- action
Koju akciju izvesti.
- abusefiltercheckmatch
- Provjerite nalazi li filter zloupotreba određeni skup varijabli, uređivanje ili zapisan događaj u filteru.
- abusefilterchecksyntax
- Provjeri sintaksu danog filtera zloupotreba.
- abusefilterevalexpression
- Ocjenjuje izraz u Filteru zloupotreba.
- abusefilterunblockautopromote
- Uklanja blok na autounapređivanje određenog korisnika, dobiven zbog posljedice filtera zloupotreba.
- abuselogprivatedetails
- Pregled osobnih podataka za unos u Evidenciji zloupotreba.
- 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
- Provjerite ga korisničko ime uz provjeru normalizacije AntiSpoof.
- block
- Blokiraj korisnika.
- centralauthtoken
- Fetch a centralauthtoken for making an authenticated request to an attached wiki.
- centralnoticecdncacheupdatebanner
- Zahtjev za čištenje sadržaja pohranjenog u CDN (front-end) predmemoriji za anonimne korisnike, za traženu obavijest i jezik
- 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
- Promenjen sadržinski model stranice
- checktoken
- Check the validity of a token from action=query&meta=tokens.
- clearhasmsg
- Clears the
hasmsgflag for the current user. - clientlogin
- Log in to the wiki using the interactive flow.
- communityconfigurationedit
- Change the content of a configuration provider in Community configuration
- compare
- Get the difference between two pages.
- createaccount
- Napravi novi korisnički račun.
- createlocalaccount
- Forcibly create a local account. The central account must exist.
- cxdelete
- Delete a draft translation created using the Content Translation extension.
- cxtoken
- Get JWT tokens to authenticate with cxserver.
- delete
- Obriši stranicu.
- deleteglobalaccount
- Brisanje globalnog korisnika.
- discussiontoolsedit
- Objavljivanje poruke na stranici za diskusiju.
- discussiontoolsfindcomment
- Find a comment by its ID or name.
- discussiontoolsgetsubscriptions
- Get the subscription statuses of given topics.
- discussiontoolssubscribe
- Subscribe (or unsubscribe) to receive notifications about a topic.
- discussiontoolsthank
- Send a public thank-you notification for a comment.
- echocreateevent
- Manually trigger a notification to a user
- echomarkread
- Označi sva obavještenja kao pročitana za trenutni korisnik.
- echomarkseen
- Označi obavještenja kao pročitana za trenutni korisnik.
- echomute
- Mute or unmute notifications from certain users or pages.
- edit
- Pravi i uređuj stranice.
- editmassmessagelist
- Edit a mass message delivery list.
- emailuser
- Pošalji e-poruku korisniku.
- expandtemplates
- Expands all templates within wikitext.
- featuredfeed
- Daje kanal s istaknutim sadržajem.
- feedcontributions
- Returns a user's contributions feed.
- feedrecentchanges
- Returns a recent changes feed.
- feedwatchlist
- Returns a watchlist feed.
- filerevert
- Vraćanje datoteke na staru verziju.
- globalblock
- Globalno blokirajte ili odblokirajte korisnika.
- globalpreferenceoverrides
- Change local overrides for global preferences for the current user.
- globalpreferences
- Promena globalnih podešavanja trenutnog korisnika.
- globaluserrights
- Dodaj/ukloni korisnika u/iz globalne grupe.
- 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
- Dodjeljivanje mentora za korisnika. Izmjena će biti javna.
- growthstarmentee
- Označi ili odznači mentija zvjezdicom od strane trenutnog korisnika (pohranjuje se privatno i ne protokolira se)
- help
- Display help for the specified modules.
- homepagequestionstore
- Pribavljanje formatiranih pitanja postavljenih putem modulâ za početnu stranicu
- imagerotate
- Modul je deaktiviran.
- import
- Import a page from another wiki, or from an XML file.
- jsonconfig
- Omogućuje izravan pristup podsustavu JsonConfig.
- languagesearch
- Pretražite jezike na bilo kojem pismu.
- 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
- Premeštanje stranice.
- opensearch
- Search the wiki using the OpenSearch protocol.
- 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
- Promenjen nivo zaštite stranice.
- 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
- Postavi status globalnog korisnika.
- setnotificationtimestamp
- Update the notification timestamp for watched pages.
- setpagelanguage
- Change the language of a page.
- shortenurl
- Skraćivanje dugačke URL-e u kraćem obliku.
- sitematrix
- Daje listu Wikimedijinih wikija.
- spamblacklist
- Validate one or more URLs against the spam block list.
- streamconfigs
- Izlaže konfiguraciju toka događaja. Vraća samo format=json s formatversion=2.
- strikevote
- Administratorima omogućuje precrtavanje ili obnavljanje glasanja.
- 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
- Pribavljanje podataka koje je TemplateData proširenje sačuvalo.
- thank
- Pošalji obavijest o zahvali uređivaču.
- 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
- Deblokiranje korisnika.
- 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
- Vraća manifest veb-aplikacije.
- webauthn
- API Module to communicate between server and client during registration/authentication process.
- bouncehandler
- Internal. Pošalji povratne informacije putem e-pošte da bi obrada mogla raditi s neuspješnim upisom.
- categorytree
- Internal. Interni modul proširenja "Stablo kategorija".
- chartinfo
- Internal. 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
- Internal. Reports on the correctness of a range of page ids in the search index
- cirrus-config-dump
- Internal. Rezervno skladište postavki CirrusSearcha.
- cirrus-profiles-dump
- Internal. Rezervno skladište profila CirrusSearcha za ovaj wiki.
- cirrus-schema-dump
- Internal. Dump of CirrusSearch schema (settings and mappings) for this wiki.
- codemirror-validate
- Internal. Check for validation errors in the given content
- collection
- Internal. API modul za izvođenje raznih radnji nad zbirkom wiki korisnika.
- 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.
- cxfavoritesuggestions
- Internal. Add or remove a favorite suggestion to the current user's list.
- cxpublish
- Internal. Sačuvajte stranicu napravljenu pomoću proširenja za prevod sadržaja.
- cxpublishsection
- Internal. Save a section created using the Content Translation extension's section translation feature.
- cxsave
- Internal. This module allows to save draft translations by section to save bandwidth and to collect parallel corpora.
- cxsplit
- Internal. Create and save a section translation to database, for every translated section of the given article translation
- discussiontoolscompare
- Internal. Nabavi informacije o promjenama komentara između dvije izmjene stranice.
- discussiontoolspageinfo
- Internal. Prikazuje metapodatke potrebne za pokretanje alata za razgovor.
- discussiontoolspreview
- Internal. Preview a message on a discussion page.
- echopushsubscriptions
- Internal. Manage push subscriptions for the current user.
- editcheckreferenceurl
- Internal. Check the status of a URL for use as a reference.
- fancycaptchareload
- Internal. Daj novu FancyCaptcha.
- growthinvalidateimagerecommendation
- Internal. Poništi zadatak preporuke slike
- growthinvalidatepersonalizedpraisesuggestion
- Internal. Invalidates a suggestion of a praiseworthy mentee in the Personalized praise module on the Mentor dashboard
- growthinvalidaterevisetonerecommendation
- Internal. Drop a 'Revise Tone' recommendation for a given page.
- helppanelquestionposter
- Internal. Rukovanje pitanjima koja su postavljena pomoću za trenutnog korisnika.
- jsondata
- Internal. Retrieve localized JSON data.
- jsontransform
- Internal. Retrieve JSON data transformed by a Lua function.
- parser-migration
- Internal. Raščlani stranice sa različitim urednim postavljenostima.
- readinglists
- Internal. Reading list write operations.
- sanitize-mapdata
- Internal. Izvršava proveru valjanosti podataka za dodatak „Kartograf”
- 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. Sačuvajte nacrt prijevoda odjeljka i pohranite paralelne korpuse
- 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. Vraća HTML5 za stranicu sa servisa Parsoid.
- visualeditoredit
- Internal. Snimite HTML5-stranicu u MediaWiki (pretvara se u wikitekst preko servisa Parsoid).
- wikimediaeventsblockededit
- Internal. Log information about blocked edit attempts
- wikimediaeventshcaptchaeditattempt
- Internal. Log edit diff when hCaptcha challenge is shown but edit is incomplete
- One of the following values: 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
- Default: help
- format
Format izlaza.
- json
- Output data in JSON format.
- jsonfm
- Output data in JSON format (pretty-print in HTML).
- none
- Output nothing.
- php
- Output data in serialized PHP format.
- phpfm
- Output data in serialized PHP format (pretty-print in HTML).
- rawfm
- Output data, including debugging elements, in JSON format (pretty-print in HTML).
- xml
- Output data in XML format.
- xmlfm
- Output data in XML format (pretty-print in HTML).
- One of the following values: json, jsonfm, none, php, phpfm, rawfm, xml, xmlfm
- Default: jsonfm
- maxlag
Maksimalno kašnjenje može se koristiti kada je Medijaviki instaliran na replikovani klaster baze podataka. Da bi se sačuvalo od radnja koje će izazvati još kašnjenja usled replikacije sajta, ovaj parametar može da učini da klijent čeka dok kašnjenje zbog replikacije ne bude manje od određene vrednosti. U slučaju prekomernih kašnjenja, kod greške maxlag biva vraćen sa porukom kao što je Waiting for $host: $lag seconds lagged.
Pogledajte Priručnik: parametar Maxlag za više informacija.- Type: integer
- smaxage
Set the
s-maxageHTTP cache control header to this many seconds. Errors are never cached.- Type: integer
- The value must be no less than 0.
- Default: 0
- maxage
Set the
max-ageHTTP cache control header to this many seconds. Errors are never cached.- Type: integer
- The value must be no less than 0.
- Default: 0
- assert
Verify that the user is logged in (including possibly as a temporary user) if set to user, not logged in if set to anon, or has the bot user right if bot.
- One of the following values: anon, bot, user
- assertuser
Verify the current user is the named user.
- Tip: korisnik, po: korisničko ime i Privremeni korisnik
- requestid
Any value given here will be included in the response. May be used to distinguish requests.
- servedby
Include the hostname that served the request in the results.
- Type: boolean (details)
- curtimestamp
Include the current timestamp in the result.
- Type: boolean (details)
- responselanginfo
Include the languages used for uselang and errorlang in the result.
- Type: boolean (details)
- origin
When accessing the API using a cross-domain AJAX request (CORS), set this to the originating domain. This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body).
For authenticated requests, this must match one of the origins in the
Originheader exactly, so it has to be set to something like https://en.wikipedia.org or https://meta.wikimedia.org. If this parameter does not match theOriginheader, a 403 response will be returned. If this parameter matches theOriginheader and the origin is allowed, theAccess-Control-Allow-OriginandAccess-Control-Allow-Credentialsheaders will be set.For non-authenticated requests, specify the value *. This will cause the
Access-Control-Allow-Originheader to be set, butAccess-Control-Allow-Credentialswill befalseand all user-specific data will be restricted.- crossorigin
When accessing the API using a cross-domain AJAX request (CORS) and using a session provider that is safe against cross-site request forgery (CSRF) attacks (such as OAuth), use this instead of
origin=*to make the request authenticated (i.e., not logged out). This must be included in any pre-flight request, and therefore must be part of the request URI (not the POST body).Note that most session providers, including standard cookie-based sessions, do not support authenticated CORS and cannot be used with this parameter.
- Type: boolean (details)
- uselang
Language to use for message translations. action=query&meta=siteinfo&siprop=languages returns a list of language codes. You can specify user to use the current user's language preference or content to use this wiki's content language.
- 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
- Ključ poruke i parametri
- none
- No text output, only the error codes.
- bc
- Format used prior to MediaWiki 1.29. errorlang and errorsuselocal are ignored.
- One of the following values: 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
Kada pristupate privitku pomoću AJAX zahtjeva između domena (CORS), koristite ovo za legitimaciju kao trenutni korisnik s jedinstvenom prijavom. Koristite action=centralauthtoken na ovom wikiju da dohvatite token prije postavljanja zahtjeva. Svaki token može se koristiti samo jednom, a istječe nakon 10 sekundi. Ovo bi trebalo biti uključeno u bilo koji predzahtjev, i stoga bi trebalo biti uključeno u URI zahtjeva (ne u POST tijelo).
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.
- Pomoć za glavni modul.
- api.php?action=help [open in sandbox]
- Sva pomoć u jednoj stranici.
- api.php?action=help&recursivesubmodules=1 [open in sandbox]
Tipovi podataka
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. Additionally, the string now may be used to specify the current timestamp.
Parametri šablona
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.
Zasluge
Творци API-ја:
- Yuri Astrakhan (творац, главни програмер септ. 2006 – септ. 2007)
- Roan Kattouw (главни програмер септ. 2007 – 2009)
- Victor Vasiliev
- Bryan Tong Minh
- Sam Reed
- Brad Jorsch (главни програмер 2013–2020)
Ваше коментаре, сугестије и питања шаљите на mediawiki-api@lists.wikimedia.org или пријавите баг на https://phabricator.wikimedia.org/.
