12.07.2015 Views

Ridgeline 4.0 REST API Quick Start PDF - Extreme Networks

Ridgeline 4.0 REST API Quick Start PDF - Extreme Networks

Ridgeline 4.0 REST API Quick Start PDF - Extreme Networks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Using the <strong>REST</strong> <strong>API</strong>} catch (IOException e) {}}}e.printStackTrace();public static void main(String[] args) {RestHttpClient httpClient = new RestHttpClient("http://10.120.91.105:8080/v1.0/dataservice/inventory/device.json","10.120.91.105", 8080, "admin", "admin");}httpClient.writeToFile();}Code ExampleApplication definitionpackage com.extremenetworks.library;import javax.ws.rs.ApplicationPath;import javax.ws.rs.core.Application;@ApplicationPath("/dataservice")public class RestfulServiceApplications extends Application{}package com.extremenetwokrs.library;import javax.xm.bind.annotation.XmlRootElement;@XmlRootElementpbulic class Device {private String ip;private String name;public Device() {}public Device(String ipaddress, String name){this.ip = ipaddress;this.name = name;}public String getIp() {return ip;}public void setIp(String ip){this.ip = ip;}public String qetName() {return name;public void setName(String name) {}<strong>Ridgeline</strong> <strong>4.0</strong> <strong>REST</strong> <strong>API</strong> <strong>Quick</strong> <strong>Start</strong> 21

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

Saved successfully!

Ooh no, something went wrong!