openBalena supervisor api proxy - No online device(s) found

hi,

i can access the api with curl, but when i use any ‘supervisor’ function it gives me:
No online device(s) found

Request:
curl -X POST --header “Content-Type:application/json” --header “Authorization: Bearer NSOfp5hrJC1SEnMMU37tEQxxxxxxxx” --data ‘{“uuid”: “f5ccxxx-is existing”}’ “https://api.balena.myURL.com/supervisor/v5/blink

i checked already:

  1. when i manipulate the token then the result is empty, so the token and access seems to be ok
  2. several urls - always the same result also if the url does not exist like …supervisor/abc

is there any restriction in openBalena?

Hi there,

I see you mention you’ve tried several requests/urls so maybe your example might be just a mixture of them all, but, I wanted to make sure that the URL you are using for blink has …/v1/blink and not …/v5/blink on it:

curl -X POST --header "Content-Type:application/json" --header "Authorization: Bearer NSOfp5hrJC1SEnMMU37tEQxxxxxxxx" --data '{"uuid": "f5ccxxx-is existing"}' "https://api.balena.myURL.com/supervisor/v1/blink"

I also wanted to ask you if your device is in y local network and if you have tried those requests from an application container (SSH-ing into it)
you can do as follows (requieres balena-cli):

  • sudo balena scan
  • balena ssh
  • (inside the device):

curl -X POST --header "Content-Type:application/json" \ "$BALENA_SUPERVISOR_ADDRESS/v1/blink?apikey=$BALENA_SUPERVISOR_API_KEY"

This can help you check that the supervisor is up and running property and try to isolate the problem either to the supervisor or the api configuration

I hope it helps, please come back to us if you need further help

Best regads

Hello I have the same problem but with reboot

curl -X POST --header "Content-Type:application/json" \ --header "Authorization: Bearer my-key" \ --data '{"uuid": "myuuid"}' \ "https://api.balena-cloud.com/supervisor/v1/reboot"

the device is not locally connected but I have configured ssh and I am able to access it with

balena ssh uuid
reboot

Can you help?

Hello,

as I can see the base URL that you try is api.balena-cloud.com which indicates that this is a balenaCloud connected device.
For debugging, can you please share the output of this request (obfuscated as you need):

$ curl -X POST --header "Content-Type:application/json" \
    --header "Authorization: Bearer <auth token>" \
    --data '{"uuid": "<uuid>", "method": "GET"}' \
    "https://api.balena-cloud.com/supervisor/v1/device"

Can you please also share the output of your initial request?

Thanks for providing more details and best regards
Harald