Commit Graph

23 Commits

Author SHA1 Message Date
Pablo Carranza Velez
0e7bb77c41 docs: clarify that open connections will not be closed when configuring a proxy, and change all proxy API examples to use uuid
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-18 19:07:00 -03:00
Pablo Carranza Velez
0960d947ed Add documentation for the /v1/device/host-config endpoint
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-18 18:28:05 -03:00
Pablo Carranza Velez
95bbe6ea49 Add a /v1/healthy endpoint that fails if the supervisor is unhealthy, and a HEALTHCHECK command to the Dockerfile that uses it
We add an endpoint to the supervisor API that checks the following conditions to determine whether the supervisor is healthy:
* That the update cycle has run fully, in a time that's less than twice the poll interval. Unless we're downloading an image, in which case
we assume it's healthy (otherwise we'd get into the issue of determining a reasonable timeout for the image download, which is already done in a configurable way with delta options and the like).
* That the current state report to the Resin API hasn't failed more than 3 times. Unless the device has no connectivity, or the connectivity check is disabled, in which case we don't know
if the report failed simply because there's no network.
* That the gosuper component is working (since we periodically hit its API to get the IP addresses, we mark it as not working if this API call fails).

We need this endpoint to be unauthenticated for the docker daemon to be able to hit it (though, as the rest of the API, it is protected with iptables rules).

Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-12-11 00:11:56 -08:00
Pablo Carranza Velez
42ac7487e7 When the device is about to reboot or shutdown, close the API server and avoid applying updates
We mark when the device is rebooting and avoid some steps in the update cycle that change the device
state, similarly to when the device is in local mode, to avoid problems with non-atomic operations.
This doesn't solve *all* the potential scenarios of a reboot happening in the middle of an update, but at least
should prevent the case where we start an app container and reboot the device before saving the containerId, potentially
causing a duplicated container issue.

We also correct the API docs to reflect the 202 response when reboot or shutdown are successful.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-27 20:07:24 -03:00
Horia Delicoti
ff632e811c docs/API.md: Fix documentation command sent via the API proxy for POST /v1/update.
Change-Type: patch
Signed-off-by: Horia Delicoti <horia.delicoti@gmail.com>
2017-04-11 08:09:27 +02:00
Pablo Carranza Vélez
55a8f897e8 Fix docs
Do not document the container management endpoints, as the API can and will probably have changes soon
2016-08-15 23:07:00 +02:00
Pablo Carranza Velez
534035e7ae Changelog and docs for /v1/images/load 2016-05-19 13:27:59 +00:00
Pablo Carranza Velez
55870b16b1 Changelog and docs for image and container endpoints 2016-05-16 09:52:48 -03:00
Kostas Lekkas
8577280dc5 Merge pull request #126 from resin-io/add-stop-start-endpoints
WIP: Add stop, start and get app endpoints
2016-04-25 13:27:08 +03:00
Kostas Lekkas
cca41e8271 Minor API doc fix 2016-04-20 17:56:02 +03:00
Kostas Lekkas
757e5b3244 Return container Id from the /v1/start and /v1/stop endpoints 2016-04-20 15:49:22 +03:00
Kostas Lekkas
49d0ff55f4 Small API doc fix for /v1/start endpoint 2016-04-20 14:54:00 +03:00
Pablo Carranza Velez
1c69f14e82 Refactor into /apps/:appId endpoint namespace, and add endpoint to GET the app 2016-04-16 13:52:38 -03:00
Pagan Gazzard
135365cf37 Remove the old terminal code, since it has been replaced by v2 which does not require supervisor support. 2016-04-15 23:36:28 +01:00
Pablo Carranza Velez
7161564123 Add /v1/stop and /v1/start endpoints 2016-04-08 16:51:39 -03:00
Craig Mulligan
746e24aedc typo 2016-03-31 16:54:24 +01:00
Craig Mulligan
2f2c75a02b Add clause
Amend according to Pablo's comments
2016-03-31 16:52:47 +01:00
Craig Mulligan
bbcca77812 Add intro align with current resin.io docs
Resin.io docs are pulling this file when ever they are updated to keep official docs site in sync. So need to add intro paragraph to give context.
2016-03-31 13:50:19 +01:00
Pablo Carranza Velez
d6dcaa3ac5 Document that commit is also present in the device state endpoint 2016-02-18 16:53:16 +00:00
Pablo Carranza Velez
a4b08e389e Add more update-related fields to the GET /v1/device endpoint 2016-02-18 16:53:15 +00:00
Pablo Carranza Velez
d0c76aec0f Use a closure for device state and also report in GET /v1/device whether there's a pending update 2016-02-18 16:53:15 +00:00
Pablo Carranza Velez
670f318c39 Add endpoint to get device state 2016-02-18 16:53:15 +00:00
Pablo Carranza Vélez
dbbca98689 Document API and update locking 2015-10-14 12:15:46 -03:00