Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

On this page:

Table of Contents

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
domainsLocationsGet data source name and schema name for each domain. The ADMINISTRATOR role is required.Structure0..1
recommendedDbVersionThe preferred version of AIP (for compliancy with database schema)

securityMode

This is the configuration value of property security.mode from the security.properties file:

  • "default": authentication based of configuration files
  • "ldap": authentication base on LDAP protocol
  • "saml": authentication based on SAML protocol
String1
samlSingleLogout

This is the configuration value of security.saml.single.logout property from security.properties file.

  • "true": logout action is enabled for "saml" security mode
  • "false": logout action is disabled for "saml" security mode
Boolean1
languagesInstalled translations

 

JSON Example

Code Block
languagejavascript
titleGET 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
titleWarning

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":

 

Code Block
languagebash
titleUse 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:

Code Block
<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

Parameters

URI Parameter

Description

Values

Default value

domainSpecify a single domain to reload (for example to refresh a domain after a snapshot)a string$all

DBMS Warm-up Service

Warning
titleWarning

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.

 

Code Block
languagebash
titleUse 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
titleWarning

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

Code Block
languagejs
{
	"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
}

 

Domains Bindings

A Domain binding associates a domain name with a data source name and a schema name.

This resource is based on the use of domains.properties file.

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/jsonserver/domains-bindings

Get all domains bindings

Warning
titleWarning

Administrator role is required.


PUTapplication/jsonserver/domains-bindings

Update the database binding for a list of domains, or create some new domains with their own bindings.

This web service triggers the "reload" service for the domains listed in he payload, in order to update the server memory cache and Lucene index files.

This Web service overwrites the domains.properties file.

Warning
titleWarning

This service accepts the "Authorization" HTTP header to transmit user's credentials, so that a prior call to the login "service" is not required. Thus, we can start the Web Server with an empty list of domains, and bypass the "login" service that prevents connection when no domain is defined.

In case of exception when writing this file, an HTTP Status "403 Forbidden" is returned. Check the permissions of this file.

Warning
titleWarning

Administrator role is required.

Example:

Assuming there are two existing domains AED1, AED2, add a new domain:

Code Block
languagejs
[
	{
		"name": "AED3",
		"dataSource": "DEV_CSS2",
		"schema": "appli1_central"
	}
]

Assuming there are three existing domains AED1, AED2, AED3, change schemas for domains AED1, AED2:

Code Block
languagejs
[
	{
		"name": "AED1",
		"dataSource": "DEV_CSS2",
		"schema": "appliA_central"
	},
	{
		"name": "AED2",
		"dataSource": "DEV_CSS2",
		"schema": "appliB_central"
	}
]


DELETEapplication/jsonserver/domains-bindings

Update the database binding for a list of domains, or create some new domains with their own bindings.

This web service does not need to trigger the "reload".

This Web service overwrites the domains.properties file.

Warning
titleWarning

This service accepts the "Authorization" HTTP header to transmit user's credentials, so that a prior call to the login "service" is not required. Thus, we can start the Web Server with an empty list of domains, and bypass the "login" service that prevents connection when no domain is defined.

In case of exception when writing this file, an HTTP Status "403 Forbidden" is returned. Check the permissions of this file.

Warning
titleWarning

Administrator role is required.

Example:

Assuming there are two existing domains AED1, AED2, remove domain AED2

Code Block
languagejs
[
	{
		"name": "AED2"
	}
]


 

JSON Representation

PropertiesDescriptiontypeOccurs
nameDomain nameString1
dataSourceData source nameString1
schema

Schema Name

String1

JSON Example

Code Block
languagejs
[
	{
		"name": "AED1",
		"dataSource": "DEV_CSS2",
		"schema": "appli1_central"
	},
	{
		"name": "AED2",
		"dataSource": "DEV_CSS2",
		"schema": "appli2_central"
	}
]