I’m trying to create a quick python script (using the remote API proxy) to reboot one of my units running in a specific application within balena cloud. I have referenced the following in the balena documentation:
My code looks like this (I have obfuscated the device uuid and bearer token):
I was wondering that same thing. I’m gonna see if I can maybe figure out how to do that.
I’m not a developer by trade, so some of these things aren’t necessarily obvious or easy for me to figure out :slight_smile
I think your problem is the Content-Type you are specifying.
When I try the proper call with cURL as documented, it works fine; when I change the Content-Type to application/js instead of application/json, I see the same response you are seeing.
I tried using Postman originally to generate the POST and looking at the CURL code snippet I saw this, which isn’t quite the same as what is posted in the balena API docs:
Haha! That worked using Postman TJvV! Thank you!
Now I’ll see if I can get it working using python. Should be a simple change.
Thank you SO much!
And thank you to rcooke-warwick as well!