Cloudhub API client library for Java
- API version: 1.0.5
- Build date: 2025-03-24T09:46:17.287214-03:00[America/Sao_Paulo]
Automatically generated by the OpenAPI Generator with modifications
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.lacunasoftware.cloudhub</groupId>
<artifactId>cloudhub-client</artifactId>
<version>1.0.5</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'cloudhub-client' jar has been published to maven central.
mavenLocal() // Needed if the 'cloudhub-client' jar has been published to the local maven repo.
}
dependencies {
implementation "com.lacunasoftware.cloudhub:cloudhub-client:1.0.5"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/cloudhub-client-1.0.5.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import cloudhub.client.ApiClient;
import cloudhub.client.ApiException;
import cloudhub.client.Configuration;
import cloudhub.client.auth.*;
import cloudhub.client.models.*;
import cloudhub.SessionsApi;
public class Example {
public static void main(String[] args) {
//Add endpoint and API Key
String endpoint = "http://localhost"
String apiKey = "YOUR_API_KEY"
// Create client instance
CloudhubClient cloudhubClient = new CloudhubClient(endpoint, apiKey);
SessionsApi apiInstance = new SessionsApi(cloudhubClient);
String session = "session_example"; // String |
try {
byte[] result = apiInstance.apiSessionsCertificateGet(session);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SessionsApi#apiSessionsCertificateGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
SessionsApi | apiSessionsCertificateGet | GET /api/sessions/certificate | |
SessionsApi | apiSessionsPost | POST /api/sessions | |
SessionsApi | apiSessionsServicesGet | GET /api/sessions/services | |
SessionsApi | apiSessionsServicesNamePost | POST /api/sessions/services/{name} | |
SessionsApi | apiSessionsSignHashPost | POST /api/sessions/sign-hash | |
SessionsApi | apiV2SessionsCertificateGet | GET /api/v2/sessions/certificate |
- CertificateModel
- IdentifierTypes
- ServiceSessionCreateRequest
- ServiceSessionCreateResponse
- SessionCreateRequest
- SessionModel
- SignHashRequest
- TrustServiceAuthParametersModel
- TrustServiceInfoModel
- TrustServiceSessionTypes
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-Api-Key
- Location: HTTP header
It's recommended to create an instance of CloudhubClient
per thread in a multithreaded environment to avoid any potential issues.