Commit Graph

55 Commits

Author SHA1 Message Date
Matthew McGinn
f9a157c9ec typos: seperate -> separate
mainly to get the docs one, but figured i could hit them all

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2021-03-17 14:27:53 -04:00
Miguel Casqueira
c64d3cb216 Clarify when update_pending in /v1/device is true
Change-type: patch
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-10-30 18:46:22 -04:00
Nitish Agarwal
82dda7d852 Fixes documentation - ping doesn't need apiKey and minor documentation formatting changes.
Change-Type: patch
Signed-off-by: Nitish Agarwal <1592163+nitishagar@users.noreply.github.com>
Co-authored-by: xginn8 <xginn8@users.noreply.github.com>
2020-07-31 23:38:21 +05:30
Rich Bayliss
1b91ef3405
state: Report device MAC address to the API
When reporting device information, send the MAC address of any
interfaces on the system. Also expose in the Supervisor API at
the route GET /v1/device.

Change-type: patch
Signed-off-by: Rich Bayliss <rich@balena.io>
2020-06-22 10:41:06 +01:00
Miguel Casqueira
8295858b32 Added endpoint to check if VPN is connected
Change-type: minor
Signed-off-by: Miguel Casqueira <miguel@balena.io>
2020-05-11 21:21:44 -04:00
Cameron Diver
3ff3bce605 Allow getting the target state when not in local mode
Change-type: patch
Closes: #1176
Signed-off-by: Cameron Diver <cameron@balena.io>
2020-01-30 11:24:59 +00:00
Cameron Diver
da0534b3c8 Add usage example repo to documentation
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 18:33:47 +01:00
Cameron Diver
48bccd34db Add journald format flag
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 15:02:05 +01:00
Cameron Diver
2d924b83fc Update documentation and explicitly unpipe journald stream
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-21 15:02:05 +01:00
Matthew McGinn
8c9f974b07 docs: fix up typo "sucess" -> "success"
Related to https://github.com/balena-io/docs/pull/1065

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-08-09 16:36:57 +02:00
Cameron Diver
1794b334a0
Fix version documentation for journald endpoint
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-09 12:48:06 +01:00
Cameron Diver
43cbf7dbba
Add an endpoint and module for reading journald logs
Change-type: minor
Closes: #1003
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-08-09 11:08:29 +01:00
Matthew McGinn
f2bb8a768e docs: update APPID to BALENA_APP_ID as exposed from the env
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-07-24 23:40:31 +01:00
Cameron Diver
3304825216 Add a supervisor endpoint to cleanup orphaned volumes
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-07-10 14:25:44 +01:00
Matthew McGinn
baa0e87513 docs: fix up broken meta-balena proxy link
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-07-10 10:11:46 +02:00
Matthew McGinn
acb38dfcfa docs: make headers consistent
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-05-07 00:41:58 +08:00
Matthew McGinn
331b109a64 docs: fix up some stray resin references
Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
2019-05-03 18:58:56 +08:00
Cameron Diver
b922789dee
device-api: Add v2/device/tags api endpoint
This endpoint will fetch the device tags from the balena api

Change-type: minor
Closes: #890
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 14:21:23 +00:00
Cameron Diver
3f231e8ff3
device-api: Add v2/device/name endpoint
This endpoint returns the last known device name from the API. This
differs from the BALENA_DEVICE_NAME_AT_INIT env var because this will
not change throughout the runtime of the container.

Closes: #908
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-13 14:21:22 +00:00
Cameron Diver
d9bc26bd83
docs: Standardise naming and json in api documentation
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-11 16:39:06 +00:00
Cameron Diver
4a17f704ab
docs: Add documentation for v2/state/status endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-03-11 16:24:44 +00:00
Heds Simons
79e7fb0b93
docs: Clarify Supervisor envvars exposure via label
Connects-to: #830
Change-type: patch
Signed-off-by: Heds Simons <heds@whaleway.net>
2018-12-04 16:38:26 +00:00
Pablo Carranza Velez
7fe94ec115 docs: Clarify that older supervisors use RESIN_ variables
We add a note on state endpoint docs to use RESIN_ variables. Since users will likely navigate directly to each endpoint, we add the note on the docs for each endpoint, except for endpoints added in >= 7.21.0 (since that version never made it to production).

We also switch some variables that were still referenced as RESIN_ to now use BALENA_.

Change-type: patch
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-11-30 14:45:10 -03:00
Cameron Diver
311eaf0ac0
device-api: Add container id endpoint
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2018-11-28 16:44:19 +00:00
hippolyt
04ec6d1379
Appended API example
Added api proxy example to /supervisor/v2/applications/state

Change-type: patch
2018-11-07 10:22:15 +00:00
Cameron Diver
3ad8700066
doc: Add documentation for supervisor endpoints added after v7
Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-11-06 13:13:06 +00:00
Pablo Carranza Velez
8298487a88 Rename most of the documentation and variable names from resin to balena
Change-type: minor
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-11-01 17:00:13 -07:00
Pablo Carranza Velez
87a8d8f8f4 Env var changes in API docs, new private env vars, remove unused vars
We update the supervisor API docs to reflect the new `BALENA_` injected env vars.
We also add the new sensitive env vars to the list of vars not sent by the API.

And we remove the unused RESIN_DATA_PATH and RESIN_PROXYVISOR_HOOK_RECEIVER from the
vars the supervisor parses from its own environment.

Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-10-16 15:12:05 +02:00
Cameron Diver
409a582507
Docs: Add documentation for the v2/applications/state endpoint
Change-type: patch
Closes: #719
Signed-off-by: Cameron Diver <cameron@resin.io>
2018-08-13 10:51:32 +01:00
Tim Perry
2586ab3677 Update docs with multicontainer API breakages
Change-Type: patch
2018-05-11 17:36:12 +02:00
Pablo Carranza Velez
348ff66cee
Replace the gosuper component with a node module that handles communication with systemd, and stop using an init system in the supervisor container
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-22 15:55:15 +00:00
Pablo Carranza Velez
5d7d99c258 Document that the update lock can be forced on reboots and shutdowns
Closes #373
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-19 16:30:59 -03:00
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