User:Addshore/API Break September 2015: Difference between revisions

From Wikidata
Jump to navigation Jump to search
Content deleted Content added
No edit summary
rm notice
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{notice|There is currently a known issue with this change https://phabricator.wikimedia.org/T110668 .... Don't worry, these keys in the JSON will be added back....}}

We have some breaking API changes that will soon be deployed to wikidata.org.
We have some breaking API changes that will soon be deployed to wikidata.org.


Line 20: Line 18:
* Date merged into master: 27 August 2015
* Date merged into master: 27 August 2015
* Branch to first appear on: 1.26wmf22
* Branch to first appear on: 1.26wmf22
* Date to be deployed to wikidata.beta.wmflabs.org: 28th August 2015
* 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 test.wikidata.org: 8th September 2015
* Date to be deployed to wikidata.org: 9th September 2015
* Date to be deployed to wikidata.org: 9th September 2015

Latest revision as of 15:59, 2 June 2016

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]

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]

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)