User guide
Web Services, CLI Scripting and OpenFlow Web Services REST Examples
OmniSwitch AOS Release 7 Switch Management Guide March 2015 page 11-9
Create Table Entry Example - IP Interface
The following REST example creates an IP interface using MIB objects.
Example Success Response
Example Error Response
Domain mib
URN alaIpItfConfigTable and alaIpInterface
Verb PUT
REST URL PUT https://192.168.1.1/mib/alaIpItfConfigTable?
mibObject1=alaIpItfConfigName:my_new_interface2&mibObject0=alaIpItfConfig
IfIndex:0
POST Request: [https://192.168.1.1/mib/alaIpInterfaceTable?]
mibObject1=alaIpInterfaceAddress:2.1.1.1&mibObject0=ifIndex:13600002&mibO
bject3=alaIpInterfaceVlanID:1&mibObject2=alaIpInterfaceMask:255.255.255.0
JSON XML
{"result":{
"domain":"mib:vlanTable",
"diag":200,
"output":"",
"error":[
"Set operation finished
successfully!"],
"data":[]}}
<?xml version="1.0" encoding="UTF-8" ?>
<nodes>
<result>
<domain>mib:vlanTable</domain>
<diag>200</diag>
<output></output>
<error>
<node name="0">Set operation finished successfully!</node>
</error>
<data></data>
</result>
</nodes>
JSON XML
{"result":{
"domain":"mib:vlanTable",
"diag":400,
"output":"",
"error":[
"Submission failed : VLAN
Id should be between 1 and 4096
(inclusive)"
],
"data":[]}}
<?xml version="1.0" encoding="UTF-8" ?>
<nodes>
<result>
<domain>mib:vlanTable</domain>
<diag>400</diag>
<output></output>
<error>
<node name="0">Submission failed : VLAN Id should be between
1 and 4096 (inclusive)</node>
</error>
<data></data>
</result>
</nodes>