Zenoss JSON API - slashmili/Zendroid GitHub Wiki

Login

POST

("____ac_name"->username, "____ac_password"->password, "submitted"->"true", "came_from"->"zenosserver:8080/zport/dmd")

To

zenosserver:8080/zport/acl_users/cookieAuthHelper/login

RESULT

Save cookie for future usage

Check Login

** POST **

()

COOKIE

send cookie (get cookie from login action)

TO

http://zenosserver:8080/zport/dmd

RESULT

Response code should be 200

GET EVENETS##

** POST ** (JSON Format)

dir -> 'DESC', limit -> 100, params -> "severity":[5,4,3,2],"eventState":[0,1]}" 'sort'->severity, start ->0

TO

http://zenosserver:8080/zport/dmd/Events/evconsole

** RESULT **

{ 'totalCount' => 1, 'events' => [ { 'evid' => '086f76f4-3b13-4027-841d-4cf351822d2b', 'count' => '14', 'lastTime' => '2011-06-03 07:35:09', 'device' => { 'uid' => '/zport/dmd/Devices/Server/Linux/devices/serverA.mydomain.com', 'text' => 'serverA.mydomain.com' }, 'eventClass' => { 'uid' => '/zport/dmd/Events/Status/Snmp', 'text' => '/Status/Snmp' }, 'component' => { 'uid' => undef, 'text' => 'snmp' }, 'summary' => 'SNMP agent down', 'eventState' => 'New', 'id' => '086f76f4-3b13-4027-841d-4cf351822d2b', 'firstTime' => '2011-06-03 05:25:08', 'severity' => '4' } ], 'asof' => '1307086635.94256' }