Ok, I see.
So, `wbsetqualifier`/`wbremovequalifiers` looks more suitable for what I need.
Thanks for the reply, Antonin. - Sylvain
On 28/04/2020 13:22, Antonin Delpeuch (lists) wrote:
Hi Sylvain,
With this API method you have to supply the entire new statement with or without the qualifiers that you want to add/remove.
Make sure the statement has the original statement id, otherwise you will be creating duplicate statements.
Cheers, Antonin
On 28/04/2020 13:04, Sylvain Leroux wrote:
Hi everyone,
I searched through the documentation [1][2], but I couldn't find any example showing how we can add/remove a qualifier from a claim through the `wbeditentity` action.
When tried on the test.wikidata.org API sandbox [3], the following payload does not work:
-----------8<------------------------------------------- { "qualifiers": [ { "add": "", "property": "P286", "snaktype": "value", "datavalue": { "value": { "entity-type": "item", "numeric-id": 54, "id": "Q54" }, "type": "wikibase-entityid" }, "datatype": "wikibase-item" } ], "id": "Q44" } -----------8<-------------------------------------------
Regards,
- Sylvain Leroux
[1] https://www.mediawiki.org/wiki/Wikibase/DataModel/JSON [2] https://www.wikidata.org/w/api.php?action=help&modules=wbeditentity [3] https://test.wikidata.org/wiki/Special:ApiSandbox#action=wbeditentity
Wikibaseug mailing list Wikibaseug@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibaseug
Wikibaseug mailing list Wikibaseug@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibaseug