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
action=wbeditentity
- 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
Creates a single new Wikibase entity and modifies it with serialised information.
- 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à da creare. Non è consentito impostarlo quando anche id è valorizzato.
- 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
Summary for the edit. Will be prepended by an automatically generated comment. The length limit of the autocomment together with the summary is 260 characters. Be aware that everything above that limit will be cut off.
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)
- data
The serialized object that is used as the data source. A newly created entity will be assigned an 'id'.
- Questo parametro è obbligatorio.
- clear
If set, the complete entity is emptied before proceeding. The entity will not be saved before it is filled with the "
data
", possibly with parts excluded.- Tipo: booleano (dettagli)
- Create a new empty item, return full entity structure
- api.php?action=wbeditentity&new=item&data={} [apri in una sandbox]
- Create a new item and set labels for de and en
- api.php?action=wbeditentity&new=item&data={"labels":{"de":{"language":"de","value":"de-value"},"en":{"language":"en","value":"en-value"}}} [apri in una sandbox]
- Create a new property containing the json data, return full entity structure
- api.php?action=wbeditentity&new=property&data={"labels":{"en-gb":{"language":"en-gb","value":"Propertylabel"}},"descriptions":{"en-gb":{"language":"en-gb","value":"Propertydescription"}},"datatype":"string"} [apri in una sandbox]
- Clear all data from entity with ID Q999999998
- api.php?action=wbeditentity&clear=true&id=Q999999998&data={} [apri in una sandbox]
- Clear all data from entity with ID Q999999998 and set a label for en
- api.php?action=wbeditentity&clear=true&id=Q999999998&data={"labels":{"en":{"language":"en","value":"en-value"}}} [apri in una sandbox]
- Aggiunge un'etichetta senza sovrascrivere se già presente
- api.php?action=wbeditentity&id=Q999999998&data={"labels":[{"language":"no","value":"Bar","add":""}]} [apri in una sandbox]
- Rimuovi un'etichetta
- api.php?action=wbeditentity&id=Q999999998&data={"labels":[{"language":"en","value":"Foo","remove":""}]} [apri in una sandbox]
- Sets sitelink for nowiki, overwriting it if it already exists
- api.php?action=wbeditentity&id=Q999999998&data={"sitelinks":{"nowiki":{"site":"nowiki","title":"København"}}} [apri in una sandbox]
- Sets description for nb, overwriting it if it already exists
- api.php?action=wbeditentity&id=Q999999998&data={"descriptions":{"nb":{"language":"nb","value":"nb-Description-Here"}}} [apri in una sandbox]
- Creates a new claim on the item for the property P56 and a value of "ExampleString"
- api.php?action=wbeditentity&id=Q999999998&data={"claims":[{"mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ExampleString","type":"string"}},"type":"statement","rank":"normal"}]} [apri in una sandbox]
- Removes the claims from the item with the provided GUIDs
- api.php?action=wbeditentity&id=Q999999998&data={"claims":[{"id":"Q999999998$D8404CDA-25E4-4334-AF13-A3290BCD9C0F","remove":""},{"id":"Q999999998$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X","remove":""}]} [apri in una sandbox]
- Sets the claim with the GUID to the value of the claim
- api.php?action=wbeditentity&id=Q999999998&data={"claims":[{"id":"Q999999998$GH678DSA-01PQ-28XC-HJ90-DDFD9990126X","mainsnak":{"snaktype":"value","property":"P56","datavalue":{"value":"ChangedString","type":"string"}},"type":"statement","rank":"normal"}]} [apri in una sandbox]