How to use the API
Once the IceViewer HTML5 is installed, developers can take advantage of the API calls.
To call the API, one has to send a regular POST request to one of the API pages with the required parameters.
|
Compatibility with other programming languages POST requests are standard request methods over HTTP protocol, therefore these APIs can be called from any programming language which supports POST request methods, such as Javascript, Java, C++, C#. |
JavaScript Code Examples:
The following example will call the GetDocumentInformation API Endpoint, and get the Document Information for the file “c:\iceviewer\mydocument.tif” using the FileEngine Content-Engine.
|
var API_GetDocumentInformation = "API/GetDocumentInformation.cshtml"; function GetDocumentInformation(documentid, ce) { $.ajax({ type: "POST", url: API_GetDocumentInformation, data: { DocumentID: documentid /* DocuemntID */, CE: ce /* Content-Engine*/ }, success: function (result) { // obtained document information let Info = JSON.parse(result); } }); } GetDocumentInformation("c:\iceviewer\mydocument.tif", 1 /*FileEngine*/); |
Once the Session is started and the API hash is obtained, calling another API using the hash.
