Forum Discussion
Virtual server details get a 404 with CURL
Hi,
I am trying to get the virtual server details from a CURL call:
curl -svku "admin:admin" https://0.0.0.0/mgmt/tm/ltm/virtual/virtualtest
And I keep getting the following error:
{"code":404,"message":"01020036:3: The requested Virtual Server (/Common/virtualtest) was not found.","errorStack":[],"apiError":3}
What am I missing? The virtual server does exist. I am using F5 version 12.1.2
Thank you.
- Lee_SutcliffeNacreous
Try sending the credentials as POST data:
curl -X POST \ https://bigip/mgmt/tm/ltm/virtual/virtualtest \ -H 'Content-Type: application/json' \ -d '{ "username":"admin", "password":"admin", "loginProviderName": "tmos" }'
- emilorol_373618Nimbostratus
Thank you for getting back so quickly, I was able to make it work with the following command:
curl -svku "admin:admin" -X GET "https://0.0.0.0/mgmt/tm/ltm/virtual/~Common~virtualtest.app~virtualtest_vs?ver=12.1.2"
Crazy URL, but it works.
- Lee_SutcliffeNacreous
The format is a bit longer than normal because your virtual server is a child of an iApp. You can however omit the query section (?ver=12.1.2) if you want to shorten it. ~Common~ is the partition name which is implied if you don't use it. For partitions other than /Common, you'll need to specify it.
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