What's new
This topic summarizes new features and enhancements introduced in Kofax PSIsafe API 12.2.0.
New file download methods
File chunking is now handled by the API user.
- CreateFileDownloadSessionAsync(CabinetID, DocumentID, VersionID): Prepares a file that will be available for download
from the API via the link "/api/files/download/FileStorage/{SessionID}" Returns an instance of the FileDownloadSession for the new
download session.
- CabinetID: The ID of the cabinet where the document stored.
- DocumentID: The ID of the document to download.
- VersionID: The ID of the version to download if versioning is being used on template. Use 0 as the ID to download the original version of the document.
- CloseFileDownloadSessionAsync(SessionID): Closes the current session. Returns true if the session was closed, and false
otherwise.
- SessionID: ID of the file download session to close.
- GetFileDownloadSessionAsync(SessionID): Returns the download session for the given session ID.
- SessionID: ID of the file download session to retrieve.
- GetFileDownloadSessionsAsync(): Gets the list of active download sessions for current user.
New PSIsafe Client Model classes
FileDownloadSession, newly added to represent an instance of a file download session, contains the following properties:
- SessionID
- CabinetID
- DocumentID
- VersionID
- CreateUserID
- CreateDateTime
- ExparationDateTime
- FileSize
New database tables
The following database tables have been added:
- FileDownloadSessions
- FileUploadSessions
- FileUploadParts
- SearchQueries
New business layer class
A new business layer class, class.busFileDownload, is added for file upload methods:
- The following methods are added to the business layer class:
- CreateDownloadSession()
- Check that the file exists and is available for this user.
- Create new record for the session in the FileDownloadSessions table.
- Create storage folder for the session.
-
CloseDownloadSession()
- Check that the session belongs to current user.
- Delete the records in the database for the session.
- Delete the storage folder for this session.
- GetDownloadSession()
- Read the session from the FileDownloadSessions database table.
- GetDownloadSessions()
- Read all the sessions from the FileDownloadSessions database table.
- CreateDownloadSession()
New file management class
The newly added class PSIGEN.Affinity.API.Client.FileManager contains new methods for uploading files.
New file upload methods
File chunking is handled by the API user.
- CreateFileUploadSessionAsync(RepositoryID, FileSize): Creates a new upload session that can be used to upload a file in
chunks. Returns an instance of the FileUploadSession for the new upload session.
- RepositoryID: The ID of the repository where the file being uploaded is stored.
- FileSize: The size of the file that is uploaded in this session (in bytes).
- UploadFilePartAsync(UploadSessionID, FilePartStream, FilePartNumber): Uploads one file chunk for the given file upload
session. Returns an instance of the FileUploadPart for the new file part.
- UploadSessionID: ID of the file upload session.
- FilePartStream: A Stream pointing to the file part to upload.
- FilePartNumber: Sequence number in the file for this file part.
- CommitFileUploadSessionAsync(UploadSessionID): Commits the upload session and begins the process of building the
uploaded file from the file chunks uploaded to the session. Once the file is built, the upload session and file chunks are deleted.
Returns an instance of the UploadedFile for the newly created uploaded file.
- UploadSessionID: ID of the file upload session to commit.
- DeleteFileUploadSessionAsync(UploadSessionID): Cancels an upload session and deletes it along with corresponding
uploaded file chunks.
- UploadSessionID: ID of the file upload session to delete.
- GetFileUploadSessionAsync(UploadSessionID): Returns the upload session for the give session ID.
- UploadSessionID: ID of the file upload session to retrieve.
- GetUploadedFilePartsAsync(UploadSessionID): Gets the list of file parts that have been uploaded to a given upload
session.
- UploadSessionID: ID of the file upload session to retrieve file parts for.
- GetFileUploadSessionsAsync(): Gets the list of active upload sessions.
New PSIsafe Client Model classes
The following client model classes are introduced:
- FileUploadSession: Represents an instance of a file upload session. Contains the following properties:
- SessionID
- RepositoryID
- CreateDateTime
- CreateUserID
- ExpirationDateTime
- FileUploadPartCount
- Status (New, ReceivingParts, Committed, BuildingFile, Completed, NotCompleted).
- FileSize
- FileUploadPart: Represents an instance of a file upload part. Contains the following properties:
- SessionID
- FilePartID
- FilePartNumber
- Size
- CreateDateTime
- UploadedFile: Represents the generated file from a completed session. Contains the following properties:
- UploadedFileID
- RepositoryID
- CreateDateTime
- FileSize
New process for overloaded versions of PSIsafe API
New methods for overloaded versions of the PSIsafe API make use of files uploaded using a new process.
- New methods match the current method definitions except that the fileStream parameter is replaced with an
UploadedFileID parameter that specifies the ID of the previously uploaded file to use.
- ImportDocumentAsync() updated
- CheckInDocumentAsync() updated
News PSIsafe REST API features
- New PSIsafe REST API endpoint for file uploads: api/files/upload
- New controller for REST API methods: FilesController
- New endpoints for processing chunked uploads:
- Create upload session (POST): "api/files/upload/session"
- Upload part of file (PUT): "api/files/upload/session/{uploadSessionID}"
- Commit upload session (POST): "api/files/upload/session/{uploadSessionID}"
- Delete upload session (DELETE): "api/files/upload/session/{uploadSessionID}"
- Get upload session (GET): "api/files/upload/session/{uploadSessionID}"
- Get uploaded file parts (GET): "api/files/upload/session/{uploadSessionID}/parts"
- Get upload sessions (GET): "api/files/upload/session"
- New endpoints for processing file downloads:
- Create download session (POST): "/api/files/download/session/create"
- Close download session (POST): "/api/files/download/session/{SessionID}/close"
- Get download session (GET): "/api/files/download/session/{SessionID}"
- Get download sessions (GET): "/api/files/download/sessions"
Additional Feature Enhancements
ID | Title |
1790744 | Add new method to retrieve templates using the "GetValidTemplates" database function |
1708286 | File Upload enhancements |
1712685 | Add new "GetDocumentAttachmentsAsync" call to the Documents class |
1712690 | Add "documentIndexValues" and "lineItemRecords" parameters to "CreateDocumentFromTemplateAsync" call |
1712682 | Add Managers/Extensions list to Template model and load when retrieving Templates |
1712694 | File transfer improvements |
1712714 | Add call to "GetManagersForTemplate" to the Managers Class |
1751147 | Add three more sort columns/parameters to API "DocumentSortOn" enumerator |