Woleet's Swagger/OpenAPI official Java client generated using openapi-codegen (see official API documentation at https://api.woleet.io)
Switch branches/tags
Nothing to show
Clone or download
vbarat
vbarat 1.5.2
Latest commit f76e41a Sep 26, 2018

README.md

woleet-api-client

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.woleet</groupId>
    <artifactId>woleet-api-client</artifactId>
    <version>1.0.1</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.woleet:woleet-api-client:1.0.1"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/woleet-api-client-1.0.1.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import io.woleet.api.*;
import io.woleet.api.auth.*;
import io.woleet.api.client.model.*;
import io.woleet.api.client.AnchorApi;

import java.io.File;
import java.util.*;

public class AnchorApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure HTTP basic authorization: BasicAuth
        HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
        BasicAuth.setUsername("YOUR USERNAME");
        BasicAuth.setPassword("YOUR PASSWORD");

        // Configure API key authorization: JWTAuth
        ApiKeyAuth JWTAuth = (ApiKeyAuth) defaultClient.getAuthentication("JWTAuth");
        JWTAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //JWTAuth.setApiKeyPrefix("Token");

        AnchorApi apiInstance = new AnchorApi();
        Anchor anchor = new Anchor(); // Anchor | Anchor object to create.
        try {
            Anchor result = apiInstance.createAnchor(anchor);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnchorApi#createAnchor");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.woleet.io/v1

Class Method HTTP request Description
AnchorApi createAnchor POST /anchor Create a new anchor.
AnchorApi deleteAnchor DELETE /anchor/{anchorid} Delete an anchor.
AnchorApi getAnchor GET /anchor/{anchorid} Get an anchor by its identifier.
AnchorApi searchAnchorIds GET /anchorids Search for public anchors' identifiers.
AnchorApi searchAnchors GET /anchors Search for anchors.
AnchorApi updateAnchor PUT /anchor/{anchorid} Update an anchor.
DomainApi createDomainUser POST /domain/admin/user Create a new domain user.
DomainApi deleteDomainUser DELETE /domain/admin/user/{userid} Delete a domain user.
DomainApi getDomainUser GET /domain/admin/user/{userid} Get a domain user by its identifier.
DomainApi searchDomainUsers GET /domain/admin/users Search for domain users.
DomainApi updateDomainUser PUT /domain/admin/user/{userid} Update a domain user.
ReceiptApi getOTSReceipt GET /receipt/{anchorid}/ots Get the proof receipt of an anchor (OpenTimestamps proof format).
ReceiptApi getReceipt GET /receipt/{anchorid} Get the proof receipt of an anchor (Chainpoint proof format).
ReceiptApi verifyReceipt POST /receipt/verify Verify a proof receipt.
SignatureRequestApi createSignatureRequest POST /signatureRequest Create a new signature request.
SignatureRequestApi deleteSignatureRequest DELETE /signatureRequest/{requestid} Delete a signature request.
SignatureRequestApi getSignatureRequest GET /signatureRequest/{requestid} Get a signature request by its identifier.
SignatureRequestApi searchSignatureRequests GET /signatureRequests Search for signature requests.
SignatureRequestApi signSignatureRequest POST /signatureRequest/{requestid}/sign Sign a signature request.
SignatureRequestApi updateSignatureRequest PUT /signatureRequest/{requestid} Update a signature request.
TokenApi generateToken GET /token Generate a JWT token.
TokenApi revokeToken DELETE /token Revoke a JWT token.
UserApi getCredits GET /user/credits Get user's anchoriong credits.
UserApi getTokens GET /user/tokens Get user's tokens.
UserApi putTokens PUT /user/tokens Update user's tokens.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BasicAuth

  • Type: HTTP basic authentication

JWTAuth

  • 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 issues.

Author

contact@woleet.com