MediaWiki API ヘルプ

このページは自動生成された MediaWiki API の説明文書ページです。

説明文書と例: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=wbsetclaim

(main | wbsetclaim)
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールは書き込みの権限を必要とします。
  • このモジュールは POST リクエストのみを受け付けます。
  • ソース: WikibaseClient
  • ライセンス: GPL-2.0-or-later

Creates or updates an entire Statement or Claim.

パラメーター:
その他一般パラメーターが利用可能です。
claim

Statement or Claim serialization

この変数は必須です。
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.

型: 整数
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.

tags

Change tags to apply to the revision.

値 (| または別の文字列で区切る):
token

action=query&meta=tokens から取得した「csrf」トークン

この変数は必須です。
baserevid

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

型: 整数
bot

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

型: 真偽値 (詳細)
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

型: 真偽値 (詳細)
例:
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"}}} [サンドボックスで開く]
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 [サンドボックスで開く]
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"} [サンドボックスで開く]