Skip to content

formkiq/formkiq-client-sdk-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FormKiQ Java Client Library

=====================================

This is the official supported Java library for the FormKiQ API.

FormKiQ HTTP API

  • API version: 1.16.0
    • Build date: 2024-11-13T21:59:20.801618-06:00[America/Winnipeg]
    • Generator version: 7.9.0

Formkiq API: Document Management Platform API using OAuth(JWT) Authentication

You can find out more about FormKiQ at https://formkiq.com.

Introduction

FormKiQ is an API-first (head-less), battle-tested document management API. The FormKiQ API provides all the API endpoints to build your Perfect Document Management Platform.

FormKiQ API was built on top of OpenAPI specification, so it is easy to use the API spec file with any application that supports the OpenAPI specification.

Open API OAuth Specification - https://raw.githubusercontent.com/formkiq/formkiq-core/master/docs/openapi/openapi-jwt.yaml

Open API IAM Specification - https://raw.githubusercontent.com/formkiq/formkiq-core/master/docs/openapi/openapi-iam.yaml

Authentication

FormKiQ offers three forms of authentication:

  • OAuth(JWT)
  • AWS IAM
  • API Key

For more information, please visit https://formkiq.com

Automatically generated by the OpenAPI Generator

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.formkiq</groupId>
  <artifactId>client</artifactId>
  <version>1.16.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.formkiq:client:1.16.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/client-1.16.0.jar
  • target/lib/*.jar

Getting Started

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

// Import classes:
import com.formkiq.client.invoker.ApiClient;
import com.formkiq.client.invoker.ApiException;
import com.formkiq.client.invoker.Configuration;
import com.formkiq.client.invoker.auth.*;
import com.formkiq.client.invoker.models.*;
import com.formkiq.client.api.AdvancedDocumentSearchApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();

    // Pick one of the following authorization methods (JWT / IAM / KEY)
    //
    // 1. For JWT authorization
    // From the FormKiQ installation CloudFormation Outputs, find the value for HttpApiUrl
    defaultClient.setBasePath("<HttpApiUrl>");
    defaultClient.addDefaultHeader("Authorization", <JWT Access Token>);

    // 2. For IAM authorization
    // From the FormKiQ installation CloudFormation Outputs, find the value for IamApiUrl
    defaultClient.setBasePath("<IamApiUrl>");
    defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "execute-api")

    // 3. For Key authorization
    // From the FormKiQ installation CloudFormation Outputs, find the value for KeyApiUrl
    defaultClient.setBasePath("<KeyApiUrl>");
    defaultClient.addDefaultHeader("Authorization", <Api Key>);    
    
    // Add New Document
    DocumentsApi apiInstance = new DocumentsApi(defaultClient);
    AddDocumentRequest addDocumentRequest = new AddDocumentRequest(); // AddDocumentRequest | 
    String siteId = null; // String | Site Identifier
    String shareKey = null; // String | Share Identifier
    try {
      AddDocumentResponse result = apiInstance.addDocument(addDocumentRequest, siteId, shareKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DocumentsApi#addDocument");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }

    // Get Documents
    DocumentsApi apiInstance = new DocumentsApi(defaultClient);
    String date = null; // String | Fetch documents inserted on a certain date (yyyy-MM-dd)
    String tz = null; // String | UTC offset to apply to date parameter (IE: -0600)
    String next = null; // String | Next page of results token
    String previous = null; // String | Previous page of results token
    String siteId = null; // String | Site Identifier
    String limit = "10"; // String | Limit Results
    try {
      GetDocumentsResponse result = apiInstance.getDocuments(date, tz, next, previous, siteId, limit);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DocumentsApi#getDocuments");
      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
AccessControlApi deleteOpaAccessPolicyItems DELETE /sites/{siteId}/opa/accessPolicy/policyItems Delete OPA Access Policy Items
AccessControlApi getOpaAccessPolicies GET /sites/opa/accessPolicies Get OPAs Access Policies
AccessControlApi getOpaAccessPolicy GET /sites/{siteId}/opa/accessPolicy Get OPA Access Policy
AccessControlApi getOpaAccessPolicyItems GET /sites/{siteId}/opa/accessPolicy/policyItems Get OPA Access Policy Items
AccessControlApi setOpaAccessPolicyItems PUT /sites/{siteId}/opa/accessPolicy/policyItems Set opa access policy items, can only be requested with ADMIN privileges
AdvancedDocumentSearchApi addDocumentFulltext POST /documents/{documentId}/fulltext Add document's full-text
AdvancedDocumentSearchApi deleteDocumentFulltext DELETE /documents/{documentId}/fulltext Delete document full-text
AdvancedDocumentSearchApi deleteDocumentFulltextTag DELETE /documents/{documentId}/fulltext/tags/{tagKey} Delete document full-text tag
AdvancedDocumentSearchApi deleteDocumentFulltextTagAndValue DELETE /documents/{documentId}/fulltext/tags/{tagKey}/{tagValue} Delete document full-text tag/value
AdvancedDocumentSearchApi getDocumentFulltext GET /documents/{documentId}/fulltext Get document's full-text
AdvancedDocumentSearchApi queryFulltext POST /queryFulltext Direct opensearch search API
AdvancedDocumentSearchApi searchFulltext POST /searchFulltext Document full-text search
AdvancedDocumentSearchApi setDocumentFulltext PUT /documents/{documentId}/fulltext Set document's full-text
AdvancedDocumentSearchApi updateDocumentFulltext PATCH /documents/{documentId}/fulltext Update document's full-text
AntivirusApi setAntivirus PUT /documents/{documentId}/antivirus Antivirus document scan
AttributesApi addAttribute POST /attributes Add new attribute
AttributesApi deleteAttribute DELETE /attributes/{key} Delete attribute
AttributesApi getAttribute GET /attributes/{key} Get Attribute
AttributesApi getAttributeAllowedValues GET /attributes/{key}/allowedValues Get Attribute Allowed Values
AttributesApi getAttributes GET /attributes Get Attributes listing
CaseManagementApi addCase POST /cases Add New Case
CaseManagementApi addNigo POST /cases/{caseId}/nigos Add New Nigo
CaseManagementApi addTask POST /cases/{caseId}/tasks Add New Task
CaseManagementApi deleteCase DELETE /cases/{caseId} Delete Case
CaseManagementApi deleteCaseDocument DELETE /cases/{caseId}/documents/{documentId} Delete Document from Case
CaseManagementApi deleteNigo DELETE /cases/{caseId}/nigos/{nigoId} Delete Nigo
CaseManagementApi deleteNigoDocument DELETE /cases/{caseId}/nigos/{nigoId}/documents/{documentId} Delete Document from Nigo
CaseManagementApi deleteTask DELETE /cases/{caseId}/tasks/{taskId} Delete Task
CaseManagementApi deleteTaskDocument DELETE /cases/{caseId}/tasks/{taskId}/documents/{documentId} Delete Document from Task
CaseManagementApi getCase GET /cases/{caseId} Get Case details
CaseManagementApi getCaseDocuments GET /cases/{caseId}/documents Get list of document in a case
CaseManagementApi getCaseNigo GET /cases/{caseId}/nigos/{nigoId} Get nigo in a case
CaseManagementApi getCaseNigos GET /cases/{caseId}/nigos Get list of Nigos in a case
CaseManagementApi getCaseTask GET /cases/{caseId}/tasks/{taskId} Get task in a case
CaseManagementApi getCaseTasks GET /cases/{caseId}/tasks Get list of tasks in a case
CaseManagementApi getCases GET /cases Get Case listing
CaseManagementApi getNigoDocuments GET /cases/{caseId}/nigos/{nigoId}/documents Get list of document in a task
CaseManagementApi getTaskDocuments GET /cases/{caseId}/tasks/{taskId}/documents Get list of document in a task
CaseManagementApi updateCase PATCH /cases/{caseId} Update existing Case
CaseManagementApi updateNigo PATCH /cases/{caseId}/nigos/{nigoId} Update existing Nigo
CaseManagementApi updateTask PATCH /cases/{caseId}/tasks/{taskId} Update existing Task
CustomIndexApi deleteIndex DELETE /indices/{indexType}/{indexKey}
CustomIndexApi indexFolderMove POST /indices/{indexType}/move
CustomIndexApi indexSearch POST /indices/search
DocumentActionsApi addDocumentActions POST /documents/{documentId}/actions Add document action
DocumentActionsApi addDocumentRetryAction POST /documents/{documentId}/actions/retry Retries failed document action(s)
DocumentActionsApi getDocumentActions GET /documents/{documentId}/actions Get document actions
DocumentAttributesApi addDocumentAttributes POST /documents/{documentId}/attributes Add attribute to document
DocumentAttributesApi deleteDocumentAttribute DELETE /documents/{documentId}/attributes/{attributeKey} Delete document attribute
DocumentAttributesApi deleteDocumentAttributeAndValue DELETE /documents/{documentId}/attributes/{attributeKey}/{attributeValue} Delete document's attribute value
DocumentAttributesApi getDocumentAttribute GET /documents/{documentId}/attributes/{attributeKey} Get document attribute by key
DocumentAttributesApi getDocumentAttributeVersions GET /documents/{documentId}/attributes/{attributeKey}/versions Get document attribute's versions
DocumentAttributesApi getDocumentAttributes GET /documents/{documentId}/attributes Get document's attributes
DocumentAttributesApi setDocumentAttributeValue PUT /documents/{documentId}/attributes/{attributeKey} Set document's attributes value
DocumentAttributesApi setDocumentAttributes PUT /documents/{documentId}/attributes Set document's attributes
DocumentFoldersApi addFolder POST /folders Add document folder
DocumentFoldersApi deleteFolder DELETE /folders/{indexKey} Delete document folder
DocumentFoldersApi getFolderDocuments GET /folders Get document folders
DocumentGenerationApi addDocumentGenerate POST /documents/{documentId}/generate Add Document Generate
DocumentOcrApi addDocumentOcr POST /documents/{documentId}/ocr Perform document ocr
DocumentOcrApi deleteDocumentOcr DELETE /documents/{documentId}/ocr Delete document ocr
DocumentOcrApi getDocumentOcr GET /documents/{documentId}/ocr Get document ocr content
DocumentOcrApi setDocumentOcr PUT /documents/{documentId}/ocr Set document ocr result
DocumentSearchApi documentSearch POST /search Document search
DocumentSharesApi addFolderShare POST /shares/folders/{indexKey} Add folder share
DocumentSharesApi deleteShare DELETE /shares/{shareKey} Delete folder share
DocumentSharesApi getUserShares GET /shares Get user shared folders
DocumentTagsApi addDocumentTags POST /documents/{documentId}/tags Add tag to document
DocumentTagsApi deleteDocumentTag DELETE /documents/{documentId}/tags/{tagKey} Delete document tag
DocumentTagsApi deleteDocumentTagAndValue DELETE /documents/{documentId}/tags/{tagKey}/{tagValue} Delete document's tag value
DocumentTagsApi getDocumentTag GET /documents/{documentId}/tags/{tagKey} Get document tag by key
DocumentTagsApi getDocumentTags GET /documents/{documentId}/tags Get document's tags
DocumentTagsApi setDocumentTag PUT /documents/{documentId}/tags/{tagKey} Update document tag value(s)
DocumentTagsApi setDocumentTags PUT /documents/{documentId}/tags Set document's tags
DocumentTagsApi updateDocumentTags PATCH /documents/{documentId}/tags Update document tags
DocumentTagsApi updateMatchingDocumentTags PATCH /documents/tags Mass Update document tag(s)
DocumentVersionsApi deleteDocumentVersion DELETE /documents/{documentId}/versions/{versionKey} Delete document version
DocumentVersionsApi getDocumentVersions GET /documents/{documentId}/versions Get document's versions
DocumentVersionsApi setDocumentVersion PUT /documents/{documentId}/versions Set version of document
DocumentWorkflowsApi addDocumentWorkflow POST /documents/{documentId}/workflows Add document workflow
DocumentWorkflowsApi addDocumentWorkflowDecisions POST /documents/{documentId}/workflow/{workflowId}/decisions Approve/Reject document in approval queue
DocumentWorkflowsApi addQueue POST /queues Add queue
DocumentWorkflowsApi addWorkflow POST /workflows Add workflow
DocumentWorkflowsApi deleteQueue DELETE /queues/{queueId} Delete queue
DocumentWorkflowsApi deleteWorkflow DELETE /workflows/{workflowId} Delete workflow
DocumentWorkflowsApi getDocumentWorkflow GET /documents/{documentId}/workflows/{workflowId} Get document workflow
DocumentWorkflowsApi getDocumentWorkflows GET /documents/{documentId}/workflows Get document workflows
DocumentWorkflowsApi getQueue GET /queues/{queueId} Get queue
DocumentWorkflowsApi getQueues GET /queues Get queues
DocumentWorkflowsApi getWorkflow GET /workflows/{workflowId} Get workflow
DocumentWorkflowsApi getWorkflowDocuments GET /workflows/{workflowId}/documents Get list of documents in workflow
DocumentWorkflowsApi getWorkflowQueueDocuments GET /queues/{queueId}/documents Get list of documents in queue
DocumentWorkflowsApi getWorkflows GET /workflows Get workflows
DocumentWorkflowsApi setWorkflow PUT /workflows/{workflowId} Set workflow
DocumentWorkflowsApi updateWorkflow PATCH /workflows/{workflowId} Update workflow
DocumentsApi addDocument POST /documents Add new document
DocumentsApi addDocumentUpload POST /documents/upload Add large document
DocumentsApi compressDocuments POST /documents/compress Compress multiple documents into a .zip file
DocumentsApi deleteDocument DELETE /documents/{documentId} Delete document
DocumentsApi deletePublishedDocumentContent DELETE /publications/{documentId} Delete published document's contents
DocumentsApi getDocument GET /documents/{documentId} Get document
DocumentsApi getDocumentContent GET /documents/{documentId}/content Get document's contents
DocumentsApi getDocumentIdUpload GET /documents/{documentId}/upload Get url to update large document
DocumentsApi getDocumentSyncs GET /documents/{documentId}/syncs Get document syncs
DocumentsApi getDocumentUpload GET /documents/upload Get url to add large document
DocumentsApi getDocumentUrl GET /documents/{documentId}/url Get document content url
DocumentsApi getDocuments GET /documents Get Documents listing
DocumentsApi getPublishedDocumentContent GET /publications/{documentId} Get published document's contents
DocumentsApi setDocumentRestore PUT /documents/{documentId}/restore Restore soft deleted document
DocumentsApi updateDocument PATCH /documents/{documentId} Update document
ESignatureApi addDocusignEnvelopes POST /esignature/docusign/{documentId}/envelopes Create Docusign Envelope request
ESignatureApi addDocusignRecipientView POST /esignature/docusign/{documentId}/envelopes/{envelopeId}/views/recipient Create Docusign Recipient View request
ESignatureApi addEsignatureDocusignEvents POST /esignature/docusign/events Add E-signature event
ExamineObjectsApi getExaminePdf GET /objects/examine/{id}/pdf Add Examine Pdf
ExamineObjectsApi getExaminePdfUrl GET /objects/examine/pdf Add Examine Pdf
GoogleIntegrationApi addGoogleDocumentExport POST /integrations/google/drive/documents/{documentId}/export Add Google Document Export
MappingsApi addMapping POST /mappings Add New Mapping
MappingsApi deleteMapping DELETE /mappings/{mappingId} Delete Mapping
MappingsApi getMapping GET /mappings/{mappingId} Get Mapping
MappingsApi getMappings GET /mappings Get Mappings
MappingsApi setMapping PUT /mappings/{mappingId} Set Mapping
OnlyofficeApi onlyOfficeDocumentEdit POST /onlyoffice/{documentId}/edit Edit onlyoffice document
OnlyofficeApi onlyOfficeDocumentNew POST /onlyoffice/new Create onlyoffice document
OnlyofficeApi onlyOfficeDocumentSave POST /onlyoffice/{documentId}/save Save onlyoffice document
PublicApi publicAddDocument POST /public/documents Public add document
PublicApi publicAddWebhook POST /public/webhooks/{webhooks+} Public add webhook
ReindexApi addReindexDocument POST /reindex/documents/{documentId} Reindex metadata on a document
RulesetsApi addRule POST /rulesets/{rulesetId}/rules Add New Rule
RulesetsApi addRuleset POST /rulesets Add New Ruleset
RulesetsApi deleteRule DELETE /rulesets/{rulesetId}/rules/{ruleId} Delete Rule
RulesetsApi deleteRuleset DELETE /rulesets/{rulesetId} Delete Ruleset
RulesetsApi getRule GET /rulesets/{rulesetId}/rules/{ruleId} Get Rule
RulesetsApi getRules GET /rulesets/{rulesetId}/rules Get Rules
RulesetsApi getRuleset GET /rulesets/{rulesetId} Get Ruleset
RulesetsApi getRulesets GET /rulesets Get Rulesets
RulesetsApi updateRule PATCH /rulesets/{rulesetId}/rules/{ruleId} Update Rule
RulesetsApi updateRuleset PATCH /rulesets/{rulesetId} Update Ruleset
SchemasApi addClassification POST /sites/{siteId}/classifications Add Classification
SchemasApi deleteClassification DELETE /sites/{siteId}/classifications/{classificationId} Delete Classification
SchemasApi getClassification GET /sites/{siteId}/classifications/{classificationId} Get Classification
SchemasApi getClassificationAttributeAllowedValues GET /sites/{siteId}/classifications/{classificationId}/attributes/{key}/allowedValues Get Classification's Attribute Allowed Values
SchemasApi getSitesClassifications GET /sites/{siteId}/classifications Get Sites Classifications
SchemasApi getSitesSchema GET /sites/{siteId}/schema/document Get Sites Schema
SchemasApi getSitesSchemaAttributeAllowedValues GET /sites/{siteId}/schema/document/attributes/{key}/allowedValues Get Attribute Allowed Values
SchemasApi setClassification PUT /sites/{siteId}/classifications/{classificationId} Set Classification
SchemasApi setSitesSchema PUT /sites/{siteId}/schema/document Set Sites Schema
SystemManagementApi addApiKey POST /sites/{siteId}/apiKeys Add API Key
SystemManagementApi addSite POST /sites Add Site
SystemManagementApi deleteApiKey DELETE /sites/{siteId}/apiKeys/{apiKey} Delete API Key
SystemManagementApi deleteOpensearchIndex DELETE /sites/{siteId}/opensearch/index Deletes site(s) OpenSearch index
SystemManagementApi deleteSiteGroup DELETE /sites/{siteId}/groups/{groupName} Deletes Site Group and permissions
SystemManagementApi getApiKeys GET /sites/{siteId}/apiKeys Get API Keys
SystemManagementApi getConfiguration GET /sites/{siteId}/configuration Get site configuration
SystemManagementApi getOpensearchIndex GET /sites/{siteId}/opensearch/index Get site(s) OpenSearch index settings
SystemManagementApi getSiteGroup GET /sites/{siteId}/groups/{groupName} Get group and permissions belonging to site
SystemManagementApi getSiteGroups GET /sites/{siteId}/groups Get group(s) and permissions belonging to site
SystemManagementApi getSites GET /sites Get site(s) access
SystemManagementApi getVersion GET /version Get FormKiQ version
SystemManagementApi setOpensearchIndex PUT /sites/{siteId}/opensearch/index Set site(s) OpenSearch index settings
SystemManagementApi setSiteGroupPermissions PUT /sites/{siteId}/groups/{groupName}/permissions Set Site's Group Permissions
SystemManagementApi updateConfiguration PATCH /sites/{siteId}/configuration Update site configuration
SystemManagementApi updateSite PATCH /sites/{siteId} Update Site
TagIndexApi indexSearch_0 POST /indices/search
UserActivitiesApi getDocumentUserActivities GET /documents/{documentId}/userActivities Get user activities for a document
UserActivitiesApi getUserActivities GET /userActivities Get user activities
UserManagementApi addGroup POST /groups Add a group
UserManagementApi addUser POST /users Add User
UserManagementApi addUserToGroup POST /groups/{groupName}/users Add User to a group
UserManagementApi deleteGroup DELETE /groups/{groupName} Delete Group
UserManagementApi deleteUsername DELETE /users/{username} Delete Username
UserManagementApi getGroup GET /groups/{groupName} Get a user group
UserManagementApi getGroups GET /groups Get list of user group(s)
UserManagementApi getListOfUserGroups GET /users/{username}/groups Returns a list of group user belongs to
UserManagementApi getUser GET /users/{username} Get a user
UserManagementApi getUsers GET /users Get list of user(s)
UserManagementApi getUsersInGroup GET /groups/{groupName}/users Get users in a group
UserManagementApi removeUsernameFromGroup DELETE /groups/{groupName}/users/{username} Remove Username From Group
UserManagementApi setUserOperation PUT /users/{username}/{userOperation} Set User Operation
WebhooksApi addWebhook POST /webhooks Add webhook
WebhooksApi addWebhookDocument POST /private/webhooks/{webhooks+} Add webhook
WebhooksApi addWebhookTag POST /webhooks/{webhookId}/tags Add webhook tag
WebhooksApi deleteWebhook DELETE /webhooks/{webhookId} Delete webhook
WebhooksApi getWebhook GET /webhooks/{webhookId} Get webhook
WebhooksApi getWebhookTags GET /webhooks/{webhookId}/tags Get webhook tags
WebhooksApi getWebhooks GET /webhooks Get webhooks
WebhooksApi updateWebhook PATCH /webhooks/{webhookId} Update webhook

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

Recommendation

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

Author

support@formkiq.com