29.04.2019 Views

OS6860(E)_AOS_8.1.1.R01_Switch_Management_Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Web Services REST Examples<br />

Web Services, CLI Scripting, and OpenFlow<br />

Create Table Entry Example - VLAN<br />

The following REST example creates a new VLAN using MIB objects.<br />

Domain<br />

URN<br />

Verb<br />

REST URL<br />

mib<br />

vlanTable<br />

PUT<br />

PUT https://192.168.1.1/mib/vlanTable?<br />

mibObject0=vlanNumber:2&mibObject1=vlanDescription:VLAN-2<br />

Example Success Response<br />

JSON<br />

{"result":{<br />

"domain":"mib:vlanTable",<br />

"diag":200,<br />

"output":"",<br />

"error":[<br />

"Set operation finished<br />

successfully!"],<br />

"data":[]}}<br />

XML<br />

<br />

<br />

<br />

mib:vlanTable<br />

200<br />

<br />

<br />

Set operation finished successfully!<br />

<br />

<br />

<br />

<br />

Example Error Response<br />

JSON<br />

{"result":{<br />

"domain":"mib:vlanTable",<br />

"diag":400,<br />

"output":"",<br />

"error":[<br />

"Submission failed : VLAN<br />

Id should be between 1 and 4096<br />

(inclusive)"<br />

],<br />

"data":[]}}<br />

XML<br />

<br />

<br />

<br />

mib:vlanTable<br />

400<br />

<br />

<br />

Submission failed : VLAN Id should be between<br />

1 and 4096 (inclusive)<br />

<br />

<br />

<br />

<br />

page 10-8 Omni<strong>Switch</strong> <strong>AOS</strong> Release 8 <strong>Switch</strong> <strong>Management</strong> <strong>Guide</strong> May 2014

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!