|
Java Client SDK
These are classes written to make using the NewServers™ API from your Java application convenient. All of the HTTP API methods correspond to a method of the class NsApi.
For example, the listServers method is accessed by url like this:
https://noc.newservers.com/api/listServers?username=you&password=yourpass
Accomplish the same thing in Java using the Client SDK:
public class YourApp {
public static void main(String[ ] args) {
List<Server> servers = NsApi.listServers(“you”, “yourpass”);
for(int x=0; x<servers; x++) {
System.out.println(servers.get(x));
}
}
}
|