GetGatewayConnectionInfo

From a OneStream business rule, you can invoke this API to obtain connection details such as:

  • GatewayName: Name of the remote gateway

  • GatewayVersion: Version of the Smart Integration Connector Gateway Service running on the remote host

  • RemoteGatewayPortNumber: Bound Port at Gateway, the port of the remote service this direct connection is associated with.

  • RemoteGatewayHost: Name of the remote host associated with the direct connection.

  • OneStreamPortNumber: Bound Port in OneStream, the port number defined within OneStream that refers/maps to the specified direct connection.

  • SmartIntegrationGatewayType: Type of the Smart Integration Connection (0= Gateway Connection, 1= Direct Connection)

This API is useful for direct connections where the port number is required before connecting to remote services such as sFTP or remote Web APIs because each endpoint defined in OneStream to Smart Integration Connector Local Gateways has a different port number and would need to be known by the business rule developer at design time. This API makes it easy to look up the remote port by knowing the name of the direct connection defined in OneStream. It returns other useful information outlined below:

Here is the rule in C#:

Copy
// GetGatewayConnectionInfo
var GatewayName = "" //Name of the Gateway
GatewayDetails gatewayDetailInformation = BRApi.Utilities.GetGatewayConnectionInfo(si, GatewayName);
int oneStreamPortNumber = gatewayDetailInformation.OneStreamPortNumber;

Here is the rule in VB:

Copy
' GetGatewayConnectionInfo
Dim GatewayName As String = "" ' Name of the Gateway
Dim objGatewayDetails As GatewayDetails = BRApi.Utilities.GetGatewayConnectionInfo(si, GatewayName)
Dim oneStreamPortNumber As Integer = objGatewayDetails.OneStreamPortNumber