Design Notes

This section contains:

Supported API Actions
Filenames
Sample json
Adding, Editing, Deleting JsonPrimitive Properties
Adding and Editing JsonObject Properties
Deleting JsonObject Properties
Updating vs. Restarting Data Servers
High Availability

Supported API Actions

The REST API supports several actions. To get the list of actions, go to the sample application as described above and execute the following on the command line:

node main.js -action=getActions

To get the description of a single action:

node main.js -action=getActions -name=actionName

You can also execute any action that start with get in a browser as follows (where host, port and rtvadmin are the values you specified in the sample application):

http://host:port/rtvadmin/api?action=getActions&name=actionName

Filenames

When using the REST API to import initial properties into the Configuration Application, the filename must be project. This is because the Configuration Application reads and writes the project properties files and all RTView projects automatically read them. When using the REST API to automatically update properties that are not included in the Configuration application, the filename must match the -properties argument in the rtvservers.dat file and must NOT be project.

Sample json

You can optionally use the Configuration Application to generate sample json to get you started. Properties saved from the Configuration Application are in projects\rtview-server\project.properties.json.

Adding, Editing, Deleting JsonPrimitive Properties

All primitive json values must be enclosed in quotes, even boolean and number values. The top level solution package element must be included.

The following example uses solmon properties to illustrate. See the generating sample json properties for details about generating properties for your solution package.

Example:

 

Adding and Editing JsonObject Properties

Solution package connections are arrays of JsonObjects. The property descriptions indicate which fields in the json object are required and which are indexes. When adding a new connection (or other JsonObject), you must include all of the required and index fields or the property will not be saved. The top level solution package element must be included.

The following example uses solmon properties to illustrate. See the generating sample json properties for details about generating properties for your solution package.

Example:

 

When adding connections to an existing file, you can either merge the new connections into the existing connection list or you can replace the whole list with the connections. This is controlled by the merge parameter. When merge is true, the indexes are used to control whether a new connection is added or an existing connection is modified.

Deleting JsonObject Properties

Solution package connections are arrays of JsonObjects. The property descriptions indicate which fields in the json object are indexes. When deleting a connection (or other JsonObject), only the index fields are required. The top level solution package element must be included.

The following example uses solmon properties to illustrate. See the generating sample json properties for details about generating properties for your solution package.

Example:

 

Updating vs. Restarting Data Servers

All connection properties support updates. Once you have added, edited or deleted connections using the REST API, you can apply those changes with the updatePropertiesOnServer action. Restart is not required. Note that when connections are removed from your configuration, they are not immediately removed from the monitor. They stay in the caches (and display) but do not receive further updates. They will expire and be removed based on the settings in the DATA STORAGE tab of the Configuration Application. All non-connections properties are applied on restart, so they must be applied with the restartServers action. Restarting your servers will also cause any deleted connections to be immediately removed from the caches and displays.

High Availability

To edit properties for HA-configured servers, first follow the instructions in the High Availability section of this document to configure the rtvadmin servlet for High Availability.