rsingh1988_3382
Dec 14, 2017Altostratus
Solved
iControlRest curl API call fails
Hi All
I am new to iControlRest API and am trying to learn it. I am stuck at very first step i believe and not able to progress further. I am using admin credential here but I am getting http error 401. Not sure what step I am doing wrong any help will be great help.
[nms~]$ curl -k -u admin:admin -X GET https://10.43.x.x/mgmt/tm/ltm
Authentication required!
Authentication required!
This server could not verify that you are authorized to access
the URL "/mgmt/tm/ltm".
You either supplied the wrong credentials (e.g., bad password), or your
browser doesn't understand how to supply the credentials required.
In case you are allowed to request the document, please
check your user-id and password and try again.
Error 401
Thu Dec 14 15:31:33 2017
Thank you for the comment but I found the problem and commenting here as it may help beginners like me. Since I had special characters in my admin password curl wasn't accepting them hence i send credentail as a key value pair in string format.
curl -k -u 'admin:xys@3a' -X GET https://bigipf5/mgmt/ltm