Show/Hide Toolbars

Therefore Web API Programming Interface 1.0

Standard Configuration Settings in the Thereforeā„¢ Solution Designer

 

Described below are settings specific for Web API Server. Some settings are used by both Web API and XML Web server.

 

WebAPI.Settings.Connectivity     WebAPI.Settings.Advanced

 

 

Name

Description

Port

Port on which Web API Server and XML Web Server are listening for connections.

Use Secure Connection (https)

Check to enable secure connection for Web API Server and XML Web Server.

Enable XML Web Services API

Enable/disable Web API. It is Enabled by default.

API - Detailed Exceptions

Include/exclude information on managed exceptions in the details of SOAP errors returned to the client. This should only be enabled during development.

API - Maximum Connections

Maximum number of parallel connections supported by the Web API. A higher number results in better performance but higher server load. Set to 0 for default (auto) settings.

API - Publish WSDL

Enable/disable the publishing of metadata information about Web API - this needs to be enabled to download WSDL information of the interface.

URL format to get WSDL file is http(s)//<server_address>:<port_number>/theservice/v0001?singlewsdl, where v0001 is for the API contract version 1.

API Enabled

Enable/disable the Web API Service.

API Endpoints

Enable/disable certain endpoints for the Web API Service.

 

 

Extended Configuration Settings in System Registry

You can specify extended configuration settings in Windows registry to control certain Web API server behaviors.

These settings are stored in Windows registry.

 

Which path in Registry should be used?

For a Local System account use HKEY_LOCAL_MACHINE\SOFTWARE\Therefore\WebServiceAPI.

For a user account you can use HKEY_LOCAL_MACHINE\SOFTWARE\Therefore\WebServiceAPI or HKEY_CURRENT_USER\Software\Therefore\WebServiceAPI for the given user.

 

note

If both keys are presented, ONLY ONE is used and this is HKEY_CURRENT_USER\Software\Therefore\WebServiceAPI but another HKEY_LOCAL_MACHINE\... key is ignored.

 

You can find registry sample settings in the following screenshot:

WebAPI.Settings.Registry Editor

 

 

List of the settings (default value is used if the setting does not exist in Windows registry):

 

Name

Type

Description

BatchCacheItemExpirationMinutes

REG_DWORD

Overrides expiration time for batch operations in minutes. This is applicable for StartCreateDocumentBatch, StartUpdateDocumentBatch, SubmitCreateDocumentBatch, SubmitUpdateDocumentBatch and UploadDocStreamToBatch operations. It is a period of time when the data uploaded on the server will be stored and is waiting for submission.
The default value is 30 minutes.

EnableRestEndpoint

REG_DWORD

Enables the JSON/XML (REST) endpoint of the WebAPI.

The default value is 0 - disabled.

HostName

REG_SZ

By default the Web API uses the current server name to listen incoming connections. This settings can be used to override the HostName for troubleshooting purposes.

LogFileMessageFormat

REG_SZ

Overrides the default format of a message in the log file. See Log4Net RollFileAppender.Layout property.
The default value is "%utcdate UTC %-5level [%2thread] - %message %newline%exception".

LogFileMessageLevel

REG_SZ

Overrides default level of logged messages. See Log4Net RollingFileAppender.Threshold property for more details.

The default value is "DEBUG".

LogFileName

REG_SZ

Overrides default output file name to log messages. See Log4Net RollFileAppender.File property for more details.
The default value is "%ProgramData%/Therefore/Logs/therefore_web_api.log".

MaxLogFileSize

REG_SZ

Defines maximum size of the log file.

The default value is "10MB".

MaxLogFilesToBackup

REG_DWORD

Defines the number of archived log files. Older files will be deleted if this number is reached.

The default value is 10.

DisableNodeNameResolution

REG_DWORD

Set to True to disable resolution of the Web API client host name (IP address of the client will be used instead of the name). Node name is used to connect to Therefore Server via normal API. The default value is False (enabled). In some circumstances node name resolution can take a lot of time. In this case you can set this setting to True to improve performance.

IsCrossOriginAllowed

REG_DWORD

Set to 1 to allow cross origin resource sharing for the Web API server (for all tenants if applicable). Otherwise set to 0 (don't allow).

Default value is 0 (don't allow).

CrossOriginCacheAge

REG_DWORD

Defines value for Access-Control-Max-Age. The Access-Control-Max-Age header indicates how long (in seconds) the results of a preflight request can be cached.

Default value is 86400 (seconds).

MaxFileSizeForSendingToClientMB

REG_DWORD

Set maximum file(s) size (in MB) allowed to be send in request (for all the files being sent) for the following Web API operations: GetDocumentStream, GetConvertedDocStreams, GetConvertedDocStreamsRaw, ConvertDocStreamsAndSendByEmail.

Default is 250 MB.

WebAPITempFolder

REG_SZ

Overrides the default path to Web API Temp folder.

 

 

info

When the Web API server starts (it runs as part of the Thereforeā„¢ XML Web Service), applied configuration settings are logged in the Windows event log.

You can check the Windows Application Logs to see the settings that were applied.

 

Ā© 2023 Therefore Corporation, all rights reserved.