The KRYSTAL DMS Web Services Application Programming Interface (API) gives your developers standard based access to data, content and document management features of KRYSTAL DMS - Premium Edition. With these API, you can build your bi-directional data transfers, document management customizations applications, and other applications that need to interface with your KRYSTAL DMS from remote locations.
You may want to use these API to:
Because these API is based on service-oriented architecture (SOA) and industry-standard technologies like SOAP and WSDL, your developers can use their choice of development tools to gain programmatic access to your organization's Document Management Repository.
These API enables easy integration of your enterprise systems with the documents and data stored in your KRYSTAL DMS system, enabling greater automation of document management tasks and processes.
The KRYSTAL DMS API supports a subset of the functionalities of the KRYSTAL DMS - Premium Edition user interface as outlined below.
Index | Method | Parameters | Response Type | Description |
---|---|---|---|---|
1 | signOn |
username password |
SignOnResponse | |
2 | signOut | authToken | SignOutResponse | |
3 | getDocumentClasses | authToken | DocumentClassesResponse | |
4 | getDocuments |
authToken classId |
DocumentsResponse | |
5 | getDocumentDetails |
authToken documentId revisionId |
DocumentDetailsResponse | |
6 | getDocument |
authToken documentId |
DocumentResponse | |
7 | getDocumentContent |
authToken documentId revisionId |
DocumentContentResponse | |
8 | getDocumentRevision |
authToken documentId revisionId |
DocumentRevisionResponse | |
9 | getDocumentIndexes |
authToken documentId revisionId |
DocumentIndexesResponse | |
10 | searchDocuments |
authToken classId searchText |
SearchDocumentsResponse | |
11 | searchDocumentsByIndexes |
authToken classId documentIndexes[] |
SearchDocumentsResponse | |
12 | createDocument |
authToken fileName fileBytes[] classId documentIndexes[] expiryDate comments |
CreateDocumentResponse | |
13 | deleteDocument |
authToken documentId |
DeleteDocumentResponse | |
14 | checkOutDocument |
authToken documentId |
CheckOutDocumentResponse | |
15 | checkInDocument |
authToken fileName fileBytes[] documentId majorVersion documentIndexes[] comments |
CheckInDocumentResponse | |
16 | cancelCheckout |
authToken documentId |
CancelCheckoutResponse | |
17 | updateIndexes |
authToken documentId documentIndexes[] |
UpdateIndexesResponse | |
18 | getDocumentRevisionHistory |
authToken documentId |
DocumentRevisionHistoryResponse | |
19 | getDocumentAccessHistory |
authToken documentId |
DocumentAccessHistoryResponse |
Once you have installed KRYSTAL DMS – Premium Edition version 2017 Release 4 or later, you will have access to the Web Services API.
Primeleaf team will provide you with the Web Services API URL needed to develop your custom built projects.
You will be able to access the WSDL file using following URL.
Where
Your_Server_IP is the IP Address or Fully Qualified Domain Name (FQDN) of server where KRYSTAL DMS is installed.
HTTP_Port is the port number on which KRYSTAL DMS is configured to be running.
To use this guide you must have basic knowledge of software development, SOAP-based Web Services and KRYSTAL DMS user interface.
In general, any KRYSTAL DMS API client application project will involve following steps.
Use the KRYSTAL DMS Web Services API Web Services Definition Language (WSDL) document to generate supporting code for executing SOAP-based client call on the API. Your development environment tool of choice should provide support for accomplishing this step.
Use the “Sign On” call to establish a session with the KRYSTAL DMS Web Services API. The “Sign On” call will return an “Authentication Token” that should be passed on to all the sub-sequent API calls.
Use the available API calls to accomplish a desired integration objective. You session will not expire automatically.
Use the “Sign Out” call to end the session.
The first step for any client application is to establish a sign on session. This can be achieved using the sign on call. When a client application invokes the sign on call, it passes a user name and password as user credentials. Upon receiving the client application sign on request, the API authenticates these credentials, and returns an “Authentication Token” object. This object is required for use in all subsequent API calls. After successfully completing the sign on call and retrieving the authentication token, a client application needs to set this authentication token in all subsequent calls as a means of authentication.
Session tokens do not expire automatically. Client applications that make infrequent sign on calls should make explicit sign out calls to prevent the accumulation of unnecessary open sessions. A limit is placed on the number of concurrent API sessions that an account can initiate. It is important to properly manage API sessions to avoid exceeding this limit. If the limit is reached, an error message will be returned, stating that the allowed number of concurrent sessions has been exceeded.
Name | Type | Required | Description |
---|---|---|---|
username | string | Y | User name for KRYSTAL DMS account |
password | string | Y | Password for the specified user |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SignOnResponse
|
Use the Sign Out call to end an API session. The last step for any client application is to end a session by signing out.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SignOutResponse
|
Use this API call to retrieve all the document classes to which authenticated user has at least read access.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentClassesResponse
|
Use this API call to get all documents which are active in the requested Document Class (folder). It returns array of document object stored in the requested Document Class (folder). All documents which are checked out are also returned.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
classId | int | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentsResponse
|
Use this API call to retrieve details of an existing document with the given identifier.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | |
revisionId | string | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentDetailsResponse
|
Use this API call to get the document (file) with the given identifier.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentResponse
|
Use this API call to get the content (extracted text) of the document with the given identifier.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | |
revisionId | string | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentContentResponse
|
Use this API call to get the specific version of the document (file) with the given identifier.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | |
revisionId | string | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentRevisionResponse
|
Use this API call to get the index information associated with the document.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | |
revisionId | string | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentIndexesResponse
|
Documents in the repository can be searched using this method for a given document class. All indexes and content of the document will be searched during this operation and all matching and active documents are returned using this API call.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
classId | int | Y | |
searchText | string | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SearchDocumentsResponse
|
To perform advance search on documents in the repository this method can be used for a given document class.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
classId | int | Y | |
documentIndexes | KDocumentIndex[] | Y |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SearchDocumentsResponse
|
To add a new document / create document into the document repository this method can be used. The document will be created in a specified document class only if user has create permissions on that document class.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
fileName | string | Y | File name of the document |
fileByte | byte[] | Y | Actual file content in byte format |
classId | int | Y | Document Class Identifier |
documentIndexes | KDocumentIndex[] | Y | Associated Document Indexes |
expiryDate | string | N | Document Expiry Date in dd-MMM-yyyy format (Example : 27-Oct-2017) |
comments | string | Y | comments / notes for new document |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CreateDocumentResponse
|
This API call will allow user to delete a document if user has delete permission on the document class in which document is stored. Document will not be deleted if it is aleady checked out.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | Document Identifier |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DeleteDocumentResponse
|
To checkout a document for editing and locking the document, user can use this API call.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | Document Identifier |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CheckOutDocumentResponse
|
To add a new document / create document into the document repository this method can be used. The document will be created in a specified document class only if user has create permissions on that document class.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
fileName | string | Y | File name of the document |
fileByte | byte[] | Y | Actual file content in byte format |
documentId | int | Y | Document Identifier |
majorVersion | boolean | Y | Flag indicating major version for document |
documentIndexes | KDocumentIndex[] | Y | Associated Document Indexes |
comments | string | Y | comments / notes for new document |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CheckInDocumentResponse
|
This API call will allow user to cancel checkout of a document if user has checked out the document.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | Document Identifier |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CancelCheckoutResponse
|
This API call will allow user to update indexes associated with given document.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | Document Identifier |
documentIndexes | KDocumentIndex[] | Y | New Indexes associated with Document |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UpdateIndexesResponse
|
To get complete revision history of document this method should be used.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | Document Identifier |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentRevisionHistoryResponse
|
To get complete access history of document this method should be used.
Name | Type | Required | Description |
---|---|---|---|
authToken | string | Y | Authentication Token received from SignOn method |
documentId | int | Y | Document Identifier |
Name | Type | Required | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DocumentAccessHistoryResponse
|
Name | Type | Description |
---|---|---|
classId | int | Unique identifier for the document class |
className | String | Name of the document class |
classDescription | String | Description for the document class |
created | String | String representation of creation date of the document class |
maximumFileSize | int | Maximum size of the file in bytes to be stored in the document class |
documentLimit | int | Maximum number of documents that can be stored in the document class |
documentIndexes | KDocumentIndex[] | Indexes associated with a document class |
Name | Type | Description |
---|---|---|
documentId | int | Unique identifier for the document |
revisionId | String | Current Revision Id for the document |
classId | int | Document class id to which document belongs |
documentType | String | Type of document |
status | String | Status of the Document => D = Deleted, A=Active , I – Inactive , H – Hidden, E – Checked Out |
created | String | String representation of creation date of the document |
modified | String | String representation of modification date of the document |
extension | String | Extension of the document file |
hasNote | byte | Flag indicating document contains notes or annotations |
lastAccessed | String | String representation of last accessed date of the document |
accessCount | int | No of times the document is accessed |
length | int | Length of the head revision of the document (file size in bytes) |
createdBy | String | String representation of expiry date of the document |
expiry | String | Name of the user who created the document |
fileName | String | Name of the document file |
modifiedBy | String | Name of the user who last modified the document |
score | Double | Search score of the document |
indexes | KDocumentIndex[] | Indexes associated with a document |
Name | Type | Description |
---|---|---|
id | int | Unique Identifier of the document index |
indexName | String | Name of the document index |
indexDescription | String | Description of the document index |
indexType | String | Type of Index – D- Date, N – Numeric , A- Auto , S – String, L - List |
operator | int | Comparison operator for searching |
value1 | String | Value of the index field for the document |
value2 | String | Second or higher value of the index field for document |
mandatory | Boolean | Flag indicating if the index is mandatory |
unique | Boolean | Flag indicating if the index value must be unqiue |
Name | Type | Description |
---|---|---|
userName | String | Name of the user who performed an action on document |
userAction | String | Revision Action Performed on the document |
documentId | int | Unique Identifier of the document |
revisionId | String | Revision Id of the document on which action is performed |
fileType | String | Type of document file |
comments | String | Comments on the document revision or action |
datetime | String | String representation of the date time on which action is performed by the user |
Name | Type | Description |
---|---|---|
objectId | int | Unique Identifier for the document / object |
objectType | String | Type of object, D – Document |
action | String | Action performed on the document / object |
userName | String | Name of the user who performed the action |
ipAddress | String | IP Address from which action was performed on document / object |
parameters | String | Additional parameters on the action |
actionDate | String | String representation of the date time on which action is performed by the user |
comments | String | Comments on the document revision or action |