Restart all devices in an application using the api

Hello,

Is it possible to “Restart all devices in an application using the api”?

Thanks

If you use the CLI the command is this one: https://www.balena.io/docs/reference/cli/#app-restart-name

You can also POST /application/:appId/restart making sure to include some sort of authentication, eg your JWT which can be retrieved from the Dashboard as a header like so: Authorization: Bearer $YOUR_JWT.

Thanks for the great answer.

The cli would be fine, but I tried and it does nothing =/. Other commands like balena apps returns just fine.

Can you try running the command with DEBUG=1, like so DEBUG=1 balena app restart MyApp, and share the output?

[debug] original argv0=“node” argv=[/Users/deoqc/.nvm/versions/node/v8.16.2/bin/node,/Users/deoqc/.nvm/versions/node/v8.16.2/bin/balena,app,restart,BlueMarlin] length=5

Hi there,

Just to clarify, are you trying to restart all containers on devices within an app, or rather reboot the device itself?

I would prefer justo to restart all containers on devices, but reboot is also ok.

Any idea?

Hey, it looks like there is an issue with the method of restarting the device containers with certain versions of the supervisor. We have identified the problem and should be patching it very soon. I’ll attach the internal ticket to this thread so once it closes we can let you know :slight_smile:

Thx very much.