Fork me on GitHub

Administration APIs

Soabase adds support for Jersey Resources to the Dropwizard admin servlet. It also adds a suite of useful APIs.

APIs

By default, the base path for admin APIs is "/api".

SOA Info APIs

API METHOD Payload Response
/api/soa GET n/a A SoaInfo object (see below)
/api/soa/discovery/single/{serviceName} GET n/a A SoaDiscoveryInstance object (see below) representing an available registered instance for the specified service.
/api/soa/discovery/all/{serviceName} GET n/a List of SoaDiscoveryInstance objects (see below) representing all available registered instances for the specified service.
/api/soa/discovery/services GET n/a List of all currently known services.
/api/soa/attributes/{key} GET n/a Returns the current value of the specified dynamic attribute as the instance would see it (i.e. applying scopes, etc.).
/api/soa/attributes/{key} PUT String Override the value of the specified dynamic attribute in this instance.
/api/soa/attributes/{key} DELETE /n/a Delete any override of the specified dynamic attribute in this instance.
/api/soa/logging/files GET /n/a List of log files as LoggingFile objects (see below).
/api/soa/logging/file/gzip/{key} GET /n/a Returns the specified log file using a gzip stream.
/api/soa/logging/file/raw/{key} GET /n/a Returns the specified log file using an uncompressed stream.

Adding APIs

You can add your own Jersey Resources to the admin servlet. In the run() method of your application, access the admin Jersey Environment via:

SoaFeatures features = SoaBundle.getFeatures(environment);
JerseyEnvironment adminJerseyEnvironment = features.getNamedRequired(JerseyEnvironment.class, SoaFeatures.ADMIN_NAME);
adminJerseyEnvironment.register(...)
... etc. ...

Entities

SoaInfo
mainPort the instance's main port
adminPort the instance's admin port
serviceName the serviceName that the instance is part of
instanceName the instance's instanceName
startTimeUtc the start time of the instance UTC
currentTimeUtc the current time of the instance UTC
   
SoaDiscoveryInstance
id Instance Id
host Host/address
port main port
forceSsl if true, main port is SSL
adminPort admin port
healthyState either "HEALTHY" or "UNHEALTHY"
metaData app defined meta data
forcedState one of "CLEARED", "REGISTER" or "UNREGISTER"
   
LoggingFile
key Key to use in subsequent APIs to reference the log file
name Log file name
file Full path to the file