This runs the web service
static
void
run
()
KTWebService
KTWebService
()
Adds a document to the repository.
kt_document_detail.
add_document
(string $session_id, int $folder_id, string $title, string $filename, string $documenttype, string $tempfilename)
-
string
$session_id
-
int
$folder_id
-
string
$title
-
string
$filename
-
string
$documenttype
-
string
$tempfilename
Changes the owner of a document.
kt_response.
change_document_owner
(string $session_id, int $document_id, string $username, string $reason)
-
string
$session_id
-
int
$document_id
-
string
$username
-
string
$reason
Change the document type.
kt_response
change_document_type
(string $session_id, int $document_id, string $documenttype)
-
string
$session_id
-
int
$document_id
-
string
$documenttype
Does a document checkin.
kt_document_detail.
checkin_document
(string $session_id, $document_id, string $filename, $reason, string $tempfilename, $major_update, int $folder_id, string $title, string $documenttype)
-
string
$session_id
-
int
$folder_id
-
string
$title
-
string
$filename
-
string
$documenttype
-
string
$tempfilename
-
$document_id
-
$reason
-
$major_update
Does a document checkout.
kt_response.
checkout_document
(string $session_id, int $document_id, string $reason)
-
string
$session_id
-
int
$document_id
-
string
$reason
Copy a document to another folder.
kt_response
copy_document
(string $session_id, int $document_id, int $folder_id, string $reason, string $newtitle, string $newfilename)
-
string
$session_id
-
int
$document_id
-
int
$folder_id
-
string
$reason
-
string
$newtitle
-
string
$newfilename
Makes a copy of a folder in another location.
kt_response
copy_folder
(string $session_id, $source_id, $target_id, string $reason, int $sourceid, int $targetid)
-
string
$session_id
-
int
$sourceid
-
int
$targetid
-
string
$reason
-
$source_id
-
$target_id
Creates a new folder.
kt_folder_detail.
create_folder
(string $session_id, int $folder_id, string $folder_name)
-
string
$session_id
-
int
$folder_id
-
string
$folder_name
Deletes a document.
kt_response
delete_document
(string $session_id, int $document_id, string $reason)
-
string
$session_id
-
int
$document_id
-
string
$reason
Removes the workflow process on a document.
kt_response
delete_document_workflow
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Deletes a folder.
kt_response.
delete_folder
(string $session_id, int $folder_id, string $reason)
-
string
$session_id
-
int
$folder_id
-
string
$reason
Returns a reference to a file to be downloaded.
kt_response.
download_document
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns document detail given a document_id.
kt_document_detail.
get_document_detail
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns document detail given a document name which could include a full path.
kt_document_detail.
get_document_detail_by_name
(string $session_id, string $document_name, [string $what = 'T'])
-
string
$session_id
-
string
$document_name
-
string
$what: @what
Returns the metadata on a document.
kt_metadata_response
get_document_metadata
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns the document transaction history.
kt_transaction_history_response
get_document_transaction_history
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns a list of document types.
kt_document_types_response.
get_document_types
(string $session_id)
Returns the version history.
kt_version_history_response
get_document_version_history
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns the current state that the document is in.
kt_response
get_document_workflow_state
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns a list of available transitions on a give document with a workflow.
kt_workflow_transitions_response
get_document_workflow_transitions
(string $session_id, int $document_id)
-
string
$session_id
-
int
$document_id
Returns the contents of a folder.
kt_folder_contents
get_folder_contents
(string $session_id, int $folder_id, [int $depth = 1], [string $what = 'DF'])
-
string
$session_id
-
int
$folder_id
-
int
$depth
-
string
$what
Returns folder detail given a folder_id.
kt_folder_detail.
get_folder_detail
(string $session_id, int $folder_id)
-
string
$session_id
-
int
$folder_id
Returns folder detail given a folder name which could include a full path.
kt_folder_detail.
get_folder_detail_by_name
(string $session_id, string $folder_name)
-
string
$session_id
-
string
$folder_name
This is used by all exposed functions dependant on the sessionid.
KTAPI
&get_ktapi
(
string $session_id)
Creates a new session for the user.
kt_response
login
(string $username, string $password, [string $ip = null])
-
string
$username
-
string
$password
-
string
$ip
Closes an active session.
kt_response.
logout
(string $session_id)
Move a folder to another location.
kt_response
move_document
(string $session_id, int $document_id, int $folder_id, string $reason, string $newtitle, string $newfilename)
-
string
$session_id
-
int
$document_id
-
int
$folder_id
-
string
$reason
-
string
$newtitle
-
string
$newfilename
Moves a folder to another location.
kt_response.
move_folder
(string $session_id, $source_id, $target_id, string $reason, int $sourceid, int $targetid)
-
string
$session_id
-
int
$sourceid
-
int
$targetid
-
string
$reason
-
$source_id
-
$target_id
Starts a transitions on a document with a workflow.
kt_response
perform_document_workflow_transition
(string $session_id, int $document_id, string $transition, string $reason)
-
string
$session_id
-
int
$document_id
-
string
$transition
-
string
$reason
Renames the document filename.
kt_response
rename_document_filename
(string $session_id, int $document_id, string $newfilename)
-
string
$session_id
-
int
$document_id
-
string
$newfilename
Changes the document title.
kt_response
rename_document_title
(string $session_id, int $document_id, string $newtitle)
-
string
$session_id
-
int
$document_id
-
string
$newtitle
Renames a folder.
kt_response.
rename_folder
(string $session_id, int $folder_id, string $newname)
-
string
$session_id
-
int
$folder_id
-
string
$newname
Start a workflow on a document
kt_response
start_document_workflow
(string $session_id, int $document_id, string $workflow)
-
string
$session_id
-
int
$document_id
-
string
$workflow
Undoes a document checkout.
kt_response.
undo_document_checkout
(string $session_id, int $document_id, string $reason)
-
string
$session_id
-
int
$document_id
-
string
$reason
Updates document metadata.
kt_response
update_document_metadata
(string $session_id, int $document_id, array $metadata)
-
string
$session_id
-
int
$document_id
-
array
$metadata
void
__dispatch
( $methodname)