iControl REST 101: Modifying Objects
So far in this series we’ve shown you how to connect to iControl REST via cURL, how to list objects on the device (which is probably the most used command for most APIs, including ours), and how to a...
Published Mar 13, 2014
Version 1.0Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
JackF
Oct 28, 2015Employee
JerryMac I think you are looking for something along these lines:
curl -k -u admin:admin https://172.29.86.62/mgmt/tm/net/self/ -H "Content-Type: application/json“ \
-X POST -d "{\"name\":\"internal_self2\",\"address\":\"10.81.60.2/8\",\"vlan\":\"internal\"}"
{"kind":"tm:net:self:selfstate","name":"internal_self2","generation":0,"lastUpdatedMicros":0,
"selfLink":"https://localhost/mgmt/tm/net/self/internal_self2","partition":"/Common/",
"address":"10.81.60.2/8","floating":"disabled","inheritedTrafficGroup":"false",
"trafficGroup":"traffic-group-local-only","unit":0,"vlan":"internal"}
tmsh list net self internal_self2
net self internal_self2 {
address 10.81.60.2/8
traffic-group traffic-group-local-only
vlan internal
}
---
curl -k -u admin:admin https://172.29.86.62/mgmt/tm/net/self/internal_self2 \
-H "Content-Type: application/json" -X PUT -d "{\"allowService\":\"all\"}"
{"kind":"tm:net:self:selfstate",
"name":"internal_self2","generation":0,
"lastUpdatedMicros":0,
"selfLink":"https://localhost/mgmt/tm/net/self/internal_self2",
"partition":"/Common/",
"address":"10.81.60.2/8",
"floating":"disabled",
"inheritedTrafficGroup":"false",
"trafficGroup":"traffic-group-local-only",
"unit":0,"vlan":”internal"}
tmsh list net self internal_self2
net self internal_self2 {
address 10.81.60.2/8
allow-service all
traffic-group traffic-group-local-only
vlan internal
}