Forum Discussion
CBohannan_14046
Nimbostratus
Sep 09, 2015REST API VLAN creation and interface sub-collection
I have been playing around with REST API and have stumbled across a challenge around assigning a "tagged" interface.
In this sample REST call, I create the vlan name, set the vlan tag & set the de...
StephanManthey
Nacreous
Jun 14, 2018Hi,
perhaps this question is still of interest? This one is a single step solution (tested on TMOS v13.1.0.6) to create a new VLAN and assign an interface in tagged mode:curl -sk -u admin:admin "https://10.200.200.21/mgmt/tm/net/vlan" -H 'Content-Type: application/json' -X POST -d '{"name":"vlan_lab-103", "tag":103, "interfaces": [{"name":"1.3", "tagged": true}]}'
A slightly modified syntax with the same result:
curl -sk -u admin:admin "https://10.200.200.21/mgmt/tm/net/vlan" -H 'Content-Type: application/json' -X POST -d '{"name":"vlan_lab-103", "tag":103, "interfacesReference":{"items":[{"name":"1.3","tagged":true}]}}'
Cheers, StephanHelp guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
