Generic Management
The Apama REST API GET methods return information about correlators, sentinel_agents and IAFs. The PUT /logLevel method changes the specified log level.
GET /info
This method returns summary information about the component including its name, version, etc. This is analogous to the data that can be retrieved with the Apama engine_management utility, for example, the hostname field is exactly what engine_management --gethostname gives you.
Response
The XML response to this method looks like this:
<?xml version="1.0"?>
<map name="apama-response">
<prop name="name">correlator</prop>
<prop name="type">correlator</prop>
<prop name="componentVersion">n.n.n.0.0</prop>
<prop name="productVersion">n.n.n.0.0</prop>
<prop name="buildNumber">rel/n.n.n@nnnnnn</prop>
<prop name="buildPlatform">amd64-rhel6</prop>
<prop name="hostname">myhost.mycompany.com</prop>
<prop name="username">myuser</prop>
<prop name="pid">25529</prop>
<prop name="port">15903</prop>
<prop name="physicalId">6142374521438017124</prop>
<prop name="logicalId">6142374521438017124</prop>
<prop name="currentDirectory">/users/foobar/work</prop>
<prop name="uptime">178897</prop>
</map>
GET /ping and GET /deepPing
Checks if the component is still running. If the component is running the client receives an empty response. A failure is a timeout waiting for the response.
Response
The empty response for the Ping and deepPing looks like this:
<?xml version="1.0"?>
<map name="apama-response"> </map>
GET /logLevel
This method displays the log level of a component.
Response
<?xml version="1.0"?>
<map name="apama-response">
<prop name="logLevel">INFO</prop>
</map>
PUT /logLevel
This methods sets the log level of a component.
Request
<?xml version="1.0"?>
<map name="apama-request">
<prop name="logLevel">INFO</prop>
</map>
GET /connections
Gets the incoming and outgoing messaging connections to the given component, along with the channels subscribed to and whether or not the receivers are slow.
Response
The response for this method looks like the following
<?xml version="1.0"?>
<map name="apama-response">
<list name="senders">
<map name="correlator (on port 57042)">
<prop name="remoteHost">127.0.0.1</prop>
<prop name="remotePort">57042</prop>
<prop name="physicalId">432487434834</prop>
<prop name="logicalId">432487434834</prop>
</map>
<map name="engine_send">
<prop name="remoteHost">127.0.0.1</prop>
<prop name="remotePort">57077</prop>
<prop name="physicalId">643690913</prop>
<prop name="logicalId">643690913</prop>
</map>
</list>
<list name="receivers">
<map name="engine_receive">
<prop name="remoteHost">127.0.0.1</prop>
<prop name="remotePort">57053</prop>
<prop name="physicalId">69086982542</prop>
<prop name="logicalId">69086982542</prop>
<prop name="slow">false</prop>
<prop name="disconnectIfSlow">false</prop>
<list name="channels">
<prop name="">chan1"</prop>
<prop name="">chan2"</prop>
</list>
</map>
<map name="engine_receive">
<prop name="remoteHost">127.0.0.1</prop>
<prop name="remotePort">58032</prop>
<prop name="physicalId">4325769021054</prop>
<prop name="logicalId">4325769021054</prop>
<prop name="slow">false</prop>
<prop name="disconnectIfSlow">true</prop>
<list name="channels">
<prop name="">*</prop>
</list>
</map>
<map name="correlator (on port 57042)">
<prop name="remoteHost">127.0.0.1</prop>
<prop name="remotePort">57071</prop>
<prop name="physicalId">432487434834</prop>
<prop name="logicalId">432487434834</prop>
<prop name="slow">true</prop>
<prop name="disconnectIfSlow">false</prop>
<list name="channels">
<prop name="">chan1"</prop>
</list>
</map>
</list>
</map>
GET /info/argv
This method returns the arguments used when starting the component as a list of name/value pairs.
Response
<?xml version="1.0"?>
<list name="apama-response">
<prop name="">./correlator</prop>
<prop name="">-f</prop>
<prop name="">correlator.log</prop>
<prop name="">-j</prop>
</list>
GET /info/envp
This method returns a list the environment variables in use as a list of name/value pairs.
Response
<?xml version="1.0"?>
<list name="apama-response">
<prop name="ALLUSERSPROFILE">C:\ProgramData</prop>
<prop name="COMPUTERNAME">NBBEDUSERNAME</prop>
<prop name="COMSPEC">C:\Windows\system32\cmd.exe</prop>
<prop name="WINDIR">C:\Windows</prop>
...
</list>
GET /info/category
This method returns the names categories for which you can get general information.
Response
<?xml version="1.0"?>
<list name="apama-response">
<prop name="categories">ha</prop>
<prop name="categories">categories</prop>
<prop name="categories">argv</prop>
<prop name="categories">envp</prop>
</list>