MediaWiki-API-Hilfe

Dies ist eine automatisch generierte MediaWiki-API-Dokumentationsseite.

Dokumentation und Beispiele: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=wbsetclaim

(main | wbsetclaim)
  • Dieses Modul erfordert Leserechte.
  • Dieses Modul erfordert Schreibrechte.
  • Dieses Modul akzeptiert nur POST-Anfragen.
  • Quelle: WikibaseRepository
  • Lizenz: GPL-2.0-or-later

Erstellt oder aktualisiert eine ganze Aussage oder Behauptung.

Parameter:
claim

Statement or Claim serialization

Dieser Parameter ist erforderlich.
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.

Typ: Ganzzahl
summary

Zusammenfassung für die Bearbeitung. Es wird ein automatisch generierter Kommentar vorangestellt. Die Zusammenfassung inklusive dieses Autokommentars darf 260 Zeichen nicht überschreiten. Alles über dieser Begrenzung wird abgeschnitten.

tags

Change tags to apply to the revision.

Werte (mit | trennen oder Alternative):
token

Ein „csrf“-Token abgerufen von action=query&meta=tokens

Dieser Parameter ist erforderlich.
baserevid

Die numerische Kennung für die Version, auf der die Änderung basiert. Sie wird verwendet, um Konflikte während des Speicherns zu erkennen.

Typ: Ganzzahl
bot

Markiert diese Bearbeitung als Bot. Diese URL-Markierung wird nur berücksichtigt, wenn der Benutzer der Gruppe „Bots“ angehört.

Type: boolean (details)
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

Type: boolean (details)
Beispiele:
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"}}} [in Spielwiese öffnen]
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 [in Spielwiese öffnen]
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"} [in Spielwiese öffnen]