Skip to content

Latest commit

 

History

History
217 lines (165 loc) · 10.6 KB

README.md

File metadata and controls

217 lines (165 loc) · 10.6 KB

woleet-api-client

Woleet API

  • API version: 1.13.0

Welcome to Woleet API reference documentation.
It is highly recommanded to read the chapters introducing Woleet API concepts before reading this documentation.

For more information, please visit https://www.woleet.io/

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

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

Gradle users

Add this dependency to your project's build file:

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

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

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

Getting Started

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

// Import classes:
import io.woleet.api.ApiClient;
import io.woleet.api.ApiException;
import io.woleet.api.Configuration;
import io.woleet.api.auth.*;
import io.woleet.api.models.*;
import io.woleet.api.client.AnchorApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.woleet.io/v1");
    
    // 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(defaultClient);
    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");
      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 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 getAnchorAttestation GET /anchor/{anchorId}/attestation Download the Proof Attestation document of an anchor.
AnchorApi searchAnchorIds GET /anchorIds Search for public anchor identifiers.
AnchorApi searchAnchors GET /anchors Search for anchors.
AnchorApi updateAnchor PUT /anchor/{anchorId} Update an anchor.
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.
ReceiptApi verifyReceipt POST /receipt/verify Verify a proof receipt.
SignatureRequestApi createSignatureRequest POST /signatureRequest Create a new signature request.
SignatureRequestApi delegateSignSignatureRequest POST /signatureRequest/{requestId}/delegate Sign a signature request by delegating the signature.
SignatureRequestApi deleteSignatureRequest DELETE /signatureRequest/{requestId} Delete a signature request.
SignatureRequestApi downloadSignatureRequestFile GET /signatureRequest/{requestId}/file Download the file to sign.
SignatureRequestApi getSignatureRequest GET /signatureRequest/{requestId} Get a signature request by its identifier.
SignatureRequestApi getSignatureRequestAttestation GET /signatureRequest/{requestId}/attestation Download the Signature Attestation document of a signature request.
SignatureRequestApi getSignatureRequestProofBundle GET /signatureRequest/{requestId}/proofbundle Get the proof bundle of a signature request.
SignatureRequestApi reportSignatureRequestEvent POST /signatureRequest/{requestId}/event Report an event on a signature request.
SignatureRequestApi reportSignatureRequestFeedback POST /signatureRequest/{requestId}/feedback Report a feedback about a signature request.
SignatureRequestApi searchSignatureRequestIds GET /signatureRequestIds Search for public signature request identifiers.
SignatureRequestApi searchSignatureRequests GET /signatureRequests Search for signature requests.
SignatureRequestApi sendSignatureRequestOTP GET /signatureRequest/{requestId}/otp/{signeeId} Generate and send an OTP to a signer of a signature request.
SignatureRequestApi sendSignatureRequestReminder POST /signatureRequest/{requestId}/remind Send a reminder email to a set of signers of a signature request.
SignatureRequestApi signSignatureRequest POST /signatureRequest/{requestId}/sign Sign a signature request by registering a signature.
SignatureRequestApi transitionSignatureRequest POST /signatureRequest/{requestId}/transition Change the state of a signature request.
SignatureRequestApi updateSignatureRequest PUT /signatureRequest/{requestId} Update a signature request.
SignatureRequestApi uploadSignatureRequestFile POST /signatureRequest/{requestId}/file Upload the file to sign.
TokenApi generateToken GET /token Generate a JWT token.
TokenApi revokeToken DELETE /token Revoke a JWT token.
UserApi getCallbackSecret GET /user/callbackSecret Get the current callback secret (null if not set).
UserApi getCredits GET /user/credits Get user's credits.
UserApi getTokens GET /user/tokens Get user's registered JWT tokens.
UserApi putTokens PUT /user/tokens Update user's registered JWT tokens.
UserApi updateCallbackSecret PUT /user/callbackSecret Generates a new callback secret.

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