API Reference
API Connector Reference
We offer API Connector libraries that authenticate through oAuth service, get a session key, send API request to the API service and receive response written for C#, Java, JavaScript and PHP. You can download the libraries from API Libraries. Also, you can find the source codes at the bottom of this page.
You will need to add one of these libraries to your project as a first step, depending on your project development platform.
API Session Support
API Connection can be made either stateless or session-based. The default action is to connect to the server without sessions. If you would like to enable session-based connections, you need to set the session parameter to “true”.
Authentication
Applications accessed via API can be public or private. If the application is private, you must get the API Key and API Password from SpreadsheeetWEB Control Panel and add them to your code.
API Object
.NET
SpreadsheetWebAPI Object
Properties
Name
|
Description
|
|
---|---|---|
ClientIdentifier | optional | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
ClientSecret | optional | API Password obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
SupportSession | optional | Used for enabling or disabling session-based connections. Default value is “false”. Assigned at object creation. |
APIServiceURL | required | End-point of SpreadsheetWEB API service. |
OAuthServiceURL | required | End-point of SpreadsheetWEB Authorization service. |
ApiRequest Object
Properties
Name
|
Type
|
Description
|
---|---|---|
authToken | string | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
appId | string | Application ID of the calculation engine. |
appKey | string | Application Key of the calculation engine. |
recordId | string | ID of record to save output results to. |
username | string | Username who saves the result. |
inputList | IDictionary<string, List<string>> | Inputs sent to calculation engine for calculations. |
outputList | IList<string > |
Outputs to be received after calculations are done. |
sessionID | string | User session ID. |
save | boolean | Whether to save the result to database or not. |
ApiEmailRequest Object
Properties
Name
|
Type
|
Description
|
---|---|---|
authToken | string | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
subject | string | Subject of email. |
body | string | Body of email. |
from | string | Sender of email. |
to | string | Receiver of email. |
cc | string | Cc of email. |
bcc | string | Bcc of email. |
attachments | IList<string> | Email attachment files data as string. |
fileNames | IList<string> | Email attachment file names. |
filesToConvertPdf | IList<int> | Email attachment files that are pdf format. |
hostUrl | string | Email sender server URL. |
fitToPage | string | Whether to set pdf file attachments if any to fit into page. |
size | string | Size for pdf file attachments if any. |
orientation | string | Orientation for pdf file attachments if any. |
ApiPdfRequest Object
Properties
Name
|
Type
|
Description
|
---|---|---|
authToken | string | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
htmlCode | string | Html code that will be converted into pdf. |
title | string | Title of pdf document. |
hostUrl | string | Host URL of the server containing images, styles, javascript files and other external resources. |
fitToPage | string | Whether to set pdf file attachments if any to fit into page. |
orientation | string | Orientation for pdf file attachments if any. |
ApiPdfRangeRequest Object
Properties
Name
|
Type
|
Description
|
---|---|---|
authToken | string | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
appId | string | Application ID of the calculation engine. |
appKey | string | Application Key of the calculation engine. |
sessionId | string | User session ID. |
pageIndex | string | Page number where the export ranges are set from Wizard. |
inputs | string | Inputs sent to calculation engine for calculations. |
ApiGenerateDocumentRequest Object
Properties
Name
|
Type
|
Description
|
---|---|---|
authToken | string | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
documentKey | string | Key generated in the Control Panel UI for the specific document. |
mappings | IDictionary<string, string> | A dictionary of <string, string>, where key is text to replace and value is text to be replaced with. |
outputMode | DocumentOutputMode | Enum value for what to do with the document after it is generated:
[0: ReturnDocument]: Return the document as a byte array in the $.parseJSON(response).Document. [1: StoreInFileSystem]: Store the file on the server and return a guid receipt for merge |
printMode | DocumentPrintMode | Enum value for what format the output should be returned as:
[0: PDF]: Document will be returned as PDF document. [1: Word]: Document will be returned as a Word (.DOCX document). |
ApiMergeDocumentsRequest Object
Properties
Name
|
Type
|
Description
|
---|---|---|
authToken | string | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
cacheKeys | IList<string> | List of cache keys corresponding to the receipts from running GenerateDocument with OutputMode = StoreInFileSystem. |
printMode | DocumentPrintMode | Enum value for what format the output should be returned as:
[0: PDF]: Document will be returned as PDF document. [1: Word]: Document will be returned as a Word (.DOCX document). |
deleteCachedFiles | boolean | Enum value for what to do with the document after it is generated:
[0: ReturnDocument]: Return the document as a byte array in the $.parseJSON(response).Document. [1: StoreInFileSystem]: Store the file on the server and return a guid receipt for merge |
Methods
GetResult()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
GetRecord()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
SendMail()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiEmailRequest | Includes all properties of request. |
ExportPdf()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRequest | Includes all properties of request. |
ExportPdfByRange()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRangeRequest | Includes all properties of request. |
GenerateDocument()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiGenerateDocumentRequest | Includes all properties of request. |
MergeDocuments()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiMergeDocumentsRequest | Includes all properties of request. |
Java
SpreadsheetWebAPI Object
Properties
Name
|
Description
|
|
---|---|---|
ClientIdentifier | optional | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
ClientSecret | optional | API Password obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
SupportSession | optional | Used for enabling or disabling session-based connections. Default value is “false”. Assigned at object creation. |
APIServiceURL | required | End-point of SpreadsheetWEB API service. |
OAuthServiceURL | required | End-point of SpreadsheetWEB Authorization service. |
Methods
GetResult()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
GetRecord()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
SendMail()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiEmailRequest | Includes all properties of request. |
ExportPdf()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRequest | Includes all properties of request. |
ExportPdfByRange()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRangeRequest | Includes all properties of request. |
GenerateDocument()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiGenerateDocumentRequest | Includes all properties of request. |
MergeDocuments()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiMergeDocumentsRequest | Includes all properties of request. |
SswebAPI Object
Properties
Name
|
Description
|
|
---|---|---|
ClientIdentifier | optional | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
ClientSecret | optional | API Password obtained for SpreadsheetWEB Control Panel. Used if the application is private. Assigned at object creation. |
SupportSession | optional | Used for enabling or disabling session-based connections. Default value is “false”. Assigned at object creation. |
APIServiceURL | required | End-point of SpreadsheetWEB API service. |
OAuthServiceURL | required | End-point of SpreadsheetWEB Authorization service. |
Methods
GetResult()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
GetRecord()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
SendMail()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiEmailRequest | Includes all properties of request. |
ExportPdf()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRequest | Includes all properties of request. |
ExportPdfByRange()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRangeRequest | Includes all properties of request. |
GenerateDocument()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiGenerateDocumentRequest | Includes all properties of request. |
MergeDocuments()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiMergeDocumentsRequest | Includes all properties of request. |
Parameters
Name
|
Description
|
---|---|
ClientIdentifier | API Key obtained for SpreadsheetWEB Control Panel. Used if the application is private. |
ClientSecret | API Password obtained for SpreadsheetWEB Control Panel. Used if the application is private. |
SupportSession | Used for enabling or disabling session-based connections. |
APIServiceURL | End-point of SpreadsheetWEB API service. |
OAuthServiceURL | End-point of SpreadsheetWEB Authorization service. |
AuthToken | Internal variable to hold the AuthToken key when OAuth authentication is used for a private application |
SessionID | Internal variable to hold SessionID value when SupportSession input is TRUE |
Output | Holds the json output received from Web API service |
Methods
GetResult()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
GetRecord()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiRequest | Includes all properties of request. |
SendMail()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiEmailRequest | Includes all properties of request. |
ExportPdf()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRequest | Includes all properties of request. |
ExportPdfByRange()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiPdfRangeRequest | Includes all properties of request. |
GenerateDocument()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiGenerateDocumentRequest | Includes all properties of request. |
MergeDocuments()
Parameter
|
Type
|
Description
|
---|---|---|
request | ApiMergeDocumentsRequest | Includes all properties of request. |