{"action":"created","comment":{"url":"https://api.github.com/repos/ipfs/http-api-spec/pulls/comments/52057594","id":52057594,"diff_hunk":"@@ -1036,6 +1036,332 @@ Outputs the list of peers that were removed.\n \n # Group refs\n \n+Retrieves the object named by <ipfs-path> and displays the link\n+hashes it contains.\n+\n+## refs [GET /refs{?arg}{&format,edges,unique,recursive}]\n+Lists links (references) from an object\n+\n+#### curl\n+    curl -i http://localhost:5001/api/v0/refs?arg=/ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg\n+\n++ Parameters\n+    + arg (string, required) - Path to the object or objects to list refs from.\n+    + format (string, optional) - Emit edges with given format. Tokens: `<src> <dst> <linkname>`.\n+    + edges (boolean, optional) - Emit edge format: `<from> -> <to>`. Alias: e.\n+    + unique (boolean, optional) - Omit duplicate refs from output. Alias: u.\n+    + recursive (boolean, optional) - Recursively list links of child nodes. Alias: r.\n+\n++ Request Without Arguments\n+\n+    #### curl\n+\n+        curl -i \"http://localhost:5001/api/v0/refs\"\n+\n+    + Body\n+\n+        ```\n+        curl -i \"http://localhost:5001/api/v0/refs\"\n+        ```\n+\n++ Response 400\n+\n+    + Headers\n+\n+        ```\n+        Date: Fri, 05 Feb 2016 17:30:09 GMT\n+        Content-Length: 32\n+        Content-Type: text/plain; charset=utf-8\n+        ```\n+\n+    + Attributes (string)\n+\n+    + Body\n+\n+        ```\n+        Argument 'ipfs-path' is required\n+        ```\n+\n++ Request With Empty Argument\n+\n+    The response is the same if there is an invalid argument. For example:\n+\n+        curl -i \"http://localhost:5001/api/v0/refs?arg=kitten\"\n+\n+    #### curl\n+\n+        curl -i \"http://localhost:5001/api/v0/refs?arg=\"\n+\n+    + Body\n+\n+        ```\n+        curl -i \"http://localhost:5001/api/v0/refs?arg=\"\n+        ```\n+\n++ Response 500\n+\n+    + Headers\n+\n+        ```\n+        Content-Type: application/json\n+        Trailer: X-Stream-Error\n+        Transfer-Encoding: chunked\n+        Date: Fri, 05 Feb 2016 17:30:51 GMT\n+        Transfer-Encoding: chunked\n+        ```\n+\n+    + Attributes (Error)\n+        - Message: \"invalid ipfs ref path\"\n+        - Code: 0\n+\n+    + Body\n+\n+        ```\n+        {\n+          \"Message\": \"invalid ipfs ref path\",\n+          \"Code\": 0\n+        }\n+        ```\n+\n++ Request With Argument\n+\n+    #### curl\n+\n+        curl -i \"http://localhost:5001/api/v0/refs?arg=QmPEKipMh6LsXzvtLxunSPP7ZsBM8y9xQ2SQQwBXy5UY6e\"\n+\n+    + Body\n+\n+        ```\n+        curl -i \"http://localhost:5001/api/v0/refs?arg=QmPEKipMh6LsXzvtLxunSPP7ZsBM8y9xQ2SQQwBXy5UY6e\"\n+        ```\n+\n++ Response 200\n+\n+    + Headers\n+\n+        ```\n+        Content-Type: application/json\n+        Trailer: X-Stream-Error\n+        Transfer-Encoding: chunked\n+        X-Chunked-Output: 1\n+        Date: Fri, 05 Feb 2016 17:31:52 GMT\n+        Transfer-Encoding: chunked\n+        ```\n+\n+    + Attributes\n+\n+    + Body\n+\n+        ```\n+        ```","path":"apiary.apib","position":121,"original_position":121,"commit_id":"60f1177779c9d3d276faab4d006672188f561350","original_commit_id":"60f1177779c9d3d276faab4d006672188f561350","user":{"login":"RichardLitt","id":910753,"avatar_url":"https://avatars.githubusercontent.com/u/910753?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardLitt","html_url":"https://github.com/RichardLitt","followers_url":"https://api.github.com/users/RichardLitt/followers","following_url":"https://api.github.com/users/RichardLitt/following{/other_user}","gists_url":"https://api.github.com/users/RichardLitt/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardLitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardLitt/subscriptions","organizations_url":"https://api.github.com/users/RichardLitt/orgs","repos_url":"https://api.github.com/users/RichardLitt/repos","events_url":"https://api.github.com/users/RichardLitt/events{/privacy}","received_events_url":"https://api.github.com/users/RichardLitt/received_events","type":"User","site_admin":false},"body":"To make it clear that an empty body is returned. How could this be done better?","created_at":"2016-02-05T18:59:34Z","updated_at":"2016-02-05T18:59:34Z","html_url":"https://github.com/ipfs/http-api-spec/pull/37#discussion_r52057594","pull_request_url":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/ipfs/http-api-spec/pulls/comments/52057594"},"html":{"href":"https://github.com/ipfs/http-api-spec/pull/37#discussion_r52057594"},"pull_request":{"href":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37","id":58461940,"html_url":"https://github.com/ipfs/http-api-spec/pull/37","diff_url":"https://github.com/ipfs/http-api-spec/pull/37.diff","patch_url":"https://github.com/ipfs/http-api-spec/pull/37.patch","issue_url":"https://api.github.com/repos/ipfs/http-api-spec/issues/37","number":37,"state":"open","locked":false,"title":"Added Group `refs`","user":{"login":"RichardLitt","id":910753,"avatar_url":"https://avatars.githubusercontent.com/u/910753?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardLitt","html_url":"https://github.com/RichardLitt","followers_url":"https://api.github.com/users/RichardLitt/followers","following_url":"https://api.github.com/users/RichardLitt/following{/other_user}","gists_url":"https://api.github.com/users/RichardLitt/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardLitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardLitt/subscriptions","organizations_url":"https://api.github.com/users/RichardLitt/orgs","repos_url":"https://api.github.com/users/RichardLitt/repos","events_url":"https://api.github.com/users/RichardLitt/events{/privacy}","received_events_url":"https://api.github.com/users/RichardLitt/received_events","type":"User","site_admin":false},"body":"Bugs:\r\n    - [ ] The `format` option has no effect on the output.\r\n    - [ ] If an argument is included, an `invalid ipfs paths ref` error is thrown,\r\n    although there is no possible valid ipfs paths ref.","created_at":"2016-02-05T17:53:10Z","updated_at":"2016-02-05T18:59:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb9f2c5d581aaff18ed8273a5dd680594b9feb70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37/commits","review_comments_url":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37/comments","review_comment_url":"https://api.github.com/repos/ipfs/http-api-spec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ipfs/http-api-spec/issues/37/comments","statuses_url":"https://api.github.com/repos/ipfs/http-api-spec/statuses/60f1177779c9d3d276faab4d006672188f561350","head":{"label":"ipfs:feature/refs","ref":"feature/refs","sha":"60f1177779c9d3d276faab4d006672188f561350","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":34368207,"name":"http-api-spec","full_name":"ipfs/http-api-spec","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/http-api-spec","description":"Apiary IPFS HTTP API description","fork":false,"url":"https://api.github.com/repos/ipfs/http-api-spec","forks_url":"https://api.github.com/repos/ipfs/http-api-spec/forks","keys_url":"https://api.github.com/repos/ipfs/http-api-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/http-api-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/http-api-spec/teams","hooks_url":"https://api.github.com/repos/ipfs/http-api-spec/hooks","issue_events_url":"https://api.github.com/repos/ipfs/http-api-spec/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/http-api-spec/events","assignees_url":"https://api.github.com/repos/ipfs/http-api-spec/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/http-api-spec/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/http-api-spec/tags","blobs_url":"https://api.github.com/repos/ipfs/http-api-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/http-api-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/http-api-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/http-api-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/http-api-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/http-api-spec/languages","stargazers_url":"https://api.github.com/repos/ipfs/http-api-spec/stargazers","contributors_url":"https://api.github.com/repos/ipfs/http-api-spec/contributors","subscribers_url":"https://api.github.com/repos/ipfs/http-api-spec/subscribers","subscription_url":"https://api.github.com/repos/ipfs/http-api-spec/subscription","commits_url":"https://api.github.com/repos/ipfs/http-api-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/http-api-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/http-api-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/http-api-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/http-api-spec/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/http-api-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/http-api-spec/merges","archive_url":"https://api.github.com/repos/ipfs/http-api-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/http-api-spec/downloads","issues_url":"https://api.github.com/repos/ipfs/http-api-spec/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/http-api-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/http-api-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/http-api-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/http-api-spec/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/http-api-spec/releases{/id}","deployments_url":"https://api.github.com/repos/ipfs/http-api-spec/deployments","created_at":"2015-04-22T04:17:56Z","updated_at":"2016-01-13T23:47:46Z","pushed_at":"2016-02-05T17:59:18Z","git_url":"git://github.com/ipfs/http-api-spec.git","ssh_url":"git@github.com:ipfs/http-api-spec.git","clone_url":"https://github.com/ipfs/http-api-spec.git","svn_url":"https://github.com/ipfs/http-api-spec","homepage":"http://docs.ipfs.apiary.io","size":106,"stargazers_count":11,"watchers_count":11,"language":"API Blueprint","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":11,"default_branch":"master"}},"base":{"label":"ipfs:master","ref":"master","sha":"393e5360fd9c5669170510f672716442fa15babf","user":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"repo":{"id":34368207,"name":"http-api-spec","full_name":"ipfs/http-api-spec","owner":{"login":"ipfs","id":10536621,"avatar_url":"https://avatars.githubusercontent.com/u/10536621?v=3","gravatar_id":"","url":"https://api.github.com/users/ipfs","html_url":"https://github.com/ipfs","followers_url":"https://api.github.com/users/ipfs/followers","following_url":"https://api.github.com/users/ipfs/following{/other_user}","gists_url":"https://api.github.com/users/ipfs/gists{/gist_id}","starred_url":"https://api.github.com/users/ipfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipfs/subscriptions","organizations_url":"https://api.github.com/users/ipfs/orgs","repos_url":"https://api.github.com/users/ipfs/repos","events_url":"https://api.github.com/users/ipfs/events{/privacy}","received_events_url":"https://api.github.com/users/ipfs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipfs/http-api-spec","description":"Apiary IPFS HTTP API description","fork":false,"url":"https://api.github.com/repos/ipfs/http-api-spec","forks_url":"https://api.github.com/repos/ipfs/http-api-spec/forks","keys_url":"https://api.github.com/repos/ipfs/http-api-spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipfs/http-api-spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipfs/http-api-spec/teams","hooks_url":"https://api.github.com/repos/ipfs/http-api-spec/hooks","issue_events_url":"https://api.github.com/repos/ipfs/http-api-spec/issues/events{/number}","events_url":"https://api.github.com/repos/ipfs/http-api-spec/events","assignees_url":"https://api.github.com/repos/ipfs/http-api-spec/assignees{/user}","branches_url":"https://api.github.com/repos/ipfs/http-api-spec/branches{/branch}","tags_url":"https://api.github.com/repos/ipfs/http-api-spec/tags","blobs_url":"https://api.github.com/repos/ipfs/http-api-spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipfs/http-api-spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipfs/http-api-spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipfs/http-api-spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipfs/http-api-spec/statuses/{sha}","languages_url":"https://api.github.com/repos/ipfs/http-api-spec/languages","stargazers_url":"https://api.github.com/repos/ipfs/http-api-spec/stargazers","contributors_url":"https://api.github.com/repos/ipfs/http-api-spec/contributors","subscribers_url":"https://api.github.com/repos/ipfs/http-api-spec/subscribers","subscription_url":"https://api.github.com/repos/ipfs/http-api-spec/subscription","commits_url":"https://api.github.com/repos/ipfs/http-api-spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipfs/http-api-spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipfs/http-api-spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipfs/http-api-spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipfs/http-api-spec/contents/{+path}","compare_url":"https://api.github.com/repos/ipfs/http-api-spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipfs/http-api-spec/merges","archive_url":"https://api.github.com/repos/ipfs/http-api-spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipfs/http-api-spec/downloads","issues_url":"https://api.github.com/repos/ipfs/http-api-spec/issues{/number}","pulls_url":"https://api.github.com/repos/ipfs/http-api-spec/pulls{/number}","milestones_url":"https://api.github.com/repos/ipfs/http-api-spec/milestones{/number}","notifications_url":"https://api.github.com/repos/ipfs/http-api-spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipfs/http-api-spec/labels{/name}","releases_url":"https://api.github.com/repos/ipfs/http-api-spec/releases{/id}","deployments_url":"https://api.github.com/repos/ipfs/http-api-spec/deployments","created_at":"2015-04-22T04:17:56Z","updated_at":"2016-01-13T23:47:46Z","pushed_at":"2016-02-05T17:59:18Z","git_url":"git://github.com/ipfs/http-api-spec.git","ssh_url":"git@github.com:ipfs/http-api-spec.git","clone_url":"https://github.com/ipfs/http-api-spec.git","svn_url":"https://github.com/ipfs/http-api-spec","homepage":"http://docs.ipfs.apiary.io","size":106,"stargazers_count":11,"watchers_count":11,"language":"API Blueprint","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":19,"forks":5,"open_issues":19,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37"},"html":{"href":"https://github.com/ipfs/http-api-spec/pull/37"},"issue":{"href":"https://api.github.com/repos/ipfs/http-api-spec/issues/37"},"comments":{"href":"https://api.github.com/repos/ipfs/http-api-spec/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/ipfs/http-api-spec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ipfs/http-api-spec/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/ipfs/http-api-spec/statuses/60f1177779c9d3d276faab4d006672188f561350"}}}}