I would like to display the currently installed relase on the balena device UI but I’m having issues identifying it.
I can get the guid from either:
curl “$BALENA_SUPERVISOR_ADDRESS/v2/applications/state?apikey=$BALENA_SUPERVISOR_API_KEY”
or
curl “$BALENA_SUPERVISOR_ADDRESS/v2/state/status?apikey=$BALENA_SUPERVISOR_API_KEY”
but I cant translate this to match the displayed current version in the balena web ui.
I appreciate the web ui displays the guid if i mouse over/ look into the releases
but I can’t see how to get that from within the container.
Any help would be greatly appreciated!
Hi, I’ve reached out to some Supervisor dev colleagues with regards to returning the semver displaying in the UI with the commit where possible in the Supervisor. I’ve raised a github issue here: Should return release `raw_version` where possible if returning `commit` · Issue #2159 · balena-os/balena-supervisor · GitHub
However, it would probably be better to try to get info about the release by using the API. You should be able to achieve that by running something like the following command, where the property you want if you are referring to the one displaying on the dashboard is raw_version
:
curl -X GET "https://api.balena-staging.com/v6/device(uuid=<DEVICE_UUID>)?$select=id&$expand=is_running__release($select=raw_version)" -H "Content-Type: application/json" -H "Authorization: Bearer <AUTH_TOKEN>"
1 Like
Hi, just following up, did the suggestion I provided above help you in identifying the running release from inside a container?
Thanks for following up, ye I managed to use your suggestion to get the versoin number.