Server settings for Page Cache - EcoSys - Customization & Programming - Hexagon

EcoSys Web Service API Usage Documentation

Language
English
Product
EcoSys
Search by Category
Customization & Programming
EcoSys Version
9.1

The server settings can be used to control the page cache and to check any performance issues. The following are some of the server settings for REST API GET calls:

Server Setting Key

Default Value

Description

restapi.pageCache.expirationTime (seconds)

2 times min

When the session thread runs, it looks at the last time the page was accessed in the session using the command 'restapi.pageCache.expirationTime' and logs out if the session is idle for a long time.​

restapi.pageCache.heapSize​

32

Used to manage the size of cache.

To manage cache, this setting must be used by default. To use entries, set restapi.pageCache.heapSize=0

restapi.pageCache.offHeapSize (MB)

0

Controls Off heap size

restapi.pageCache.fileSize​ (MB)

0

Controls page cache file size

restapi.pageCache.statistics (Boolean)

false

Controls cache statistics

server.sessionMaintenance.intervalMinutes​

15

Controls the rate at which the session cleanup thread runs

While setting restapi.pageCache.offHeapSize > 0 in the EcoSys system configuration, the Java Option ‘'-XX:MaxDirectMemorySize' must also be set in the Application Server.

The XX:MaxDirectMemorySize setting must be used with 'restapi.pageCache.offHeapSize' setting. The same values must be set for both XX:MaxDirectMemorySize and restapi.pageCache.offHeapSize.

Passing Runtime Parameters for REST

Runtime parameters for defined object views or events may be passed as URL parameters. They should be identified using the id of each defined parameter (not its caption). For lookup-type parameters, either the internal database id or the canonical display identifier (e.g. id or short name) of the referenced object can be used.

Example:

http://prod.ecosys.com/ecosys/api/restxml/Projects/?proj=ABC&startdate=2013-01-01

Alternatively, runtime parameters may be used to specify URL components following the name of the API. In this mode, all parameter values must be represented in their defined sequence. This mode enables a more URL-centric representation, typically for a single, uniquely identified object.

Example of alternative URL syntax:

http://prod.ecosys.com/ecosys/api/restxml/Projects/ABC/2013-01-01

Due to default behavior in Apache-based application servers such as Tomcat and JBoss for encoded forward slashes ("/" as "%2F"), this syntax will not work by default if the parameter values contain encoded forward slashes, and the server will return an error response code of 404.

If parameter values containing forward slashes is a requirement, it is advised to use the URL parameter syntax above instead of URL components, or consider configuring the server to disable the suppression of encoded forward slashes. See relevant notes on CGI security for Tomcat and JBoss.

At this time, submitting runtime parameters via a URL-encoded message body ("application/x-www-form-urlencoded") is not supported. This means that the total length of the runtime parameter value specified on the URL is limited by the maximum URL supported by the underlying application server and client (typically around 2,000 characters).

Requesting Result Meta Data

When using REST requests in XML format, additional meta data about the response can be requested by including the URL parameter "?_includeMetaData" (no value required). When this is specified, the XML document will include two additional nodes: <Meta> (contains object and attribute counts) and <Performance> (contains metrics for elapsed time, CPU time, and database time).

For more information on how the <Meta> and <Performance> nodes are formatted, refer to Result XML Format or the generated XSD. This meta data is available for both read and write requests when using REST in XML or JSON format.