1
19.1 Legacy Series / Re: Trouble with using API
« on: March 21, 2019, 10:00:33 am »
Sorry Franco, i didn't want nerve you and your team seen witch great work you do, i only thought that more people are using API and could help resolve the problem.
Now i resolved it. The problem was, that i was using curl from windows and windows has since ever trouble with quotas respectively double quotas so the solution for windowsuser is to enter change the -d in "{\"upgrade\":\"all\"}" so the single quotas should be replaced with double quotas and the double quotas will be escaped.
curl -XPOST -d "{\"upgrade\":\"all\"}" -H "Content-Type: application/json" -k -u "key":"secret" https://192.168.1.1/api/core/firmware/upgrade
Now i resolved it. The problem was, that i was using curl from windows and windows has since ever trouble with quotas respectively double quotas so the solution for windowsuser is to enter change the -d in "{\"upgrade\":\"all\"}" so the single quotas should be replaced with double quotas and the double quotas will be escaped.
curl -XPOST -d "{\"upgrade\":\"all\"}" -H "Content-Type: application/json" -k -u "key":"secret" https://192.168.1.1/api/core/firmware/upgrade