Last modified: 2014-10-13 11:42:29 UTC
In the spirit of the linked data web, entity URIs should resolve to a machine readable representation of the respective entity. While the API and Special:Export already provide access to this data, their output contains wrapper structures and meta-information that does not belong to the entity denoted by the URI. To provide a machine readable representation of the entity, a special page should be created that generates the canonical JSON representation for a given entity. URL rewriting can then be used to make this special page accessible via a canonical URI/URL schema, as described by <https://meta.wikimedia.org/wiki/Wikidata/Notes/URI_scheme#Machine-readable_access>. The representation returned by the data endpoint should be consistent with the representation used in the web API (no necessarily with the internal representation, which is exposed by Special:Export and does not even need to be JSON). Care should be taken to allow caching of this data on the HTTP level, making use of the appropriate Cache-Control, ETag and If-Modified-Since headers.
See I4c9f7703 for a baseline implementation
Still to do: * content negotiation * http headers, caching, IMS * use fake file extensions to determine format * allow loading specific revisions, via parameter or magic q123@45678 syntax * Show input form if no entity is specified.
no commitment in sprint 24
Picked up in sprint 32.
https://gerrit.wikimedia.org/r/#/c/51164/
Ie9f2f894 provides a baseline, but is not complete.
Besides the incomplete RDF mapping (covered by bug 44578), and content negotiation (bug 44576), there are some issues remaining with the HTTP interaction: * honor IfModifiedSince * send Last-Modified * make MaxAge configurable * make sure Cache-Control headers are not overridden by core code * make sure the correct Content-Length is sent. Besides this, the inclusion of meta-info (like the revision ID) is currently unclear. Also, the input form show to the user is very rudimentary and could use some polishing (file a bug for that?).
https://gerrit.wikimedia.org/r/51164 (Gerrit Change Ie9f2f8944a65750077152a69923c0a0b18a49d5e) | change APPROVED and MERGED [by Daniel Werner]
turning this into a user story / top level tracking bug.
Related URL: https://gerrit.wikimedia.org/r/62796 (Gerrit Change I8ceba8abf3a4f0ab0f472a44d1482cd7169f2da1)
https://gerrit.wikimedia.org/r/62796 (Gerrit Change I8ceba8abf3a4f0ab0f472a44d1482cd7169f2da1) | change APPROVED and MERGED [by Tobias Gritschacher]