Hello,
This is an announcement about an upcoming breaking change related to the
list=wbsubscribers API Query module, which has inconsistencies in its
response.
Currently, calling the action=query&list=wbsubscribers API endpoint on a
Wikibase returns a response with two different keys that could potentially
contain results: subscribers and wbsubscribers. In addition, the XML
response format is not structured as expected.
We have identified the root cause of this issue, which was a typo in the
code that sets up the API module. We have fixed the issue and made the
necessary changes to ensure that the results are now added to only one key,
namely wbsubscribers instead of subscribers, and in the correct XML
structure. The fix is already deployed on Test Wikidata, and we plan to
deploy it to Wikidata on or after 2023-05-18.
Currently, an example API response may look like this:
JSON format
XML format
{
"batchcomplete": true,
"query": {
"wbsubscribers": {},
"subscribers": {
"Q42": {
"subscribers": [
{
"site": "enwiki"
}
]
}
}
}
}
<?xml version="1.0"?>
<api batchcomplete="">
<query>
<wbsubscribers />
<subscribers>
<Q42>
<subscribers>
<subscriber site="enwiki" />
</subscribers>
</Q42>
</subscribers>
</query>
</api>
With the change, it will instead look like this:
JSON format
XML format
{
"batchcomplete": true,
"query": {
"wbsubscribers": {
"Q42": {
"subscribers": [
{
"site": "enwiki"
}
]
}
}
}
}
<?xml version="1.0"?>
<api batchcomplete="">
<query>
<wbsubscribers>
<entity id="Q42">
<subscribers>
<subscriber site="enwiki" />
</subscribers>
</entity>
</wbsubscribers>
</query>
</api>
As an API user, you can prepare for this change by first checking if the
wbsubscribers element in the response is empty or not. If it is nonempty,
use it (the response is using the new format); if it is empty, fall back to
using the subscribers element instead (it is still using the old format).
This way, your code will work both before and after the change is deployed.
(Later, you can remove the fallback code.)
If you have any questions or concerns about this change, please don’t
hesitate to reach out to us in this ticket (phab:T300458
<https://phabricator.wikimedia.org/T300458>).
Cheers,
--
Mohammed Sadat
*Community Communications Manager, Wikidata*
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0) 30 577 116 2466
https://wikimedia.de
Grab a spot in my calendar for a chat: calendly.com/masssly.
Keep up to date! Current news and exciting stories about Wikimedia,
Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now
<https://www.wikimedia.de/newsletter/>.
Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de
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.
Hello,
This is a significant change announcement about the way entity labels are
displayed in parsed edit summaries in API requests.
As a Wikidata editor, you may have noticed that links in edit summaries are
formatted using the label of the linked entity, for example, [[Property:P460]]:
[[Q112795079]] becomes “said to be the same as (P460)
<https://www.wikidata.org/wiki/Property:P460>: Wikidata Sandbox 4
(Q112795079) <https://www.wikidata.org/wiki/Q112795079>”. However, this is
disabled in API requests, initially done to fix a previous bug. This made
it difficult for edit summaries to be understood outside of Wikidata.org,
especially when shown in tools.
To address this issue, we have fixed the original bug and will now enable
the display of entity labels in parsed edit summaries in API requests. API
requests that return edit summaries will now show formatted links with
entity labels, including action=query + prop=revisions +
rvprop=parsedcomment.
We have already deployed this change to Test Wikidata, where you can test
it now (example API request
<https://test.wikidata.org/w/api.php?action=query&format=json&prop=revisions…>).
We will deploy it to Wikidata on or shortly after May 18th.
We assume that users who analyze edit summaries to determine what changed
in an edit generally use the unparsed comment (e.g., /*
wbsetclaim-update:2||1|1 */ [[Property:P460]]: [[Q112795079]]), which will
be unaffected.
Please let us know on this phabricator ticket
<https://phabricator.wikimedia.org/T327062> if you have any questions or
concerns.
Cheers,
--
Mohammed Sadat
*Community Communications Manager, Wikidata*
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0) 30 577 116 2466
https://wikimedia.de
Grab a spot in my calendar for a chat: calendly.com/masssly.
Keep up to date! Current news and exciting stories about Wikimedia,
Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now
<https://www.wikimedia.de/newsletter/>.
Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de
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.
Hello! This is a breaking change announcement regarding the WikibaseClient
wblistentityusage API module. This API module is used for listing all pages
that make use of data from a given entity via Lua, parser functions, or
Sitelinks.
Currently, this API module has two issues:
-
When using this module as a value for the list parameter in an API query
action, the results are added to the query.pages key in the response
object. However, this key is reserved for use with the following
parameters: generator, titles, pageids, and revids. This could lead to a
collision if used alongside one of these parameters, potentially causing a
runtime exception.
-
The API parameter prefix wbeu is shared between list=wblistentityusage
and prop=wbentityusage (a different module that instead lists all
entities used on a given page). However, the module prefix must be globally
unique.
We are addressing both issues at the time. Starting today, you can use the
wblistentityusage API with the parameter prefix wbleu instead of wbeu, and
the results will be added under query.entityusage instead of query.pages.
However, the old prefix (wbeu) is still supported for some time, and will
continue to produce the same output as before (with an additional
deprecation warning).
On or shortly after 2023-05-17, we will remove support for the old prefix
and output format from the API. Thus, you now have two weeks to migrate to
the new prefix and output format. For a comparison between the old and new
methods of using the API, please refer to the wbeu version
<https://test.wikidata.org/w/api.php?action=query&list=wblistentityusage&wbe…>
and wbleu version
<https://test.wikidata.org/w/api.php?action=query&list=wblistentityusage&wbl…>
examples.
If you have any questions or concerns about this change, please don’t
hesitate to reach out to us via tickets T196962
<https://phabricator.wikimedia.org/T196962> or T300460
<https://phabricator.wikimedia.org/T300460>.
Cheers,
--
Mohammed Sadat
*Community Communications Manager, Wikidata*
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0) 30 577 116 2466
https://wikimedia.de
Grab a spot in my calendar for a chat: calendly.com/masssly.
Keep up to date! Current news and exciting stories about Wikimedia,
Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now
<https://www.wikimedia.de/newsletter/>.
Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de
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.