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.triglav_dataflow</groupId>
<artifactId>triglav-client-java</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "io.github.triglav_dataflow:triglav-client-java:1.0.0"
At first generate the JAR by executing:
mvn package
Then manually install the following JARs:
- target/triglav-client-java-1.0.0.jar
- target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import io.github.triglav_dataflow.client.*;
import io.github.triglav_dataflow.client.auth.*;
import io.github.triglav_dataflow.client.model.*;
import io.github.triglav_dataflow.client.api.AuthApi;
import java.io.File;
import java.util.*;
public class AuthApiExample {
public static void main(String[] args) {
AuthApi apiInstance = new AuthApi();
Credential credential = new Credential(); // Credential |
try {
TokenResponse result = apiInstance.createToken(credential);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthApi#createToken");
e.printStackTrace();
}
}
}
All URIs are relative to http://localhost/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AuthApi | createToken | POST /auth/token | |
AuthApi | deleteToken | DELETE /auth/token | |
AuthApi | me | GET /auth/me | |
JobMessagesApi | fetchJobMessages | GET /job_messages | |
JobMessagesApi | getLastJobMessageId | GET /job_messages/last_id | |
JobsApi | createOrUpdateJob | PATCH /jobs | |
JobsApi | deleteJob | DELETE /jobs/{id_or_uri} | |
JobsApi | getJob | GET /jobs/{id_or_uri} | |
JobsApi | listJobs | GET /jobs | |
MessagesApi | fetchMessages | GET /messages | |
MessagesApi | getLastMessageId | GET /messages/last_id | |
MessagesApi | sendMessages | POST /messages | |
ResourcesApi | createResource | POST /resources | |
ResourcesApi | deleteResource | DELETE /resources/{id_or_uri} | |
ResourcesApi | getResource | GET /resources/{id_or_uri} | |
ResourcesApi | listAggregatedResources | GET /aggregated_resources | |
ResourcesApi | listResources | GET /resources | |
ResourcesApi | updateResource | PATCH /resources/{id_or_uri} | |
UsersApi | createUser | POST /users | |
UsersApi | deleteUser | DELETE /users/{id} | |
UsersApi | getUser | GET /users/{id} | |
UsersApi | listUsers | GET /users | |
UsersApi | updateUser | PATCH /users/{id} |
- AggregatedResourceEachResponse
- BulkinsertResponse
- Credential
- ErrorModel
- JobEachResponse
- JobMessageEachResponse
- JobRequest
- JobResponse
- LastJobMessageIdResponse
- LastMessageIdResponse
- MessageEachResponse
- MessageFetchRequest
- MessageRequest
- MessageResponse
- ResourceEachResponse
- ResourceRequest
- ResourceResponse
- TokenResponse
- UserEachResponse
- UserRequest
- UserResponse
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issue.