User:Addshore/API Break September 2015
Jump to navigation
Jump to search
We have some breaking API changes that will soon be deployed to wikidata.org.
The breaks mainly concern the XML output although the JSON will also change slightly.
Below you can fine details about them!
Details
[edit]- Gerrit change: https://gerrit.wikimedia.org/r/#/c/227686
- Phabricator task: https://phabricator.wikimedia.org/T95168
- Mailing list announcement links:
- Project announcement links:
- Date merged into master: 27 August 2015
- Branch to first appear on: 1.26wmf22
- Date to be deployed to wikidata.beta.wmflabs.org: 28th August 2015 >> current known issue https://phabricator.wikimedia.org/T110668
- Date to be deployed to test.wikidata.org: 8th September 2015
- Date to be deployed to wikidata.org: 9th September 2015
The breaking changes
[edit]- XML output aliases are now grouped by language
- XML output may no longer give elements when they are empty
- XML any claim, qualifier, reference or snak elements that had an '_idx' element will no longer have it
- ALL output may now give empty elements, ie. labels when an entity has none
Sample XML changes
[edit]- wbeditentity
- wbgetclaims
- wbgetentities
- wbsetaliases
- wbsetaliases (when removing)
- wbsetclaim
- wbsetqualifier
- wbsetreference
Sample JSON changes
[edit]Before:
{ "entities": { "q42": { "id": "q42", "revision": 31186, "timestamp": "20120716140702", "labels": { "en": { "language": "en", "value": "Death Star" }, "nn": { "language": "nn", "value": "Dødsstjerna" } }, "sitelinks": { "enwiki": { "site": "enwiki", "title": "Death Star" } } } }, "success": 1 }
After:
{ "entities": { "q42": { "id": "q42", "revision": 31186, "timestamp": "20120716140702", "labels": { "en": { "language": "en", "value": "Death Star" }, "nn": { "language": "nn", "value": "Dødsstjerna" } }, "descriptions": {}, "aliases": {}, "sitelinks": { "enwiki": { "site": "enwiki", "title": "Death Star" } }, "claims": {} } }, "success": 1 }
Finally
[edit]As well as an API change you may also notice that the JSON dumps may increase in size, although the format will not change.
This will be due to the JSON format including empty parts where previously they were removed.
If you have any questions regarding these breaking changes please ask!
·addshore· talk to me! 11:51, 27 August 2015 (UTC)