I am trying to automate some stuff with the balena API (v4).
So far every call worked, but I am running into problems with device related GET calls.
While I can set device config, environment and service variables, I always get a Database Error when trying to get the variables with e.g. the following command:
Hm, that one worked, so I gotta URL encode the “\$”? It works without enconding on the other endpoints
Thanks for the quick fix!
You might want to request someone to change the documentation if its intended to be encoded though
As a quick follow-up, it seems that replacing \$ with the encoded version in other queries will yield weird results. As it seems for example filters will not work, so this encoding behavior seems specific to only some of the requests.
Alright, that explains a lot actually. Thanks for getting back to me.
So my original error was just the fairly stupid assumption of the device ID being the device’s UUID.
The error with the encoded version of the URL is then probably that the backslash was encoded as well, maybe escaping the dollar sign at some deeper level instead of just in bash, hence making the filter function not work properly.
Thanks for all the quick help and have a great day!
Tarek