Gateway API

 

Documentation home

 

See Also: Verj.io Gateway, Gateway RESTful Services

 

Gateway API

The following methods invoke services on a Verj.io Gateway from a remote Verj.io On-Premises environment or Verj.io Service Plan.

Function Name

Description

JavaScript Example

gateway.getRest()

Returns the GatewayRestServices object that supports REST service calls from a remote Verj.io Application to a Verj.io Gateway. An authorization HTTP header is added automatically to every HTTP request.

 

GatewayRestServices is an extension of RestServices and includes all the same methods get(), put(), post(), delete() etc. But each method takes the Gateway Server name (as configured in the Server Administration Application) as the first parameter, and the target URL parameter is the relative path on the target Verj.io Gateway – see the example to the right.

 

 

importPackage(com.ebasetech.xi.api);

importPackage(com.ebasetech.xi.services);

 

var response = gateway.rest.get("MyCorp_Gateway", "/customers/getCustomer");
if (response.isSuccess())
{
    var results = JSON.parse(response.getBody());
    ..
}
 

where..

  • MyCorp_Gateway is the Verj.io Gateway name
  • customers is the name of the Gateway Web Service
  • getCustomer is the name of an endpoint inside customers