whenever I use in a https request or try in terminal the command:
curl --header "Content-Type:application/json" "http://127.0.0.1:48484/v2/applications/7283883/restart-service?apikey=e53566a486aa4aad871963f2a3326c57" -d '{"serviceName": "venue"}'
it returns:
{"status":"failed","message":"Application is not available"}
I need a URL for the https and in the documentation it stated that I can use the BALENA_SUPERVISOR_ADDRESS
as a environment variable, what can I use?
I’m trying to execute from a container that isn’t HOST
Did you add the label io.balena.features.supervisor-api
to the container, as mentioned in the documentation? docker-compose.yml fields - Balena Documentation
io.balena.features.supervisor-api - Ensures that BALENA_SUPERVISOR_HOST, BALENA_SUPERVISOR_PORT, BALENA_SUPERVISOR_ADDRESS, and BALENA_SUPERVISOR_API_KEY are added to the container environment variables, so the supervisor API can be used.
Hi,
If I understand correctly, are you looking for an https address to do the restart-service
operation?
Our http://
supervisor endpoint runs fine; an example for wifi-connect
container on my device via container for another app with the following command:
Run from another container on the same device:
$> curl --header "Content-Type:application/json" "$BALENA_SUPERVISOR_ADDRESS/v2/applications/$BALENA_APP_ID/restart-service?apikey=$BALENA_SUPERVISOR_API_KEY" -d '{"serviceName": "wifi-connect"}'
Feel free to add more context and/or confirm on the above and we can help answer or direct to our specific team if needed.
Regards,
Nitish
Hello, following up per my colleague’s previous message. As mentioned, supervisor API interaction via containers are returning responses as expected. Can you clarify whether you are using for an https address to do the restart-service
operation or if you are looking for something else? Any additional context you can provide would be helpful for us in assisting you.