Web API Not returning any results.
Hi,
Would really appreciate if someone who understand the controller API better than I could offer some insight, from everything I have read this should work, but no matter what I try I get an empty response.
I do this to get a token and cookie:
/usr/bin/curl -sk --connect-timeout 10 -c ./omada_cookie.txt -X POST https://192.168.60.146:443/api/v2/login -H 'Content-Type: application/json' -d '{"username": "apiuser", "password": "apiuser99"}'
It returns successfully and the two files are populated (script populates a file with the token that is read for the next step)
{"errorCode":0,"msg":"Log in successfully.","result":{"omadacId":"f5f6c0bbbd3556474933e0b3a9f9e0e1","token":"SECRET_TOKEN_RESPONSE"}}
Then I try to use those two files to interrogate further, but I always get an empty response, can anyone see what I am doing wrong, I have spent waaaay to long on this! :)
/usr/bin/curl -sk --connect-timeout 10 -b ./omada_cookie.txt -H 'Authorization: Bearer SECRET_TOKEN_RESPONSE' -H 'Content-Type: application/json' https://192.168.60.146:443/api/v2/sites
Nothing is returned, not even an error.
Stuck!