Hi Denny, You are correct that wbsetclaim can create a claim with a reference. You just need to pass the entire JSON serialization of the claim, including the reference. If you are trying to create a new statement, you will need to generate a fresh statement id client-side and include it in the JSON serialization.
Cheers, Antonin On 7/17/19 7:49 PM, Denny Vrandečić wrote: > Hi, > > since it is possible in the UI, and the API documentation for wbsetclaim > also states that it "Creates or updates an entire Statement or Claim", I > am wondering how I can create a claim with a reference (wbcreateclaim > does not allow adding a reference). > > So, my questions are: > > 1. Does the API allow the creation of a claim with a reference in a > single step? And if yes, how? > > 2. Does pyWikibot allow it? And if yes, how? > > Cheers, > Denny > > _______________________________________________ > Wikidata-tech mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikidata-tech > _______________________________________________ Wikidata-tech mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
