Current Properties Integration Point

Background

All Oracle Health Insurance applications rely on system properties to enable different kinds of behavior. The Installation Guide contains an exhaustive list of the available system properties.

A property value can be set either by specifying a value in the property file (1) or by specifying a value through the HTTP API (2). A property value that is specified in the property file overrides any value set through the HTTP API. In other words, if a property is specified in both ways, the value that is specified is in the property file is the value that is used by the application.

The purpose of the following HTTP IP is to make it transparent, per property, which value is in effect and whether or not it can be overridden by the HTTP API.

Current Properties Integration Point

This integration point provides the ability to retrieve the full of system properties values, including their value and whether or not the property can be set through the HTTP API. The operations are protected by the HTTP API access restriction 'currentproperties IP'.

The endpoint is available at the following location:

http://<host>:<port>/<context-root>/currentproperties
System Properties that are lazily loaded by OHI Applications. That means that properties that are not set in the properties file, nor in the HTTP API, may or may not show up in this resource. They will only show if they are requested for by the relevant functionality of that OHI Application.

Operations

GET (all)

This operation is available on the following location:

http://<host>:<port>/<context-root>/currentproperties

Example of a response:

{
    "items": [
        { "name": "ohi.environment.identifier",
          "readOnly": true,
          "value": "Dev"
        },
...
        { "name": "ohi.servicecallout..url",
          "readOnly": false,
          "value": ""
        }
    ]
}

In the example above, the ohi.environment.identier is set in the properties file (and therefore cannot be changed using the HTTP API), while the callout URL can be set through the HTTP API.

This operation returns a status as described in Response Messages, typically 200.

It is possible to store a value using HTTP API for ohi.environment.identier even when present in the properties file. The value will not be used though.

GET (subset)

This operation is available on the same location. Filtering can be done by sending the query parameter "name"

http://<host>:<port>/<context-root>/currentproperties?name=<prefix>

This method is similar to the GET (all) operation but returns only properties for which the name starts with the given prefix.

This operation returns a status as described in Response Messages, typically 200 if at least one matching property is found or 204 of there is no match.

GET (one)

This operation is available on the same location, followed by "/<property>", where <property> is the exact name of the property:

http://<host>:<port>/<context-root>/currentproperties/<property>

This operation is similar to the GET (subset) operation, but only returns the property if it exactly matches the path parameter <property>.

This operation returns a status as described in Response Messages, typically 200 if a matching property is found or 404 if no property of that name is found.