{"action":"created","issue":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/1488","repository_url":"https://api.github.com/repos/WP-API/WP-API","labels_url":"https://api.github.com/repos/WP-API/WP-API/issues/1488/labels{/name}","comments_url":"https://api.github.com/repos/WP-API/WP-API/issues/1488/comments","events_url":"https://api.github.com/repos/WP-API/WP-API/issues/1488/events","html_url":"https://github.com/WP-API/WP-API/issues/1488","id":102108348,"number":1488,"title":"Use short CURIEs instead of full URIs","user":{"login":"rmccue","id":21655,"avatar_url":"https://avatars.githubusercontent.com/u/21655?v=3","gravatar_id":"","url":"https://api.github.com/users/rmccue","html_url":"https://github.com/rmccue","followers_url":"https://api.github.com/users/rmccue/followers","following_url":"https://api.github.com/users/rmccue/following{/other_user}","gists_url":"https://api.github.com/users/rmccue/gists{/gist_id}","starred_url":"https://api.github.com/users/rmccue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmccue/subscriptions","organizations_url":"https://api.github.com/users/rmccue/orgs","repos_url":"https://api.github.com/users/rmccue/repos","events_url":"https://api.github.com/users/rmccue/events{/privacy}","received_events_url":"https://api.github.com/users/rmccue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"joehoyle","id":161683,"avatar_url":"https://avatars.githubusercontent.com/u/161683?v=3","gravatar_id":"","url":"https://api.github.com/users/joehoyle","html_url":"https://github.com/joehoyle","followers_url":"https://api.github.com/users/joehoyle/followers","following_url":"https://api.github.com/users/joehoyle/following{/other_user}","gists_url":"https://api.github.com/users/joehoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/joehoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehoyle/subscriptions","organizations_url":"https://api.github.com/users/joehoyle/orgs","repos_url":"https://api.github.com/users/joehoyle/repos","events_url":"https://api.github.com/users/joehoyle/events{/privacy}","received_events_url":"https://api.github.com/users/joehoyle/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/WP-API/WP-API/milestones/29","html_url":"https://github.com/WP-API/WP-API/milestones/2.0%20Beta%2013","labels_url":"https://api.github.com/repos/WP-API/WP-API/milestones/29/labels","id":1564621,"number":29,"title":"2.0 Beta 13","description":null,"creator":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":20,"state":"open","created_at":"2016-02-04T23:17:42Z","updated_at":"2016-02-19T12:27:09Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-08-20T10:16:05Z","updated_at":"2016-02-19T18:02:07Z","closed_at":null,"body":"One small annoyance in the API right now is that link relations are full URIs. In JavaScript, this means that while you have  `_links.self` and `_links.author`, you have to do `_links[\"http://v2.wp-api.org/term\"]`. This is a bit ugly, and can be confusing.\r\n\r\nWe should instead switch to [CURIEs](https://en.wikipedia.org/wiki/CURIE). These are an abbreviated form of the full URI that's easier to work with, but can be expanded out to the full URI if needed. They look like this:\r\n\r\n```json\r\n{\r\n    \"_links\": {\r\n        \"curies\": [\r\n            {\r\n                \"name\": \"wp\",\r\n                \"href\": \"http://v2.wp-api.org/{rel}\",\r\n                \"templated\": true\r\n            }\r\n        ],\r\n\r\n        \"wp:term\": [\r\n            {\r\n                \"taxonomy\": \"category\",\r\n                \"href\": \"...\"\r\n            },\r\n            {\r\n                \"taxonomy\": \"post_tag\",\r\n                \"href\": \"...\"\r\n            }\r\n        ]\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/WP-API/WP-API/issues/comments/186333637","html_url":"https://github.com/WP-API/WP-API/issues/1488#issuecomment-186333637","issue_url":"https://api.github.com/repos/WP-API/WP-API/issues/1488","id":186333637,"user":{"login":"joehoyle","id":161683,"avatar_url":"https://avatars.githubusercontent.com/u/161683?v=3","gravatar_id":"","url":"https://api.github.com/users/joehoyle","html_url":"https://github.com/joehoyle","followers_url":"https://api.github.com/users/joehoyle/followers","following_url":"https://api.github.com/users/joehoyle/following{/other_user}","gists_url":"https://api.github.com/users/joehoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/joehoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joehoyle/subscriptions","organizations_url":"https://api.github.com/users/joehoyle/orgs","repos_url":"https://api.github.com/users/joehoyle/repos","events_url":"https://api.github.com/users/joehoyle/events{/privacy}","received_events_url":"https://api.github.com/users/joehoyle/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T18:02:07Z","updated_at":"2016-02-19T18:02:07Z","body":"So I've been looking into doing this, we don't have good hooks in place to modify the response links, best I can see is to either run a subclass of the server class in the plugin, or filter the server response and look for links recursively (bit of a hack)."}}