I’m trying to use the Balena API to update the release assigned to a number of devices in my app, depending on the values of some of the tags I’ve assigned to the devices.
For example in the app ‘Jason’, I want to set the release for all devices with the tags ‘my.environment’ set to ‘debug’ and ‘my.location’ set to home.
Until quite recently I was using some code from: https://github.com/balena-io-projects/staged-releases at https://github.com/balena-io-projects/staged-releases/blob/master/update-test-group.sh to retrieve the devices, and issue a PATCH to update the release.
However, even the call at the bottom of that script has stopped working on v4 and v5 of the API. Issuing a GET on it returns “Malformed url”.
Is there a different working way to retrieve devices based on the values of tags attached to them?