As a tool developer I want to be able to replace data of a statement on a property so that my tool can store modifications made by its users
PUT /entities/properties/{property_id}/statements/{statement_id}
PUT /statements/{statement_id}
**Notes**
- "Automated edit summary" related to the edit to be of form: `/* wbsetclaim-update:1||1 */ [[Property:P123]]: VALUE_FORMATTED` (exactly the same thing as for statement on items)
- Handle HTTP conditional request headers as in PUT /entities/items/{item_id}statements/{statement_id}
- Handle user authentication/authorization like in PUT /entities/items/{item_id}statements/{statement_id}
- The functionality already exist for statements on items: https://doc.wikimedia.org/Wikibase/master/js/rest-api/#operations-statements-put_entities_items__item_id__statements__statement_id_
- - client can provide additional edit metadata: mediawiki tags, edit summary text to append to the automated summary, and a bot edit flag, like in PUT /entities/items/{item_id}statements/{statement_id}
**Error cases to consider**
<table>
<tr>
<th>
</th>
<th>HTTP response code</th>
<th>response payload</th>
</tr>
<tr>
<td>Property does not exist - the "statement subject" property </td>
<td>404</td>
<td>
`"code": "property-not-found"`
`"message": "Could not find a property with the ID: {property_id}"`
</td>
</tr>
<tr>
<td>Invalid property ID, either a "statement subject" property or a property used in the statement, incl. a case the property used in the statement is not an existing property</td>
<td>400</td>
<td>
`"code": "invalid-property-id"`
`"message": "Not a valid property ID: {property_id}"`
`"context": {"property": "{property-id}"}`
</td>
</tr>
<tr>
<td>Invalid edit tag</td>
<td>400</td>
<td>
`"code": "invalid-edit-tag"`
`"message": "Invalid MediaWiki tag: {tag}"`
</td>
</tr>
<tr>
<td>Edit comment/summary too long</td>
<td>400</td>
<td>
`"code": "comment-too-long"`
`"message": "Comment must not be longer than {limit} characters"`
</td>
</tr>
<tr>
<td>Data of a statement missing mandatory field</td>
<td>400</td>
<td>
`"code": "statement-data-missing-field"`
`"message": "Mandatory field missing in the statement data: '{field}'"`
`"context": { "path": "{field}"}`
</td>
</tr>
<tr>
<td>Value provided in statement data is invalid</td>
<td>400</td>
<td>
`"code": "statement-data-invalid-field"`
`"message": "Invalid input for '{field}'"`
`"context": { "path": "{field}", "value": "{value}"}`
</td>
</tr>
<tr>
<td>Request would change the ID of the statement</td>
<td>400</td>
<td>
`"code": "invalid-operation-change-statement-id"`
`"message": "Cannot change the ID of the existing statement"`
</td>
</tr>
<tr>
<td>Request would change the property (predicate) of the statement</td>
<td>400</td>
<td>
`"code": "invalid-operation-change-property-of-statement"`
`"message": "Cannot change the property of the existing statement"`
</td>
</tr>
<tr>
<td>Request payload is not JSON</td>
<td>415</td>
<td>
`"code": "unsupported-content-type"`
`"message": "Unsupported Content-Type: '{content_type}'"`
</td>
</tr>
</table>
**Possibly relevant pointers:**
* Suggestion in 2020 Wikibase REST API proposal: https://wmde.github.io/wikibase-rest-api-proposal/#/statements/put_statements__statement_id_
* How Wikibase Action API handles this: https://www.wikidata.org/w/api.php?action=help&modules=wbsetclaim