Ayuda de la API de MediaWiki
Esta es una página de documentación autogenerada de la API de MediaWiki.
Documentación y ejemplos: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=wbeditentity
- Este módulo requiere permisos de lectura.
- Este módulo requiere permisos de escritura.
- Este módulo solo acepta solicitudes POST.
- Fuente: WikibaseClient
- Licencia: GPL-2.0-or-later
Crea una sola entidad nueva de Wikibase y la modifica con información serializada.
- id
El identificador de la entidad, incluido el prefijo. Usa id, o bien site y title juntos.
- new
Si se define, se creará una entidad nueva. El valor de esto debe corresponder al tipo de entidad que se desee crear. No se puede definir esto si id ya está definido.
- Uno de los siguientes valores: item, property
- site
Un identificador para el sitio en el que la página reside. Utilizar junto con title para hacer un enlace de sitio completo.
- Uno de los siguientes valores:
- title
Título de la página que asociar. Utilizar junto con site para hacer un enlace de sitio completo.
- baserevid
El identificador numérico para la revisión en la que basar la modificación. Esto se usa para detectar conflictos al guardar.
- Tipo: entero
- summary
Resumen de la edición. Será precedido por una generados automáticamente comentario. El límite de longitud de la autocomment junto con el resumen es de 260 caracteres. Ser conscientes de que todo lo que por encima de ese límite será cortado.
Change tags to apply to the revision.
- Valores (separados por | u otro separador):
- token
A "csrf" token retrieved from action=query&meta=tokens
- Este parámetro es obligatorio.
- bot
Marcar esta edición como hecha por un robot. Este parámetro funcionará solo si el usuario pertenece al grupo «Bots».
- Type: boolean (details)
- returnto
Page title. 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 the given page, instead of the page that was edited.
- Tipo: título de página
- Acepta páginas inexistentes.
- 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.
- Predeterminado: (vacío)
- 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.
- Predeterminado: (vacío)
- data
The serialized object that is used as the data source. A newly created entity will be assigned an 'id'.
- Este parámetro es obligatorio.
- 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.- Type: boolean (details)
- Crear un elemento nuevo vacío, devolver la estructura de la entidad completa
- api.php?action=wbeditentity&new=item&data={} [abrir en la zona de pruebas]
- Crear un elemento nuevo y establecer etiquetas para "de" y "en"
- api.php?action=wbeditentity&new=item&data={"labels":{"de":{"language":"de","value":"de-value"},"en":{"language":"en","value":"en-value"}}} [abrir en la zona de pruebas]
- Crear una propiedad nueva que contenga los datos json, devolver la estructura de la entidad completa
- 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"} [abrir en la zona de pruebas]
- Borrar todos los datos de la entidad con id. Q999999998
- api.php?action=wbeditentity&clear=true&id=Q999999998&data={} [abrir en la zona de pruebas]
- Borrar todos los datos de la entidad con ID Q999999998 y establecer una etiqueta para en
- api.php?action=wbeditentity&clear=true&id=Q999999998&data={"labels":{"en":{"language":"en","value":"en-value"}}} [abrir en la zona de pruebas]
- Añade una etiqueta sin sobreescribirla si ya existe.
- api.php?action=wbeditentity&id=Q999999998&data={"labels":[{"language":"no","value":"Bar","add":""}]} [abrir en la zona de pruebas]
- Elimina una etiqueta
- api.php?action=wbeditentity&id=Q999999998&data={"labels":[{"language":"en","value":"Foo","remove":""}]} [abrir en la zona de pruebas]
- Define el enlace de sitio de nowiki, sobreescribiéndolo si ya existe
- api.php?action=wbeditentity&id=Q999999998&data={"sitelinks":{"nowiki":{"site":"nowiki","title":"København"}}} [abrir en la zona de pruebas]
- Define la descripción de nb, sobreescribiéndola si ya existe
- api.php?action=wbeditentity&id=Q999999998&data={"descriptions":{"nb":{"language":"nb","value":"nb-Description-Here"}}} [abrir en la zona de pruebas]
- 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"}]} [abrir en la zona de pruebas]
- 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":""}]} [abrir en la zona de pruebas]
- 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"}]} [abrir en la zona de pruebas]