From 751f9bfb04c7ad78434774fac51297275060e887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Colomb?= Date: Sun, 9 Jan 2022 18:53:42 +0100 Subject: [PATCH 1/4] rest: Remove bogus fields from connections API endpoint. Remove fields from the /rest/system/connections element "total" which are not populated and misleading. Removed in upcoming version. --- rest/system-connections-get.rst | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rest/system-connections-get.rst b/rest/system-connections-get.rst index c3dd13100..79a824e3c 100644 --- a/rest/system-connections-get.rst +++ b/rest/system-connections-get.rst @@ -2,7 +2,7 @@ GET /rest/system/connections ============================ -.. note:: Return format changed in 0.13.0. +.. note:: Return format changed in versions 0.13.0 and 1.19.0. Returns the list of configured devices and some metadata associated @@ -14,14 +14,9 @@ The connection types are ``TCP (Client)``, ``TCP (Server)``, ``Relay (Client)`` { "total" : { - "paused" : false, - "clientVersion" : "", "at" : "2015-11-07T17:29:47.691637262+01:00", - "connected" : false, "inBytesTotal" : 1479, - "type" : "", "outBytesTotal" : 1318, - "address" : "" }, "connections" : { "YZJBJFX-RDBL7WY-6ZGKJ2D-4MJB4E7-ZATSDUY-LD6Y3L3-MLFUYWE-AEMXJAC" : { From 76b547ebfd793b34bccf3362d5a217b11b919c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Colomb?= Date: Sun, 9 Jan 2022 19:16:13 +0100 Subject: [PATCH 2/4] Add missing field. --- rest/system-connections-get.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/rest/system-connections-get.rst b/rest/system-connections-get.rst index 79a824e3c..a397186bb 100644 --- a/rest/system-connections-get.rst +++ b/rest/system-connections-get.rst @@ -17,6 +17,7 @@ The connection types are ``TCP (Client)``, ``TCP (Server)``, ``Relay (Client)`` "at" : "2015-11-07T17:29:47.691637262+01:00", "inBytesTotal" : 1479, "outBytesTotal" : 1318, + "startedAt": "0001-01-01T00:00:00Z" }, "connections" : { "YZJBJFX-RDBL7WY-6ZGKJ2D-4MJB4E7-ZATSDUY-LD6Y3L3-MLFUYWE-AEMXJAC" : { From aea3ffdc1f444e02159fa26987eea0328d65c14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Colomb?= Date: Sun, 9 Jan 2022 22:57:46 +0100 Subject: [PATCH 3/4] Revert "Add missing field." This reverts commit 76b547ebfd793b34bccf3362d5a217b11b919c58. --- rest/system-connections-get.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/rest/system-connections-get.rst b/rest/system-connections-get.rst index a397186bb..79a824e3c 100644 --- a/rest/system-connections-get.rst +++ b/rest/system-connections-get.rst @@ -17,7 +17,6 @@ The connection types are ``TCP (Client)``, ``TCP (Server)``, ``Relay (Client)`` "at" : "2015-11-07T17:29:47.691637262+01:00", "inBytesTotal" : 1479, "outBytesTotal" : 1318, - "startedAt": "0001-01-01T00:00:00Z" }, "connections" : { "YZJBJFX-RDBL7WY-6ZGKJ2D-4MJB4E7-ZATSDUY-LD6Y3L3-MLFUYWE-AEMXJAC" : { From 218db757b0d14caca4549c7d1e61961ed67230d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Colomb?= Date: Sun, 9 Jan 2022 22:59:50 +0100 Subject: [PATCH 4/4] Add missing field startedAt. Was unintentionally left out in the actual API response. --- rest/system-connections-get.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rest/system-connections-get.rst b/rest/system-connections-get.rst index 79a824e3c..73da35861 100644 --- a/rest/system-connections-get.rst +++ b/rest/system-connections-get.rst @@ -24,6 +24,7 @@ The connection types are ``TCP (Client)``, ``TCP (Server)``, ``Relay (Client)`` "inBytesTotal" : 556, "paused" : false, "at" : "2015-11-07T17:29:47.691548971+01:00", + "startedAt" : "2015-11-07T00:09:47Z", "clientVersion" : "v0.12.1", "address" : "127.0.0.1:22002", "type" : "TCP (Client)", @@ -34,6 +35,7 @@ The connection types are ``TCP (Client)``, ``TCP (Server)``, ``Relay (Client)`` "type" : "", "address" : "", "at" : "0001-01-01T00:00:00Z", + "startedAt" : "0001-01-01T00:00:00Z", "clientVersion" : "", "paused" : false, "inBytesTotal" : 0, @@ -47,6 +49,7 @@ The connection types are ``TCP (Client)``, ``TCP (Server)``, ``Relay (Client)`` "inBytesTotal" : 0, "paused" : false, "at" : "0001-01-01T00:00:00Z", + "startedAt" : "0001-01-01T00:00:00Z", "clientVersion" : "" } }