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=wbsetclaim

(main | wbsetclaim)
  • 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

Creates or updates an entire Statement or Claim.

Parámetros específicos:
Other general parameters are available.
claim

Statement or Claim serialization

Este parámetro es obligatorio.
index

The index within the entity's list of statements to move the statement to. Optional. Be aware that when setting an index that specifies a position not next to a statement whose main snak does not feature the same property, the whole group of statements whose main snaks feature the same property is moved. When not provided, an existing statement will stay in place while a new statement will be appended to the last one whose main snak features the same property.

Tipo: entero
summary

Resumen de la edición. Será precedido por un comentario generado automáticamente. La longitud máxima del autocomentario junto con el resumen es de 260 caracteres. Ten en cuenta que todo lo que sobrepase el límite se cortará.

tags

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

El identificador numérico de la revisión en la que basar la modificación. Este dato se utiliza para detectar conflictos al guardar.

Tipo: entero
bot

Marcar esta edición como hecha por un robot. Este parámetro funcionará solo si el usuario pertenece al grupo «Bots».

Tipo: boolean (más información)
ignoreduplicatemainsnak

If this is true, and the entity already has a claim with the same main snak as the claim being sent in the request, then the request is ignored

Tipo: boolean (más información)
returnto

Título de la página. Si al guardar la edición se creó una cuenta temporal, la API puede responder con una URL que el cliente debe visitar para completar el inicio de sesión. Si se proporciona este parámetro, la URL redirigirá a la página indicada, en lugar de a la página que se editó.

Tipo: título de página
Acepta páginas inexistentes.
returntoquery

Parámetros de consulta de URL (con ? al principio). Si al guardar la edición se creó una cuenta temporal, la API podría responder con una URL que el cliente debe visitar para completar el inicio de sesión. Si se proporciona este parámetro, la URL redirigirá a una página con los parámetros de consulta indicados.

Predeterminado: (vacío)
returntoanchor

Fragmento de URL (con # al principio). Si al guardar la edición se creó una cuenta temporal, la API podría responder con una URL que el cliente debe visitar para completar el inicio de sesión. Si se proporciona este parámetro, la URL redirigirá a una página con el fragmento indicado.

Predeterminado: (vacío)
Ejemplos:
Set the claim with the given ID to property P1 with a string value of "City"
api.php?action=wbsetclaim&claim={"id":"Q999999998$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"claim","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}}} [abrir en la zona de pruebas]
Set the claim with the given ID to property P1 with a string value of "City" and move the claim to the topmost position within the entity's subgroup of claims that feature the main snak property P1. In addition, move the whole subgroup to the top of all subgroups aggregated by property.
api.php?action=wbsetclaim&claim={"id":"Q999999998$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"claim","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}}}&index=0 [abrir en la zona de pruebas]
Set the Statement with the given ID to Property P1 with a string value of "City" and set the Statement's References to a single Reference featuring the string value "The Economy of Cities" assigned to the Property P2.
api.php?action=wbsetclaim&claim={"id":"Q999999998$5627445f-43cb-ed6d-3adb-760e85bd17ee","type":"statement","mainsnak":{"snaktype":"value","property":"P1","datavalue":{"value":"City","type":"string"}},"references":[{"snaks":{"P2":[{"snaktype":"value","property":"P2","datavalue":{"value":"The Economy of Cities","type":"string"}}]},"snaks-order":["P2"]}],"rank":"normal"} [abrir en la zona de pruebas]