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
- Fonte: MediaWiki
- Licenza: GPL-2.0-or-later
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.
- action
Quale aziona d'avess'a fà.
- acquiretempusername
- Acquisisce un nome utente temporaneo e lo memorizza nella sessione corrente, se la creazione di un'utenza temporanea è abilitata e l'utente attuale è disconnesso. Se un nome è già stato memorizzato, restituisce lo stesso nome.
- block
- Fremma n'utente.
- 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.
- clearhasmsg
- Scancella 'o flag
hasmsgpe ll'utente currente. - clientlogin
- Accedi al wiki utilizzando il flusso interattivo.
- compare
- Piglia 'e differenze nfra 2 paggene.
- createaccount
- Crèa cunto nnòvo.
- delete
- Scancella 'na paggena.
- edit
- Crèa e cagna paggene.
- emailuser
- E-mail a n'utente.
- expandtemplates
- Spannere tuttuquante 'e template dint' 'o wikitesto.
- 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.
- help
- Fà veré l'aiuto p' 'e module specificate
- imagerotate
- Ruota una o più immagini.
- import
- Import a page from another wiki, or from an XML file.
- 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.
- 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.
- setnotificationtimestamp
- Update the notification timestamp for watched pages.
- setpagelanguage
- Cambia la lingua di una pagina.
- tag
- Add or remove change tags from individual revisions or log entries.
- 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.
- 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.
- stashedit
- Internal. Prepare an edit in shared cache.
- Uno dei seguenti valori: acquiretempusername, block, changeauthenticationdata, changecontentmodel, checktoken, clearhasmsg, clientlogin, compare, createaccount, delete, edit, emailuser, expandtemplates, feedcontributions, feedrecentchanges, feedwatchlist, filerevert, help, imagerotate, import, linkaccount, login, logout, managetags, mergehistory, move, opensearch, options, paraminfo, parse, patrol, protect, purge, query, removeauthenticationdata, resetpassword, revisiondelete, rollback, rsd, setnotificationtimestamp, setpagelanguage, tag, unblock, undelete, unlinkaccount, upload, userrights, validatepassword, watch, cspreport, stashedit
- Predefinito: 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
- Predefinito: 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-maxagea sta quantità 'e secondi. Ll'errure nun s'acchiappassero maje.- Type: integer
- The value must be no less than 0.
- Predefinito: 0
- maxage
Mpustate 'a cap' 'e cuntrollo 'e cache HTTP
max-agea sta quantità 'e secondi. Ll'errure nun s'acchiappassero maje.- Type: integer
- The value must be no less than 0.
- Predefinito: 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
Originpricisamente, picciò s'avessa mpustà coccosa tipo https://en.wikipedia.org o https://meta.wikimedia.org. Si stu parammetro nun s'azzeccasse cu 'o cap'ê paggenaOrigin, allora na risposta 403 se turnasse. Si stu parammetro s'azzeccasse c' 'o cap'ê paggenaOrigine ll'origgene fosse dint' 'a lista janca, allora nu cap'ê paggenaAccess-Control-Allow-Originfosse mpustato.- 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.
- Tipo: booleano (dettagli)
- 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.
- Predefinito: 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
- Wikitesto con etichette HTML rimosse ed entità sostituite.
- wikitext
- Unparsed wikitext.
- html
- HTML
- raw
- Chiave del messaggio e parametri.
- none
- Nessun output di testo, solo i codici di errore.
- bc
- Format used prior to MediaWiki 1.29. errorlang and errorsuselocal are ignored.
- Uno dei seguenti valori: bc, html, none, plaintext, raw, wikitext
- Predefinito: bc
- errorlang
Lingua da utilizzare per avvisi ed errori. action=query&meta=siteinfo&siprop=languages restituisce un elenco di codici lingua. Specificare content per utilizzare la lingua del contenuto di questa wiki o uselang per utilizzare lo stesso valore del parametro uselang.
- Predefinito: uselang
- errorsuselocal
Se indicato, i testi di errore impiegheranno messaggi personalizzati localmente dal namespace MediaWiki.
- Tipo: booleano (dettagli)
- 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]
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/.