From bc6c5a1db8b9fd66b37a30c75d679930cab38431 Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Tue, 2 Feb 2016 17:21:57 -0500 Subject: [PATCH 1/2] Added Group `version` I was unable to get get any of the three options working. Are they available, @whyrusleeping? --- apiary.apib | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/apiary.apib b/apiary.apib index d401009..67f13e6 100644 --- a/apiary.apib +++ b/apiary.apib @@ -1083,6 +1083,54 @@ Outputs the list of peers that were removed. # Group update # Group version +Show version details about the ipfs node. + +## version [GET /version{&number,commit,repo}] +Returns the current version of ipfs and exits. + ++ Parameters + + number (boolean, optional) - Only show the version number + + commit (boolean, optional) - Show the commit hash + + repo (boolean, optional) - Show repo version + ++ Request + + #### curl + + curl -i http://localhost:5001/api/v0/version + + + Body + + ``` + curl -i http://localhost:5001/api/v0/version + ``` + ++ Response 200 + + + Headers + + ``` + Content-Type: application/json + Trailer: X-Stream-Error + Transfer-Encoding: chunked + Date: Tue, 02 Feb 2016 22:15:17 GMT + Transfer-Encoding: chunked + ``` + + + Attributes (object) + - Version: "0.4.0-dev" (string) + - Commit: "b036b23a233a64faa6a456522b0f45763be70e64" (string) + - Repo: "3" (string) + + + Body + + ``` + { + "Version": "0.4.0-dev", + "Commit": "", + "Repo": "3" + } + ``` # Data Structures From f09c019da3588cf218bdcba3355391911efedb8f Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Tue, 9 Feb 2016 14:21:12 -0500 Subject: [PATCH 2/2] Remove options, add quotes --- apiary.apib | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/apiary.apib b/apiary.apib index 67f13e6..4604e6a 100644 --- a/apiary.apib +++ b/apiary.apib @@ -1083,26 +1083,22 @@ Outputs the list of peers that were removed. # Group update # Group version -Show version details about the ipfs node. -## version [GET /version{&number,commit,repo}] -Returns the current version of ipfs and exits. +Show version details about the IPFS node. -+ Parameters - + number (boolean, optional) - Only show the version number - + commit (boolean, optional) - Show the commit hash - + repo (boolean, optional) - Show repo version +## version [GET /version] +Returns the current version of ipfs and exits. + Request #### curl - curl -i http://localhost:5001/api/v0/version + curl -i "http://localhost:5001/api/v0/version" + Body ``` - curl -i http://localhost:5001/api/v0/version + curl -i "http://localhost:5001/api/v0/version" ``` + Response 200