29.04.2019 Views

OS6860(E)_AOS_8.1.1.R01_Switch_Management_Guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Web Services REST Examples<br />

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

Login Example<br />

This REST example logs a user into the switch.<br />

Domain auth<br />

URN -<br />

Verb GET<br />

Variables username, password<br />

REST URL GET https://192.168.1.1/auth/?&username=admin&password=switch<br />

Example Success Response<br />

JSON<br />

{"result":{<br />

"domain":"auth (login)",<br />

"diag":200,<br />

"error":"",<br />

"output":"",<br />

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

XML<br />

<br />

<br />

<br />

auth (login)<br />

200<br />

<br />

<br />

<br />

<br />

<br />

Example Error Response<br />

JSON<br />

{"result":{<br />

"domain":"auth (login)",<br />

"diag":400,<br />

"error":"Authentication failure<br />

: Invalid login name or<br />

password","output":"",<br />

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

XML<br />

<br />

<br />

<br />

auth (login)<br />

400<br />

Authentication failure : Invalid login name or password<br />

<br />

page 10-6 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!