MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

Modulo principale

Stato: Tuttuquante 'e funziune 'e sta paggena avesser'a funziunà, ma ll'API è ancora a se sviluppà, picciò chesto putesse cagnà a nu certo mumento. Iscriviteve ccà ncoppa: the mediawiki-api-announce 'a lista 'e mmasciate pe' n'avé cocche notifica 'e ll'agghiurnamente.

Richieste sbagliate: Si se mannasse na richiesta sbagliata a ll'API, nu cap' 'e HTTP sarrà mannata c' 'a chiave 'e mmasciata "MediaWiki-API-Error" e po' tuttuquante 'e valure d' 'a cap' 'e mmasciata e codece 'errore se mannassero arreto e se mpustassero a 'o stesso valore. Pe n'avé cchiù nfurmaziune vedite API: Errure e Avvise.

Test: Pe' ve ffà cchiù semprice 'e test 'e richieste API, vedite Special:ApiSandbox.

Parametri specifici:
action

Quale aziona d'avess'a fà.

abusefiltercheckmatch
Controlla se un filtro anti abusi viene attivato da un insieme di variabili, una modifica o un evento nel registro abusi.
abusefilterchecksyntax
Verifica la sintassi di un filtro anti abusi.
abusefilterevalexpression
Valuta un'espressione del filtro anti abusi.
abusefilterunblockautopromote
Sblocca la possibilità di autopromozione a seguito di un blocco imposto dal filtro anti abusi.
abuselogprivatedetails
Visualizza i dettagli privati di una voce del registro anti abusi.
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
Controlla un nome utente con le verifiche di normalizzazione AntiSpoof.
block
Fremma n'utente.
centralauthtoken
Recupera un centralauthtoken per l'esecuzione di una richiesta autenticata a un wiki collegato.
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
Modificare i dati di autenticazione per l'utente corrente.
changecontentmodel
Modifica il modello di contenuto di una pagina
checktoken
Cuntrolla 'a validità 'e nu token 'a action=query&meta=tokens.
cirrus-config-dump
Dump of CirrusSearch configuration.
cirrus-mapping-dump
Dump of CirrusSearch mapping for this wiki.
cirrus-profiles-dump
Copia dei profili di CirrusSearch per questo wiki.
cirrus-settings-dump
Dump of CirrusSearch settings for this wiki.
clearhasmsg
Scancella 'o flag hasmsg pe ll'utente currente.
clientlogin
Accedi al wiki utilizzando il flusso interattivo.
compare
Piglia 'e differenze nfra 2 paggene.
createaccount
Crèa cunto nnòvo.
createlocalaccount
Forza la creazione di un'utenza locale. L'utenza centrale deve esistere.
cxdelete
Delete a draft translation created using the Content Translation extension.
cxsuggestionlist
Gestisce gli elenchi dei suggerimenti. Aggiunge e rimuove suggerimenti dalle liste.
cxtoken
Ottieni token JWT per l'autenticazione con cxserver.
delete
Scancella 'na paggena.
deleteglobalaccount
Delete a global user.
discussiontoolsedit
Pubblica un messaggio su una pagina di discussione.
discussiontoolsfindcomment
Trova un commento tramite il suo ID o nome.
discussiontoolsgetsubscriptions
Get the subscription statuses of given topics.
discussiontoolssubscribe
Subscribe (or unsubscribe) to receive notifications about a topic.
echomarkread
Contrassegna tutte le notifiche come lette per l'utente attuale.
echomarkseen
Contrassegna le notifiche come viste per l'utente attuale.
echomute
Mute or unmute notifications from certain users or pages.
edit
Crèa e cagna paggene.
editmassmessagelist
Modifica elenco di consegna per messaggi massivi.
emailuser
E-mail a n'utente.
expandtemplates
Spannere tuttuquante 'e template dint' 'o wikitesto.
featuredfeed
Returns a featured content feed.
feedcontributions
Tuorna nu feed 'e cuntribbute 'utente.
feedrecentchanges
Tuorna 'o blocco 'e nutizie 'e ll'urdeme cagnamiente.
feedwatchlist
Returns a watchlist feed.
filerevert
Ripristina un file ad una versione precedente.
globalblock
Blocca o sblocca globalmente un utente.
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
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
Imposta tutor dell'utente. Le modifiche verranno registrate pubblicamente.
growthstarmentee
Aggiungi o rimuovi un allievo dai preferiti dell'utenza attuale (salvati privatamente e non pubblicamente registrati)
help
Fà veré l'aiuto p' 'e module specificate
homepagequestionstore
Ricevi domande formattate inviate tramite il modulo della pagina iniziale
imagerotate
Stu modulo è stato stutato.
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
Collegamento di un'utenza di un provider di terze parti all'utente corrente.
login
Accedi e ottieni i cookie di autenticazione.
logout
Esci e cancella i dati della sessione.
managetags
Perform management tasks relating to change tags.
massmessage
Send a message to a list of pages.
mergehistory
Unisce cronologie pagine.
move
Mòve paggena.
opensearch
Search the wiki using the OpenSearch protocol.
options
Change preferences of the current user.
paraminfo
Ottieni informazioni sui moduli API.
parse
Parses content and returns parser output.
patrol
Verifica una pagina o versione.
protect
Modifica il livello di protezione di una pagina.
purge
Pulisce la cache per i titoli indicati.
query
Fetch data from and about MediaWiki.
removeauthenticationdata
Rimuove i dati di autenticazione per l'utente corrente.
resetpassword
Invia una mail per reimpostare la password di un utente.
revisiondelete
Cancella e ripristina le versioni.
rollback
Undo the last edit to the page.
rsd
Export an RSD (Really Simple Discovery) schema.
setglobalaccountstatus
Hide or lock (or unhide or unlock) a global user account.
setnotificationtimestamp
Update the notification timestamp for watched pages.
setpagelanguage
Cambia la lingua di una pagina.
shortenurl
Abbrevia un URL lungo in uno più corto.
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
Sblocca un utente
undelete
Ripristina versioni di una pagina cancellata.
unlinkaccount
Rimuove un'utenza di terze parti collegata all'utente corrente.
upload
Upload a file, or get the status of pending uploads.
userrights
Change a user's group membership.
validatepassword
Convalida una password seguendo le politiche del wiki sulle password.
watch
Aggiunge o rimuove pagine dagli osservati speciali dell'utente attuale.
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. Modulo nterno pe' ne ffà n'estensione CategoryTree
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. Controlla se di recente è stata pubblicata qualche traduzione veloce e non revisionata per l'utente attuale.
cxpublish
Internal. Save a page created using the Content Translation extension.
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. Get information about comment changes between two page revisions.
discussiontoolspageinfo
Internal. Returns metadata required to initialize the discussion tools.
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. Pigliateve nu FancyCaptcha nuovo.
growthinvalidateimagerecommendation
Internal. Invalidate an image recommendation.
growthinvalidatepersonalizedpraisesuggestion
Internal. Invalidates a suggestion of a praiseworthy mentee in the Personalized praise module on the Mentor dashboard
helppanelquestionposter
Internal. Gestisci domande inviate tramite il pannello introduttivo dall'attuale utente.
jsondata
Internal. Retrieve localized JSON data.
oathvalidate
Internal. Validate a two-factor authentication (OATH) token.
parser-migration
Internal. Analizza una pagina con due diverse configurazioni di parser.
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
Uno dei seguenti valori: 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, 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

Qualu furmato avess'ascì d'output.

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).
Uno dei seguenti valori: json, jsonfm, none, php, phpfm, rawfm, xml, xmlfm
Default: jsonfm
maxlag

'O massimo lag ca se putess'ausà quanno MediaWiki s'installasse ncopp'a nu cluster replicato 'e database. Pe' puté sarvà aziune ca causassero cchiù lag 'e replicato, stu parammetro putesse fà 'o cliente aspettà nfin'a quanno 'o tiempo 'e replicaziona fosse meno ca nu valore specificato. Si nce stesse cchiù assaje tiempo 'e lag, nu codece 'errore maxlag se turnasse comm'a na mmasciata tipo Aspettanno 'o $host: nu $lag secunde 'e lag.
Vedite Manuale: Parammetro Maxlag pe' n'avé cchiù nfurmaziune.

Type: integer
smaxage

Mpustate 'a cap' 'e cuntrollo 'e cache HTTP s-maxage a sta quantità 'e secondi. Ll'errure nun s'acchiappassero maje.

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

Mpustate 'a cap' 'e cuntrollo 'e cache HTTP max-age a sta quantità 'e secondi. Ll'errure nun s'acchiappassero maje.

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

Cuntrullate si l'utente è trasuto si sta mpustato comm' user, o pure ca téne o deritto 'e bot si bot.

Uno dei seguenti valori: anon, bot, user
assertuser

Verifica che l'utente corrente è l'utente nominato.

Tipo: utente, da uno qualsiasi nome utente e Utente temporaneo
requestid

Qualunque valore dato ccà se mpizzasse dint'a risposta. Se putess'ausà pe' puté distinguere richieste.

servedby

Include 'o risultato 'e nomme d' 'o host ca servette 'a richiesta.

Tipo: booleano (dettagli)
curtimestamp

Azzecca dint' 'o risultato 'o timestamp 'e mo.

Tipo: booleano (dettagli)
responselanginfo

Includi la lingua utilizzata per uselang e errorlang nel risultato.

Tipo: booleano (dettagli)
origin

Quanno se trasesse a ll'API ausanno richieste 'e cross-dominio AJAX (CORS), mpustate chesto a 'o dominio origgenale. Chesto s'avess'azzeccà dint'a qualonca richiesta 'e pre-volo, e picciò avess'a ffà parte d' 'a richiesta d'URI (nun fosse 'o cuorpo POST). Chesto s'avess'azzeccà a uno 'e ll'origgene dint' 'o cap'ê paggena Origin pricisamente, picciò s'avessa mpustà coccosa tipo https://en.wikipedia.org o https://meta.wikimedia.org. Si stu parammetro nun s'azzeccasse cu 'o cap'ê paggena Origin, allora na risposta 403 se turnasse. Si stu parammetro s'azzeccasse c' 'o cap'ê paggena Origin e ll'origgene fosse dint' 'a lista janca, allora nu cap'ê paggena Access-Control-Allow-Origin fosse mpustato.

uselang

Lingua da utilizzare per la traduzione dei messaggi. action=query&meta=siteinfo&siprop=languages restituisce un elenco di codici lingua. Puoi specificare user per utilizzare la lingua preferita dell'utente corrente, oppure content per utilizzare la lingua dei contenuti di questo wiki.

Default: user
variant

Variante della lingua. Funziona solo se la lingua originale supporta la variante di conversione.

errorformat

Formato da utilizzare per generare un testo di avvertenza e errore

plaintext
Wikitext with HTML tags removed and entities replaced.
wikitext
Unparsed wikitext.
html
HTML
raw
Chiave del messaggio e parametri.
none
No text output, only the error codes.
bc
Format used prior to MediaWiki 1.29. errorlang and errorsuselocal are ignored.
Uno dei seguenti valori: 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

Se indicato, i testi di errore impiegheranno messaggi personalizzati localmente dal namespace MediaWiki.

Tipo: booleano (dettagli)
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 10 seconds. This should be included in any pre-flight request, and therefore should be included in the request URI (not the POST body).

Esempi:
Aiuto per il modulo principale.
api.php?action=help [apri in una sandbox]
Tutti gli aiuti in una pagina.
api.php?action=help&recursivesubmodules=1 [apri in una sandbox]
Permessi:
writeapi
Usa l'API 'n scrittura
Granted to: all, user e bot
apihighlimits
Use higher limits in API queries (slow queries: 500; fast queries: 5000). The limits for slow queries also apply to multivalue parameters.
Granted to: bot e sysop

Tipi di dato

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 template

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.

Crediti

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/.