From 27249c278555c46154d1e917e769dd3fb9d2dcfc Mon Sep 17 00:00:00 2001 From: Christina Wang Date: Mon, 18 Apr 2022 12:11:54 -0700 Subject: [PATCH] Explain /v2/state/status's status field in its response The status field does not indicate the current state of the Engine on the device. Rather, it only indicates whether the HTTP response returned successfully or not. To get the current state of the device, i.e. whether it has applied target state or not, use the `appState` field in the response. Change-type: patch Signed-off-by: Christina Wang --- docs/API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/API.md b/docs/API.md index 240b01cb..6b0390d3 100644 --- a/docs/API.md +++ b/docs/API.md @@ -747,6 +747,8 @@ Response: This will return a list of images, containers, the overall download progress and the status of the state engine. +> **Note:** The `status` field in the JSON response does not indicate the status of the device itself, but rather the status of the HTTP response. To get an accurate representation of whether the device state has settled, use the `appState` field. `appState` will be one of `applying` or `applied`. + From an app container: ```bash curl "$BALENA_SUPERVISOR_ADDRESS/v2/state/status?apikey=$BALENA_SUPERVISOR_API_KEY"