Page tree
Skip to end of metadata
Go to start of metadata

On this page:

Server

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/jsonserverInformation about REST API internal state

JSON Representation

PropertiesDescriptiontypeOccurs
hrefAuto referenceURI1
name"Server"String1
startDateStarting date of the serverDate1
memoryStatistics about memory usage (mega-bytes)Structure
memory.totalInitialMemoryTotal memory according to the JVM in mega-bytes, before initializing memory cacheInteger1
memory.totalMemoryTotal memory according to the JVM in mega-bytesInteger1
memory.freeMemoryFree memory according to the JVM in mega-bytesInteger1
memory.usedMemoryTotal memory - Free memoryInteger1
requestsStatistics about requestsStructure1
requests.totalCounterTotal number of requestsInteger1
requests.errorsCounterTotal number of requests in errorsInteger1
requests.totalTimeTotal elapsed time of requests millisecondsInteger1
requests.averageTimeTotal elapsed time of requests in millisecondsInteger1
requests.maxTimeLongest elapsed time of all requests in millisecondsInteger1
statusServer status either "LOADING" or "READY"String

1

loadDate

Date of Memory cache update. This date is set at start time of

the server or when a reload is requested.

Date1
abortedDomainsArray of aborted domains. An aborted domain is a domain for which loading has failed.Array1
abortedDomains[]An aborted domainStructure0..1
abortedDomains[].nameDomain nameString1
abortedDomains[].loadingDateDate of loading start when the loading has been failedString1
license.status

License status regarding access to Central Bases

Use CaseStatusDescription
No LicenseNO_LICENSE_KEYLicense key was not found
INVALID_LICENSE_KEYLicense key is not valid
CANNOT_ACCESS_LICENSE_KEYLicense key file is not readable
INVALID_LICENSE_FILECannot find license key file
Restricted LicenseRESTRICTED_LICENSELicense is a restricted license
GLOBAL_ACCESS_TOKENS_EXCEEDED

License is a restricted license,
and quota of global access tokens is exceeded

UNIT_ACCESS_TOKENS_EXCEEDEDLicense is a restricted license,
and quota of unit access tokens is exceeded
Unrestricted LicenseUNRESTRICTED_LICENSELicense is an unrestricted license
String1


JSON Example

GET DEMO
{
	"href": "server",
	"name": "Server",
    "startDate": {
		"time": 1381912989379
	},
	"memory": {
		"totalInitialMemory": 15,
		"totalMemory": 31,
		"freeMemory": 9,
		"usedMemory": 21
	},
	"requests": {
		"totalCounter": 2,
		"errorsCounter": 0,
		"totalTime": 22,
		"averageTime": 11,
		"maxTime": 21
	}
}


Server Cache Management

Warning

Administrator role is required.

REST server stores portfolio objects, configuration, and snapshots in a memory cache. This memory cache is loaded as soon as the REST Server is started.

An URL allows to reload all domains in memory cache. This action may be required when a new snapshot has been added, and can be performed from a command line with a tool such as "curl":


Use Curl for automation:
C:> curl -u admin:cast -H "Accept: application/json" http: //localhost:9999/testContext/rest/server/reload


For each domain, and for each application an Index file is created for Lucene library. This index allows to search for a components. Lucene index files are created at start time and reload time if this option is enabled:

<context-param>
    <param-name>rebuildComponentsSearchIndexesOnStart</param-name>
    <param-value>true</param-value>
</context-param>


URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/jsonserver/reloadInformation about REST API internal state

DBMS Warm-up Service

Warning

Administrator role is required.

This service fetches data (results, components, violations) for domains hosted in central bases, in order to pre load data in memory afer a DBMS cold restart.

It avoids to penalize first user fetching data.

This service loops on each domain hosted by a central base, and trigger some queries on components, violations and assessment results.


Use Curl for automation:
C:> curl -u admin:cast  http: //localhost:9999/testContext/rest/server/warmup

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/jsonserver/warmupWarm up DBMS after a cold restart (central base hosts only)


Lucene Index File

For each domain, and for each application an Index file is created for Lucene library. This index allows to search for a components.

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
PUTapplication/json{Domain}/components-index

Create or overwrite the components search index for a domain

Warning

Administrator role is required.

GETapplication/json{Domain}/components-indexGet index status for a domain


JSON Representation

PropertiesDescriptiontypeOccurs
hrefAuto referenceURI1
nameNameString1
status
  • upToDate : Index is up to date
  • N/A : not applicable, no index
  • toUpdate : last snapshot is more recent than the index date, an index rebuild is required
String1
dateIndex file dateDate0..1
lastSnapshotDateLast Snapshot dateDate0..1
sizeIndex file sizeInteger0..1

JSON Example

{
	"href": "ENDTOEND83/components-index",
	"name": "Components search index for applications of ENDTOEND83",
	"status": "upToDate",
	"date": {
		"time": 1496752452859,
		"isoDate": "2017-06-06"
	},
	"lastSnapshotDate": {
		"time": 1493778823000,
		"isoDate": "2017-05-03"
	},
	"size": 4145870
}