User guide
Web Services REST Examples Web Services, CLI Scripting and OpenFlow
page 11-8 OmniSwitch AOS Release 7 Switch Management Guide March 2015
Create Table Entry Example - VLAN
The following REST example creates a new VLAN using MIB objects.
Example Success Response
Example Error Response
Domain mib
URN vlanTable
Verb PUT
REST URL PUT https://192.168.1.1/mib/vlanTable?
mibObject0=vlanNumber:2&mibObject1=vlanDescription:VLAN-2
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>