• |
The Archive Manager SDK allows 3rd party application developers to interface with the archive for creation and retrieval of content and information. The Archive Manager SDK provides a high-level .NET class library that communicates with the Archive Manager RESTful Web Service API. SDK code documentation can be found in the Quest.AM.Public.Documentation.chm file.
The types and interfaces included in Quest.AM.Public and Quest.AM.Public.Interfaces are shared between the internal system and the SDK. These types are used when creating new messages or accessing certain message properties.
The primary Object is a class implementation of the ISDKInstance interface called ArchiveManager. The ArchiveManager class describes the Archive Manager RESTful Web Service API endpoint to which you are talking. The constructor takes a base URL and application name.
Login must be called to authenticate to the endpoint. It will return the ISDKLogin Object for the authenticated user f successful. The ISDKLogin Object contains a property for the login’s primary mailbox and a collection of mailboxes the login has delegated to it. The last argument changes the authentication mode to either Basic or Windows authentication. If the API endpoint is configured for Anonymous authentication, this argument should be set to false. If the API endpoint is configured for Windows authentication, this argument should be set to true. Passing a null username causes the application to authenticate as the user executing the application.
There is a collection Object for each of the primary types. In this example, ISDKMailboxCollection myMailboxes contains an enumerable property called “Items” that can be used to access each of the individual ISDKMailbox Objects within the collection.
The SDK consists of many relationships branching from the ArchiveManager Object. All of the SDK Objects start with SDK followed by the Model for which they provide navigation. For example, SDKMailbox is the access Object for the Mailbox Model. The Mailbox Model contains the property data related to the mailbox, but cannot navigate to mailbox folders or mailbox messages. The SDKMailbox Object contains relationship access properties to allow navigation to an ISDKFoldersCollection Object or ISDKMessagesCollection Object.
Each ISDKCollection provides a GetCount() method that can be used to retrieve the count of the collection without a full enumeration. Using Linq extensions such as Count() or Where() on the Items enumerable can cause performance issues because they operate on the entire collection, causing the yielded self-filling enumerable to be fully retrieved and processed locally. Using the ISDKCollection.GetCount() method performs a SQL query to calculate the number of records, and is far less expensive than retrieving all records.
Any time an Object property is used, the SDK reissues the request for the data. In most cases, you will want to store the data you wish to access in its own variable to reduce sub requests while using Linq. For example, the following code would cause a new lookup for MyLogin for each item in the Mailboxes collection and would cause extra bandwidth to be used.
Each time archiveManager.MyLogin.Id is evaluated, a request for MyLogin will be executed first. The more efficient way to perform this Linq lookup is to store MyLogin in an ISDKLogin Object. This way the evaluation of the ISDKLogin Id property does not cause a new request to lookup MyLogin.
The SDK Objects contain methods to Refresh or Save. This allows you to make changes to an object and save or revert changes by calling Save or Refresh. Certain properties cannot be change and calling Save may throw an exception.
© ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center