User guide

Web Services REST Examples Web Services, CLI Scripting and OpenFlow
page 11-12 OmniSwitch AOS Release 7 Switch Management Guide March 2015
Delete Table Entry Example
The following REST example deletes an existing VLAN using MIB objects.
Example Success Response
Example Error Response
Domain mib
URN vlanTable
Verb DELETE
REST URL DELETE https://192.168.1.1/mib/vlanTable?
mibObject1=vlanNumber: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 5
does not exist"
],
"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 5 does not exist</
node>
</error>
<data></data>
</result>
</nodes>