Building the API client library requires Maven to be installed.
To install the API client library to your local Maven repository, simply execute:
mvn install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>io.github.cloudiator.visor.client</groupId>
<artifactId>java-rest</artifactId>
<version>0.3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "io.github.cloudiator.visor.client:java-rest:0.3.0-SNAPSHOT"
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/java-rest-0.3.0-SNAPSHOT.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.github.cloudiator.visor.rest.*;
import io.github.cloudiator.visor.rest.auth.*;
import io.github.cloudiator.visor.rest.model.*;
import io.github.cloudiator.visor.rest.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String uuid = "uuid_example"; // String | A globally unique identifier of a monitor.
try {
apiInstance.deleteMonitor(uuid);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#deleteMonitor");
e.printStackTrace();
}
}
}
All URIs are relative to http://localhost:31415
Class | Method | HTTP request | Description |
---|---|---|---|
DefaultApi | deleteMonitor | DELETE /monitors/{uuid} | |
DefaultApi | deleteMonitors | DELETE /monitors | |
DefaultApi | getMonitor | GET /monitors/{uuid} | |
DefaultApi | getMonitors | GET /monitors | |
DefaultApi | postMonitors | POST /monitors | |
DefaultApi | putMonitor | PUT /monitors/{uuid} |
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.