Page MenuHomePhabricator

[Story] Direct link to download the raw JSON data of each Entity
Closed, DuplicatePublic

Description

There should be a quick link from each Entity (Items as well as Properties) to the internal JSON representation of that Entity. A "download the raw data of this entity" link. I think this could be a perfect starting point for curious users that aren't afraid of digging into the guts of the repo.

Suggestion: The page
https://www.wikidata.org/w/index.php?title=Q7716283&action=info
should contain a link to
https://www.wikidata.org/wiki/Special:ApiSandbox#action=wbgetentities&ids=Q7716283

An other, much more visible solution could be a link at the bottom of each page.

Details

Reference
bz64515

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:09 AM
bzimport set Reference to bz64515.
bzimport added a subscriber: Unknown Object (MLST).

Ok to link in action=info. No for link at the bottom of each page.

I think we should have the canonical item URI on action=info. For Wikidata, that would be https://www.wikidata.org/entity/Q123. Content negotiation applies, so this can be used for exporting too, but not easily via the browser (which will prefer, and get, html).

In addtion, we could link to the JSON export (and perhaps also RDF and Turtle): https://www.wikidata.org/wiki/Special:EntityData/Q1.json etc.

Canonical item URL plus json, rdf and turtle sounds good to me.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Jonas renamed this task from Direct link to download the raw JSON data of each Entity to [Story] Direct link to download the raw JSON data of each Entity.Sep 10 2015, 1:07 PM
Jonas updated the task description. (Show Details)
Jonas set Security to None.
thiemowmde lowered the priority of this task from Medium to Low.Feb 28 2018, 3:38 PM
thiemowmde added a project: good first task.

I still believe this would be helpful. Even if the only thing it would do is to trigger the explorer gene in some curious people. That alone would be awesome.

This also got PMs "Go!" already.

If I am not wrong, the easier way to add a link to the JSON, RDF and Turtle is to modify [Mediawiki:Pageinfo-footer](https://www.wikidata.org/w/index.php?title=MediaWiki:Pageinfo-footer&action=edit). I wanted to do it, but I think this has some issues to keep in mind:

  1. Obviously, it is protected.
  2. The content isn't localized and can't be translated in TranslateWiki.net, so it only appears if we read the page in English.
  3. I think the footer of the info page of an item isn't useful, neither for the current external tools listed nor for the links to download the item in this formats, because it is below "Page properties" section and it could be very long, so what is at the end of the page is practically "invisible".

Considering the third point I think these links should be above the «Page protection» section. But if I am not wrong we can't do it, because Mediawiki:Pageinfo-footer is configured to be in the footer, as its name indicate, and it may be useful for another stuff. So I think it could be interesting to create another system message (e.g. Mediawiki:Pageinfo-externaltools) and integrate it in Wikibase, specifically in the [InfoActionHookHandler](https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/client/includes/Hooks/InfoActionHookHandler.php) if I am not wrong.

Of course, I am saying all this from the perspective of someone who has never edit Wikibase nor Mediawiki. But I am very interested to learn a bit how can I do this kind of easy tasks to help to the development of Mediawiki/Wikibase. If someone might guide me a bit to be sure of what I should do to make it fine, I would be very grateful. Thanks in advance!