SDK for within a container

Having trawled the literature, I couldn’t find an SDK for controlling the supervisor from within a device container. Is the only means of doing so via curl?

Hi there,

As mentioned in the docs for the supervisor API (https://www.balena.io/docs/reference/supervisor/supervisor-api/), there is in fact an API for that interaction. You can use any HTTP request library you like to communicate with the supervisor, though we do not maintain an SDK for that interface. The examples all use cURL as a simple case that is available in most images, but really it’s just a way to showcase the schema and structure of the API.

Do note that you’ll need to add the io.balena.features.supervisor-api label to your container(s), and then you can access the API at $BALENA_SUPERVISOR_ADDRESS.

Thanks for the time to respond. We have all been there, where we start something new to later find out it has been done already, so appreciate the clarification.

I tried to put something together, provided here for anyone interested in improving it for their own use: Supervisor / wifi-connect web API