User guide
Web Services REST Examples Web Services, CLI Scripting and OpenFlow
page 11-6 OmniSwitch AOS Release 7 Switch Management Guide March 2015
Login Example
This REST example logs a user into the switch.
Example Success Response
Example Error Response
Domain auth
URN -
Verb GET
Variables username, password
REST URL GET https://192.168.1.1/auth/?&username=admin&password=switch
JSON XML
{"result":{
"domain":"auth (login)",
"diag":200,
"error":"",
"output":"",
"data":[]}}
<?xml version="1.0" encoding="UTF-8" ?>
<nodes>
<result>
<domain>auth (login)</domain>
<diag>200</diag>
<error></error>
<output></output>
<data></data>
</result>
</nodes>
JSON XML
{"result":{
"domain":"auth (login)",
"diag":400,
"error":"Authentication failure
: Invalid login name or
password","output":"",
"data":[]}}
<?xml version="1.0" encoding="UTF-8" ?>
<nodes>
<result>
<domain>auth (login)</domain>
<diag>400</diag>
<error>Authentication failure : Invalid login name or password</
error>
<output></output>