Description:
As a tool developer I want to remove statements from a property so that my tool can remove incorrect data//As a gadget developer I want to remove statements from a property so that my tool can remove duplicated statements
DELETE /entities/property/{property_id}/statements/{statement_id}
DELETE /statements/{statement_id}
Acceptance criteria:
- On the successful removal, API should respond with 200 and "Statement deleted" as a response body.
- 200 response should also contain Content-Language header with "en" as a value
- On the successful removal, API should respond with 200 and "Statement deleted" as a response body.
- Following error cases have to be considered:
HTTP response code | response payload | |
---|---|---|
Property does not exist | 404 | "code": "property-not-found" "message": "Could not find a property with the ID: {property_id}" |
Invalid property ID | 400 | "code": "invalid-property-id" "message": "Not a valid property ID: <PROPERTY_ID>" "context": { "property-id": "<PROPERTY_ID>" } |
Notes:
- "Automated edit summary" related to the edit to be of form: /*https://www.wikidata.org/w/api.php?action=wbremoveclaims&claim=Q4115189$D8404CDA-25E4-4334-AF13-A3290BCD9C0N&token=foobar&baserevid=7201010.. (exactly the same thing as for statement on items)
- client can provide additional edit metadata: mediawiki tags, edit summary text to append to the automated summary, and a bot edit flag, like in DELETE /entities/items/{item_id}/statements/{statement_id}
- Handle HTTP conditional request headers as in DELETE /entities/item/{item_id}/statements/{statement_id}
- Handle user authentication/authorization like in DELETE /entities/items/{item_id}/statements/{statement_id}
Additional notes:
- Old ticket for removing statement of an item: https://phabricator.wikimedia.org/T306937