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

(main | wbsetsitelink)
  • Questo modulo richiede i diritti di lettura.
  • Questo modulo richiede i diritti di scrittura.
  • Questo modulo accetta solo richieste POST.
  • Fonte: WikibaseRepository
  • Licenza: GPL-2.0-or-later

Associates a page on a wiki with a Wikibase item or removes an already made such association.

Parametri specifici:
Sono disponibili altri parametri generali.
id

L'identificatore dell'entità, incluso il prefisso. Utilizza id oppure site e title insieme.

new

Se impostato, verrà creata una nuova entità. Impostalo al tipo di entità che vuoi creare.

Uno dei seguenti valori: item, property
site

Un identificatore per il sito in cui risiede la pagina. Utilizza insieme a title per creare un sitelink completo.

Uno dei seguenti valori:
title

Titolo della pagina da associare. Utilizza insieme a site per creare un sitelink completo.

baserevid

The numeric identifier for the revision to base the modification on. This is used for detecting conflicts during save.

Type: integer
summary

Riepilogo per la modifica. Sarà preceduto da un commento generato automaticamente. Il limite di lunghezza del commento automatico, insieme con il riassunto, è di 260 caratteri. Siate consapevoli del fatto che tutto ciò che supera tale limite verrà tagliato.

tags

Change tags to apply to the revision.

Valori (separati da | o alternativa):
token

Un token "csrf" recuperato da action=query&meta=tokens

Questo parametro è obbligatorio.
bot

Mark this edit as bot. This URL flag will only be respected if the user belongs to the group "bot".

Tipo: booleano (dettagli)
returnto

Titolo della pagina. Quando si effettua una modifica con un account temporaneo, durante il salvataggio, l'API potrebbe rispondere con un URL che invita chi modifica a completare l'accesso. Se questo parametro viene fornito, l'URL reindirizzerà alla pagina specificata, invece che a quella modificata.

Tipo: titolo della pagina
Accetta pagine non esistenti.
returntoquery

URL query parameters (with leading ?). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given query parameters.

Predefinito: (vuoto)
returntoanchor

URL fragment (with leading #). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given fragment.

Predefinito: (vuoto)
linksite

The identifier of the site on which the page to link resides

Questo parametro è obbligatorio.
Uno dei seguenti valori:
linktitle

The title of the page to link. If this parameter is an empty string or both linktitle and badges are not set, the link will be removed.

badges

The IDs of items to be set as badges. They will replace the current ones. If this parameter is not set, the badges will not be changed

Valori (separati da | o alternativa):
Esempi:
Aggiunge un sitelink alla pagina in inglese "Hydrogen" all'elemento con ID Q999999998, se il sitelink non esiste
api.php?action=wbsetsitelink&id=Q999999998&linksite=enwiki&linktitle=Hydrogen [apri in una sandbox]
Aggiunge un sitelink alla pagina in inglese "Hydrogen" all'elemento con ID Q999999998, se il sitelink non esiste. Inoltre aggiunge "Loves Oxygen" all'oggetto della modifica.
api.php?action=wbsetsitelink&id=Q999999998&linksite=enwiki&linktitle=Hydrogen&summary=Loves%20Oxygen [apri in una sandbox]
Aggiunge un sitelink alla pagina in tedesco "Wasserstoff", all'elemento che è collegato alla pagina in inglese "Hydrogen", se il sitelink non esiste
api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=dewiki&linktitle=Wasserstoff [apri in una sandbox]
Rimuove il sitelink tedesco dall'elemento
api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=dewiki [apri in una sandbox]
Aggiunge un sitelink alla pagina in polacco "Wodór", all'elemento che è collegato alla pagina in inglese "Hydrogen", con un distintivo che punta all'elemento con ID "Q149"
api.php?action=wbsetsitelink&site=enwiki&title=Hydrogen&linksite=plwiki&linktitle=Wodór&badges=Q149 [apri in una sandbox]
Change badges for the link to the Polish page from the item with ID Q999999998 to two badges pointing to the items with IDs "Q2" and "Q149" without providing the link title
api.php?action=wbsetsitelink&id=Q999999998&linksite=plwiki&badges=Q2|Q149 [apri in una sandbox]
Change the link to the Polish page from the item with ID Q999999998 without changing badges
api.php?action=wbsetsitelink&id=Q999999998&linksite=plwiki&linktitle=Warszawa [apri in una sandbox]
Change the link to the Polish page from the item with ID Q999999998 and remove all of its badges
api.php?action=wbsetsitelink&id=Q999999998&linksite=plwiki&linktitle=Wodór&badges= [apri in una sandbox]