Skip to content

triglav-dataflow/triglav-client-java

Repository files navigation

triglav-client-java

Requirements

Building the API client library requires Maven to be installed.

Installation

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.

Maven users

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>

Gradle users

Add this dependency to your project's build file:

compile "io.github.triglav_dataflow:triglav-client-java:1.0.0"

Others

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

Getting Started

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

Documentation for API Endpoints

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}

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

api_key

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Recommendation

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

Author

[email protected]

About

A java client library for Triglav, data-driven workflow tool

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages