Forum Discussion
How do I create a route-domain in vcmp using curl?
- Mar 27, 2014
You need to protect your strings from interpolation. See below, I have added single quotes around your username and password, and around your POST data:
curl -k -u 'admin:admin1!' -H "Content-Type: \ application/json" -X POST -d '{"name":"d2vc1fc1","id":2,"vlans":["vlan1101","vlan1201","vlan101"]}' https://10.1.1.12/mgmt/tm/net/route-domain
Thank you very much. That works! I was looking at the guide icontrol-rest-user-11-5-0.pdf right after and saw the '' after -d but still failed. You actually need it around the username and password like you suggested as well.
I am trying to create a new route-domain and assign those 3 vlans to it. tmsh command would be as follow: create net route-domain d2vc1fc1 id 2 vlans add { vlan101 vlan1101 vlan1201 }
But now i get authentication error...but that could be fixed...might be because i use curl for windows as well....
Authentication required!
This server could not verify that you are authorized to access the URL "/mgmt/tm/net/route-domain". 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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