mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 16:35:23 +00:00
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>
This commit is contained in:
parent
802025c01f
commit
87a8d8f8f4
94
docs/API.md
94
docs/API.md
@ -1,6 +1,6 @@
|
||||
# Interacting with the Resin Supervisor
|
||||
# Interacting with the balena Supervisor
|
||||
|
||||
The Resin Supervisor is resin.io's agent that runs on devices. Its main role is to ensure your app is running, and keep communications with the Resin API server.
|
||||
The balena Supervisor is balena's agent that runs on devices. Its main role is to ensure your app is running, and keep communications with the balenaCloud API server.
|
||||
|
||||
The Supervisor itself has its own API, with means for user applications to communicate and execute some special actions that affect the host OS or the application itself. There are two main ways for the application to interact with the Supervisor: the update lockfile and the HTTP API.
|
||||
|
||||
@ -8,13 +8,13 @@ Only Supervisors after version 1.1.0 have this functionality, and some of the en
|
||||
|
||||
## HTTP API reference
|
||||
|
||||
The supervisor exposes an HTTP API on port 48484 (`RESIN_SUPERVISOR_PORT`).
|
||||
The supervisor exposes an HTTP API on port 48484 (`BALENA_SUPERVISOR_PORT`).
|
||||
|
||||
**All endpoints require an apikey parameter, which is exposed to the application as `RESIN_SUPERVISOR_API_KEY`.**
|
||||
**All endpoints require an apikey parameter, which is exposed to the application as `BALENA_SUPERVISOR_API_KEY`.**
|
||||
|
||||
The full address for the API, i.e. `"http://127.0.0.1:48484"`, is available as `RESIN_SUPERVISOR_ADDRESS`. **Always use these variables when communicating via the API, since address and port could change**.
|
||||
The full address for the API, i.e. `"http://127.0.0.1:48484"`, is available as `BALENA_SUPERVISOR_ADDRESS`. **Always use these variables when communicating via the API, since address and port could change**.
|
||||
|
||||
Alternatively, the Resin API (api.resin.io) has a proxy endpoint at `POST /supervisor/<url>` (where `<url>` is one of the API URLs described below) from which you can send API commands to the supervisor remotely, using your Auth Token instead of your API key. Commands sent through the proxy can specify either an `appId` to send the request to all devices in an application, or a `deviceId` or `uuid` to send to a particular device. These requests default to POST unless you specify a `method` parameter (e.g. "GET"). In the examples below, we show how to use a uuid to specify a device, but in any of those you can replace `uuid` for a `deviceId` or `appId`.
|
||||
Alternatively, the balena API (api.balena-cloud.com) has a proxy endpoint at `POST /supervisor/<url>` (where `<url>` is one of the API URLs described below) from which you can send API commands to the supervisor remotely, using your Auth Token instead of your API key. Commands sent through the proxy can specify either an `appId` to send the request to all devices in an application, or a `deviceId` or `uuid` to send to a particular device. These requests default to POST unless you specify a `method` parameter (e.g. "GET"). In the examples below, we show how to use a uuid to specify a device, but in any of those you can replace `uuid` for a `deviceId` or `appId`.
|
||||
|
||||
The API is versioned (currently at v1), except for `/ping`.
|
||||
|
||||
@ -32,7 +32,7 @@ Responds with a simple "OK", signaling that the supervisor is alive and well.
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X GET --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/ping?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/ping?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
Response:
|
||||
```none
|
||||
@ -44,7 +44,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "method": "GET"}' \
|
||||
"https://api.resin.io/supervisor/ping"
|
||||
"https://api.balena-cloud.com/supervisor/ping"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -58,7 +58,7 @@ Responds with an empty 200 response. It implements the "identify device" feature
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/blink?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/blink?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
(Empty response)
|
||||
@ -68,7 +68,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>}' \
|
||||
"https://api.resin.io/supervisor/v1/blink"
|
||||
"https://api.balena-cloud.com/supervisor/v1/blink"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -92,7 +92,7 @@ From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--data '{"force": true}' \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/update?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/update?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
(Empty response)
|
||||
|
||||
@ -101,7 +101,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "data": {"force": true}}' \
|
||||
"https://api.resin.io/supervisor/v1/update"
|
||||
"https://api.balena-cloud.com/supervisor/v1/update"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -127,7 +127,7 @@ Can contain a `force` property, which if set to `true` will cause the update loc
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/reboot?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/reboot?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
Response:
|
||||
```json
|
||||
@ -139,7 +139,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>}' \
|
||||
"https://api.resin.io/supervisor/v1/reboot"
|
||||
"https://api.balena-cloud.com/supervisor/v1/reboot"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -165,7 +165,7 @@ Can contain a `force` property, which if set to `true` will cause the update loc
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/shutdown?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/shutdown?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
Response:
|
||||
|
||||
@ -178,7 +178,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>}' \
|
||||
"https://api.resin.io/supervisor/v1/shutdown"
|
||||
"https://api.balena-cloud.com/supervisor/v1/shutdown"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -211,7 +211,7 @@ From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--data '{"appId": <appId>}' \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/purge?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/purge?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
Response:
|
||||
|
||||
@ -224,7 +224,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "data": {"appId": <appId>}}' \
|
||||
"https://api.resin.io/supervisor/v1/purge"
|
||||
"https://api.balena-cloud.com/supervisor/v1/purge"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -252,7 +252,7 @@ From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--data '{"appId": <appId>}' \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/restart?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/restart?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
@ -267,18 +267,18 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "data": {"appId": <appId>}}' \
|
||||
"https://api.resin.io/supervisor/v1/restart"
|
||||
"https://api.balena-cloud.com/supervisor/v1/restart"
|
||||
```
|
||||
|
||||
### POST /v1/regenerate-api-key
|
||||
|
||||
Invalidates the current `RESIN_SUPERVISOR_API_KEY` and generates a new one. Responds with the new API key, but **the application will be restarted on the next update cycle** to update the API key environment variable.
|
||||
Invalidates the current `BALENA_SUPERVISOR_API_KEY` and generates a new one. Responds with the new API key, but **the application will be restarted on the next update cycle** to update the API key environment variable.
|
||||
|
||||
#### Examples:
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/regenerate-api-key?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/regenerate-api-key?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
@ -292,7 +292,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>}' \
|
||||
"https://api.resin.io/supervisor/v1/regenerate-api-key"
|
||||
"https://api.balena-cloud.com/supervisor/v1/regenerate-api-key"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -300,7 +300,7 @@ $ curl -X POST --header "Content-Type:application/json" \
|
||||
### GET /v1/device
|
||||
|
||||
Introduced in supervisor v1.6.
|
||||
Returns the current device state, as reported to the Resin API and with some extra fields added to allow control over pending/locked updates.
|
||||
Returns the current device state, as reported to the balenaCloud API and with some extra fields added to allow control over pending/locked updates.
|
||||
The state is a JSON object that contains some or all of the following:
|
||||
* `api_port`: Port on which the supervisor is listening.
|
||||
* `commit`: Hash of the current commit of the application that is running.
|
||||
@ -309,9 +309,9 @@ The state is a JSON object that contains some or all of the following:
|
||||
* `download_progress`: Amount of the application image that has been downloaded, expressed as a percentage. If the update has already been downloaded, this will be `null`.
|
||||
* `os_version`: Version of the host OS running on the device.
|
||||
* `supervisor_version`: Version of the supervisor running on the device.
|
||||
* `update_pending`: This one is not reported to the Resin API. It's a boolean that will be true if the supervisor has detected there is a pending update.
|
||||
* `update_downloaded`: Not reported to the Resin API either. Boolean that will be true if a pending update has already been downloaded.
|
||||
* `update_failed`: Not reported to the Resin API. Boolean that will be true if the supervisor has tried to apply a pending update but failed (i.e. if the app was locked, there was a network failure or anything else went wrong).
|
||||
* `update_pending`: This one is not reported to the balenaCloud API. It's a boolean that will be true if the supervisor has detected there is a pending update.
|
||||
* `update_downloaded`: Not reported to the balenaCloud API either. Boolean that will be true if a pending update has already been downloaded.
|
||||
* `update_failed`: Not reported to the balenaCloud API. Boolean that will be true if the supervisor has tried to apply a pending update but failed (i.e. if the app was locked, there was a network failure or anything else went wrong).
|
||||
|
||||
Other attributes may be added in the future, and some may be missing or null if they haven't been set yet.
|
||||
|
||||
@ -319,7 +319,7 @@ Other attributes may be added in the future, and some may be missing or null if
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X GET --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/device?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/device?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
Response:
|
||||
```json
|
||||
@ -331,7 +331,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "method": "GET"}' \
|
||||
"https://api.resin.io/supervisor/v1/device"
|
||||
"https://api.balena-cloud.com/supervisor/v1/device"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -356,7 +356,7 @@ From the app on the device:
|
||||
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/apps/<appId>/stop?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/apps/<appId>/stop?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
@ -371,7 +371,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>}' \
|
||||
"https://api.resin.io/supervisor/v1/apps/<appId>/stop"
|
||||
"https://api.balena-cloud.com/supervisor/v1/apps/<appId>/stop"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -392,7 +392,7 @@ From the app on the device:
|
||||
|
||||
```bash
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/apps/<appId>/start?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/apps/<appId>/start?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
@ -407,7 +407,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>}' \
|
||||
"https://api.resin.io/supervisor/v1/apps/<appId>/start"
|
||||
"https://api.balena-cloud.com/supervisor/v1/apps/<appId>/start"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -417,7 +417,7 @@ $ curl -X POST --header "Content-Type:application/json" \
|
||||
Introduced in supervisor v1.8.
|
||||
Returns the application running on the device
|
||||
The app is a JSON object that contains the following:
|
||||
* `appId`: The id of the app as per the Resin API.
|
||||
* `appId`: The id of the app as per the balenaCloud API.
|
||||
* `commit`: Application commit that is running.
|
||||
* `imageId`: The docker image of the current application build.
|
||||
* `containerId`: ID of the docker container of the running app.
|
||||
@ -431,11 +431,11 @@ This is only supported on single-container devices, and will return 400 on devic
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl -X GET --header "Content-Type:application/json" \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/apps/<appId>?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/apps/<appId>?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
Response:
|
||||
```json
|
||||
{"appId": 3134,"commit":"414e65cd378a69a96f403b75f14b40b55856f860","imageId":"registry.resin.io/superapp/414e65cd378a69a96f403b75f14b40b55856f860","containerId":"e5c1eace8b4e","env":{"FOO":"bar"}}
|
||||
{"appId": 3134,"commit":"414e65cd378a69a96f403b75f14b40b55856f860","imageId":"registry.balena-cloud.com/superapp/414e65cd378a69a96f403b75f14b40b55856f860","containerId":"e5c1eace8b4e","env":{"FOO":"bar"}}
|
||||
```
|
||||
|
||||
Remotely via the API proxy:
|
||||
@ -443,7 +443,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "method": "GET"}' \
|
||||
"https://api.resin.io/supervisor/v1/apps/<appId>"
|
||||
"https://api.balena-cloud.com/supervisor/v1/apps/<appId>"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -453,7 +453,7 @@ $ curl -X POST --header "Content-Type:application/json" \
|
||||
Added in supervisor v6.5.0.
|
||||
|
||||
Used internally to check whether the supervisor is running correctly, according to some heuristics that help determine
|
||||
whether the internal components, application updates and reporting to the Resin API are functioning.
|
||||
whether the internal components, application updates and reporting to the balenaCloud API are functioning.
|
||||
|
||||
Responds with an empty 200 response if the supervisor is healthy, or a 500 status code if something is not working
|
||||
correctly.
|
||||
@ -461,7 +461,7 @@ correctly.
|
||||
#### Examples:
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl "$RESIN_SUPERVISOR_ADDRESS/v1/healthy"
|
||||
$ curl "$BALENA_SUPERVISOR_ADDRESS/v1/healthy"
|
||||
```
|
||||
(Empty response)
|
||||
|
||||
@ -470,7 +470,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "method": "GET"}' \
|
||||
"https://api.resin.io/supervisor/v1/healthy"
|
||||
"https://api.balena-cloud.com/supervisor/v1/healthy"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -508,9 +508,9 @@ without changing proxy settings and viceversa.
|
||||
|
||||
In the proxy settings, `type`, `ip`, `port`, `login` and `password` are the settings for the proxy redirector to
|
||||
be able to connnect to the proxy, based on how [redsocks.conf](https://github.com/darkk/redsocks/blob/master/redsocks.conf.example) works. `type` can be `socks4`, `socks5`, `http-connect` or `http-relay` (not all proxies are
|
||||
guaranteed to work, especially if they block connections that the resin services may require).
|
||||
guaranteed to work, especially if they block connections that the balena services may require).
|
||||
|
||||
Keep in mind that, even if transparent proxy redirection will take effect immediately after the API call (i.e. all new connections will go through the proxy), open connections will not be closed. So, if for example, the device has managed to connect to the resin VPN without the proxy, it will stay connected directly without trying to reconnect through the proxy, unless the connection breaks - any reconnection attempts will then go through the proxy. To force *all* connections to go through the proxy, the best way is to reboot the device (see the /v1/reboot endpoint). In most networks were no connections to the Internet can be made if not through a proxy, this should not be necessary (as there will be no open connections before configuring the proxy settings).
|
||||
Keep in mind that, even if transparent proxy redirection will take effect immediately after the API call (i.e. all new connections will go through the proxy), open connections will not be closed. So, if for example, the device has managed to connect to the balenaCloud VPN without the proxy, it will stay connected directly without trying to reconnect through the proxy, unless the connection breaks - any reconnection attempts will then go through the proxy. To force *all* connections to go through the proxy, the best way is to reboot the device (see the /v1/reboot endpoint). In most networks were no connections to the Internet can be made if not through a proxy, this should not be necessary (as there will be no open connections before configuring the proxy settings).
|
||||
|
||||
The "noProxy" setting for the proxy is an optional array of IP addresses/subnets that should not be routed through the
|
||||
proxy. Keep in mind that local/reserved subnets are already [excluded by resinOS automatically](https://github.com/resin-os/meta-resin/blob/master/meta-resin-common/recipes-connectivity/resin-proxy-config/resin-proxy-config/resin-proxy-config#L48).
|
||||
@ -522,7 +522,7 @@ From the app on the device:
|
||||
```bash
|
||||
$ curl -X PATCH --header "Content-Type:application/json" \
|
||||
--data '{"network": {"hostname": "newhostname"}}' \
|
||||
"$RESIN_SUPERVISOR_ADDRESS/v1/device/host-config?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
"$BALENA_SUPERVISOR_ADDRESS/v1/device/host-config?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
@ -535,7 +535,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "method": "PATCH", "data": {"network": {"hostname": "newhostname"}}}' \
|
||||
"https://api.resin.io/supervisor/v1/device/host-config"
|
||||
"https://api.balena-cloud.com/supervisor/v1/device/host-config"
|
||||
```
|
||||
|
||||
<hr>
|
||||
@ -552,7 +552,7 @@ Please refer to the PATCH endpoint above for details on the behavior and meaning
|
||||
#### Examples:
|
||||
From the app on the device:
|
||||
```bash
|
||||
$ curl "$RESIN_SUPERVISOR_ADDRESS/v1/device/host-config?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
$ curl "$BALENA_SUPERVISOR_ADDRESS/v1/device/host-config?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
@ -565,7 +565,7 @@ Remotely via the API proxy:
|
||||
$ curl -X POST --header "Content-Type:application/json" \
|
||||
--header "Authorization: Bearer <auth token>" \
|
||||
--data '{"uuid": <uuid>, "method": "GET"}' \
|
||||
"https://api.resin.io/supervisor/v1/device/host-config"
|
||||
"https://api.balena-cloud.com/supervisor/v1/device/host-config"
|
||||
```
|
||||
|
||||
### GET /v2/applications/state
|
||||
@ -577,7 +577,7 @@ current state of the supervisor, and not the target state.
|
||||
|
||||
From the user container:
|
||||
```bash
|
||||
$ curl "$RESIN_SUPERVISOR_ADDRESS/v2/applications/state?apikey=$RESIN_SUPERVISOR_API_KEY"
|
||||
$ curl "$BALENA_SUPERVISOR_ADDRESS/v2/applications/state?apikey=$BALENA_SUPERVISOR_API_KEY"
|
||||
```
|
||||
|
||||
Response:
|
||||
|
@ -18,13 +18,13 @@ const constants = {
|
||||
privateAppEnvVars: [
|
||||
'RESIN_SUPERVISOR_API_KEY',
|
||||
'RESIN_API_KEY',
|
||||
'BALENA_SUPERVISOR_API_KEY',
|
||||
'BALENA_API_KEY',
|
||||
],
|
||||
dataPath: checkString(process.env.RESIN_DATA_PATH) || '/resin-data',
|
||||
bootMountPointFromEnv,
|
||||
bootMountPoint: bootMountPointFromEnv || '/boot',
|
||||
configJsonPathOnHost: checkString(process.env.CONFIG_JSON_PATH),
|
||||
proxyvisorHookReceiver:
|
||||
checkString(process.env.RESIN_PROXYVISOR_HOOK_RECEIVER) || 'http://0.0.0.0:1337',
|
||||
proxyvisorHookReceiver: 'http://0.0.0.0:1337',
|
||||
configJsonNonAtomicPath: '/boot/config.json',
|
||||
defaultMixpanelToken: process.env.DEFAULT_MIXPANEL_TOKEN,
|
||||
supervisorNetworkInterface: supervisorNetworkInterface,
|
||||
|
Loading…
x
Reference in New Issue
Block a user