Web service core document action

From KnowledgeTree Document Management Made Simple

Jump to: navigation, search

Contents


adding a document to the repository

Adding a document to the repository via web service methods can be done in two ways:

  • a single web service request with the file content being base64 encoded
  • a file is transmitted to the system via HTTP POST, and followed by a web service request

The first approach is very easy to implement, but has a drawback that it is not ideal when dealing with large files. Encoding of files is typically done in memory, so there may be significant overhead on the client and server. Furthermore, a base64 encoded file is about 1.5 times the original size. This not only is a drain on memory, but will impact on bandwidth utilisation.

The second approach performs much better with larger files, as HTTP POST requests can be dealt with quite efficiently, and there is no overhead of the encoding process.

adding a base64 encoded file to the repository

add_base64_document ( session : string, folder_id : integer, title : string, filename : string, document_type : string, base64 : string) :  kt_document_detail 
add_base64_document_with_metadata ( session : string, folder_id : integer, title : string, filename : string, document_type : string, base64 : string , metadata :  kt_metadata_fieldsets, sysdata :  kt_sysdata ) :  kt_document_detail 


adding a file with the 2 phase add process

add_document ( session : string, folder_id : integer, title : string, filename : string, document_type : string, temp_filename : string) : kt_document_detail
add_document_with_metadata ( session : string, folder_id : integer, title : string, filename : string, document_type : string, temp_filename : string , metadata :  kt_metadata_fieldsets, sysdata : kt_sysdata ) : kt_document_detail

modifying a document

checking-out a document with a base64 encoded result

checkout_base64_document ( session : string, document_id : integer, reason : string, download : boolean) :  kt_document_detail 


checking-out a document returning a download URL

checkout_document ( session : string, document_id : integer, reason : string, download : boolean) :  kt_document_detail 


checking-in a base64 encoded file

checkin_base64_document ( session : string, document_id : integer, filename : string, reason : string, base64 : string, major_update : boolean) :  kt_document_detail 
checkin_base64_document_with_metadata ( session : string, document_id : integer, filename : string,   reason : string, base64 : string , metadata :  kt_metadata_fieldsets, sysdata :  kt_sysdata ) :  kt_document_detail 


checking-in a document with the 2 phase check-in process

checkin_base64_document ( session : string, document_id : integer, filename : string, reason : string, temp_filename : string, major_update : boolean) : kt_document_detail
checkin_base64_document_with_metadata ( session : string, document_id : integer, filename : string,   reason : string, temp_filename : string , metadata :  kt_metadata_fieldsets, sysdata :  kt_sysdata ) :  kt_document_detail kt_metadata_fieldsets


cancel document modification

undo_document_checkout ( session : string, document_id : integer, reason : string) :  kt_document_detail 


downloading a document

downloading a document with a base64 encoded result

download_base64_document ( session : string, document_id : integer) : kt_response

downloading a document returning a download URL

download_document ( session : string, document_id : integer) : kt_response

updating document metadata

update_document_metadata ( session : string, document_id : integer, metadata :  kt_metadata_fieldsets, sysdata :  kt_sysdata ) :  kt_document_detail 
Personal tools