Skip to content

LacunaSoftware/cloudhub-java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudhub-java-client

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

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

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.

Maven users

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>

Gradle users

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"
  }

Others

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

Getting Started

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();
    }
  }
}

Documentation for API Endpoints

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

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

ApiKey

  • Type: API key
  • API key parameter name: X-Api-Key
  • Location: HTTP header

Recommendation

It's recommended to create an instance of CloudhubClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

A client library in java to consume the Cloudhub Api

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages