Forum Discussion
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
- rsingh1988_3382Altostratus
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
- Satoshi_Toyosa1Ret. Employee
Hi there,
First thing first: Can you try accessing the box via ssh (tmsh/bash) and Configuration Utility (GUI)? If they do not work, check if the password is correct.
Sometimes, restarting the iControl REST processes may help. Run
(if you are running BIG-IP 11.x, run alsotmsh restart sys service restjavad
).tmsh restart sys service icrd
- sande06_81266Nimbostratus
Thanks! This was my issue as well!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com