API environment - RapturePlatform/Rapture GitHub Wiki

Environment API

A data center can contain multiple instances of Rapture, such as staging, production, or testing, that are nearly identical. In fact, a single piece of hardware can host multiple instances. In this case we cannot rely on host names or IP addresses to uniquely identify systems. The Environment API generates and assigns UIDs to the Rapture instance and to its component servers. Servers in the same network share the same bootstrap configuration and low level connectivity to data source configuration. Although one topology for a Rapture network is a collection of homogeneous servers sharing the same data and messaging infrastructure, an alternate topology would be a collection of heterogeneous servers connected together through synchronization. A server in this topology is considered an "appliance" - it is essentially a Rapture network with one member. In this configuration the Rapture kernel needs to handle tasks that are normally performed by other servers. Appliance Mode can be enabled or disabled as necessary.

getNetworkInfo

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
RaptureNetwork retVal = environmentApi.getNetworkInfo();
retVal = baseAPI.doEnvironment_GetNetworkInfo();

Entitlement: /env/common

Retrieves the unique identifier and name for this Rapture instance.

Function Parameters

This function takes no parameters.

Return value

Type Description
RaptureNetwork
Types used in this function

RaptureNetwork

*Holds basic information about the network that Rapture can access. *

Field Type
networkId String
networkName String

setNetworkInfo

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
RaptureNetwork retVal = environmentApi.setNetworkInfo(network);
retVal = baseAPI.doEnvironment_SetNetworkInfo(network);

Entitlement: /env/admin

Applies network information matching the passed parameter to the current instance of the Rapture network.

Function Parameters

Parameter Type Description
network RaptureNetwork

Return value

Type Description
RaptureNetwork
Types used in this function

RaptureNetwork

*Holds basic information about the network that Rapture can access. *

Field Type
networkId String
networkName String

RaptureNetwork

*Holds basic information about the network that Rapture can access. *

Field Type
networkId String
networkName String

getThisServer

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
RaptureServerInfo retVal = environmentApi.getThisServer();
retVal = baseAPI.doEnvironment_GetThisServer();

Entitlement: /env/common

Retrieves the unique identifier and name for this Rapture server instance.

Function Parameters

This function takes no parameters.

Return value

Type Description
RaptureServerInfo
Types used in this function

RaptureServerInfo

Holds information about a server that is running Rapture.

Field Type
serverId String
name String

getServers

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
List<RaptureServerInfo> retVal = environmentApi.getServers();
retVal = baseAPI.doEnvironment_GetServers();

Entitlement: /env/common

Returns a list of the unique identifiers and names for all Rapture servers in the network.

Function Parameters

This function takes no parameters.

Return value

Type Description
List

setThisServer

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
RaptureServerInfo retVal = environmentApi.setThisServer(info);
retVal = baseAPI.doEnvironment_SetThisServer(info);

Entitlement: /env/admin

Sets the passed parameter as information for the current server instance.

Function Parameters

Parameter Type Description
info RaptureServerInfo

Return value

Type Description
RaptureServerInfo
Types used in this function

RaptureServerInfo

Holds information about a server that is running Rapture.

Field Type
serverId String
name String

RaptureServerInfo

Holds information about a server that is running Rapture.

Field Type
serverId String
name String

setApplianceMode

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
void retVal = environmentApi.setApplianceMode(mode);
retVal = baseAPI.doEnvironment_SetApplianceMode(mode);

Entitlement: /env/admin

Configures the instance into or out of appliance mode.

Function Parameters

Parameter Type Description
mode boolean

Return value

Type Description
void

getApplianceMode

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
boolean retVal = environmentApi.getApplianceMode();
retVal = baseAPI.doEnvironment_GetApplianceMode();

Entitlement: /env/common

Determines whether the instance is currently in appliance mode.

Function Parameters

This function takes no parameters.

Return value

Type Description
boolean

getServerStatus

HttpEnvironmentApi environmentApi = new HttpEnvironmentApi(loginApi);
List<RaptureServerStatus> retVal = environmentApi.getServerStatus();
retVal = baseAPI.doEnvironment_GetServerStatus();

Entitlement: /env/common

Returns the last reported state for each server in the network. This includes a numerical status, a human readable message, and a Date object indicating the time that the status was last updated.

Function Parameters

This function takes no parameters.

Return value

Type Description
List
⚠️ **GitHub.com Fallback** ⚠️