Skip to content

Latest commit

 

History

History
225 lines (176 loc) · 8.52 KB

DocumentVersionsApi.md

File metadata and controls

225 lines (176 loc) · 8.52 KB

DocumentVersionsApi

All URIs are relative to http://localhost

Method HTTP request Description
deleteDocumentVersion DELETE /documents/{documentId}/versions/{versionKey} Delete document version
getDocumentVersions GET /documents/{documentId}/versions Get document's versions
setDocumentVersion PUT /documents/{documentId}/versions Set version of document

deleteDocumentVersion

DeleteResponse deleteDocumentVersion(documentId, versionKey, siteId, shareKey)

Delete document version

Delete a specific previous document version; ONLY available with FormKiQ Pro and Enterprise

Example

// 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.DocumentVersionsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    // Configure AWS Signature V4 authorization
    defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE")
    
    DocumentVersionsApi apiInstance = new DocumentVersionsApi(defaultClient);
    String documentId = "documentId_example"; // String | Document Identifier
    String versionKey = "versionKey_example"; // String | Version Key (version key required URL encoding)
    String siteId = "siteId_example"; // String | Site Identifier
    String shareKey = "shareKey_example"; // String | Share Identifier
    try {
      DeleteResponse result = apiInstance.deleteDocumentVersion(documentId, versionKey, siteId, shareKey);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DocumentVersionsApi#deleteDocumentVersion");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
documentId String Document Identifier
versionKey String Version Key (version key required URL encoding)
siteId String Site Identifier [optional]
shareKey String Share Identifier [optional]

Return type

DeleteResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 200 OK * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

getDocumentVersions

GetDocumentVersionsResponse getDocumentVersions(documentId, siteId, limit, shareKey, next)

Get document's versions

Get a listing of document content and metadata versions; ONLY available with FormKiQ Pro and Enterprise

Example

// 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.DocumentVersionsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    // Configure AWS Signature V4 authorization
    defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE")
    
    DocumentVersionsApi apiInstance = new DocumentVersionsApi(defaultClient);
    String documentId = "documentId_example"; // String | Document Identifier
    String siteId = "siteId_example"; // String | Site Identifier
    String limit = "10"; // String | Limit Results
    String shareKey = "shareKey_example"; // String | Share Identifier
    String next = "next_example"; // String | Next page of results token
    try {
      GetDocumentVersionsResponse result = apiInstance.getDocumentVersions(documentId, siteId, limit, shareKey, next);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DocumentVersionsApi#getDocumentVersions");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
documentId String Document Identifier
siteId String Site Identifier [optional]
limit String Limit Results [optional] [default to 10]
shareKey String Share Identifier [optional]
next String Next page of results token [optional]

Return type

GetDocumentVersionsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 200 OK * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -

setDocumentVersion

SetDocumentVersionResponse setDocumentVersion(documentId, setDocumentVersionRequest, siteId)

Set version of document

Set document to a previous document version; ONLY available with FormKiQ Pro and Enterprise

Example

// 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.DocumentVersionsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("http://localhost");
    // Configure AWS Signature V4 authorization
    defaultClient.setAWS4Configuration("YOUR_ACCESS_KEY", "YOUR_SECRET_KEY", "REGION", "SERVICE")
    
    DocumentVersionsApi apiInstance = new DocumentVersionsApi(defaultClient);
    String documentId = "documentId_example"; // String | Document Identifier
    SetDocumentVersionRequest setDocumentVersionRequest = new SetDocumentVersionRequest(); // SetDocumentVersionRequest | 
    String siteId = "siteId_example"; // String | Site Identifier
    try {
      SetDocumentVersionResponse result = apiInstance.setDocumentVersion(documentId, setDocumentVersionRequest, siteId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DocumentVersionsApi#setDocumentVersion");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
documentId String Document Identifier
setDocumentVersionRequest SetDocumentVersionRequest
siteId String Site Identifier [optional]

Return type

SetDocumentVersionResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 200 OK * Access-Control-Allow-Origin -
* Access-Control-Allow-Methods -
* Access-Control-Allow-Headers -
400 400 OK -