I'm running a custom instance of Wikibase with SPARQL service and I'd
noticed that updater service (runUpdate.sh) doesn't really update
triplestore with new properties created in my Wikibase instance. As well
as I can see, newly created P-item names aren't even returned by API call
for "recentchanges". So new properties with their names and
other attributes never appear in the triplestore after their creation.
Once the property is used in some statement or qualifier, corresponding
triples are put into the triplestore immediately, but the property remains
without names or descriptions.
Is it because properties are managed centrally in Wikidata? Is it assumed
that I should reload a full snapshot each time I create a new property? Or
is it some bug on my side?
Thank you for your help!
This is an announcement for a change to the response of the wbeditentity
API module, which is a breaking change for MediaInfo entities (Structured
Data on Commons), a significant change for Lexeme entities (lexicographical
data), a minor change for Property entities, and a no-op for Item entities.
The wbeditentity API module, which can be used to edit any part of a
Wikibase Entity, has long included a part of the edited data in its
response. However, this response data was incomplete: it included e.g.
Labels, Statements, Sitelinks, but not the datatype of a Property or the
Lemmas of a Lexeme. Additionally, Statements were always returned under the
key "claims", even though MediaInfo entities generally use the key
"statements". On or around February 10, we will deploy a code change that
will make wbeditentity return the entity data using the standard
serialization format of an entity type, the same that is used by
wbgetentities and Special:EntityData. This means that the response will now
contain all the parts of an Entity, and also that, for MediaInfo entities,
the Statements will now be returned under "statements". (These Statements
will also be missing the "datatype", just like the MediaInfo data from
wbgetentities and Special:EntityData – see T246809
To avoid breaking MediaInfo API users immediately, we are temporarily
adding Statements under the key "claims" as well – that is, the change on
February 10 is only significant, not yet breaking, and MediaInfo API users
can use either the "claims" or the "statements". On or around March 3, we
will remove this compatibility code, and MediaInfo API users will have to
use "statements" if they want to look at the Statements of the returned
It’s also worth mentioning here what the wbeditentity response data
represents. The API returns the Entity data as edited by your API request,
and the revision ID of the page that the change was saved under. This is
*not* necessarily the Entity data of that revision ID: if Wikibase patched
any edit conflicts between the base revision ID that your request specified
(baserevid parameter) and the actual latest revision ID, then those changes
are not included in the response. For example, if you load an Item with
revision ID *X* and labels “a” and “b” in different languages, and make a
wbeditentity request with baserevid=*X* to change the label “a” to “A”, but
in the meantime someone else had already changed the label “b” to “B” and
saved this as revision *Y*, then the API response for your request will
have a last revision ID ("lastrevid") of *Z*, and this revision *Z* will
have labels “A” and “B” if you get it from Special:EntityData, but the API
response for your request will have labels “A” and “b” (the result of
applying your edit to the base revision). If you need the actual latest
Entity data after your edit, make a separate request to Special:EntityData
or wbgetentities. (This is nothing new, and unaffected by the change being
announced here, but we thought it was still worth mentioning.)
If you have any issue or question, feel free to leave a comment at T271105
Lucas Werkmeister (he/er)
Full Stack Developer
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.