Interface GatewayRestServices

All Superinterfaces:
java.io.Serializable

public interface GatewayRestServices
extends java.io.Serializable
  • Method Summary

    Modifier and Type Method Description
    RestResponse delete​(java.lang.String gatewayId, java.lang.String endpoint)
    Performs a REST HTTP DELETE call and returns the HTTP response code.
    RestResponse delete​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
    Performs a REST HTTP DELETE call and returns the HTTP response code.
    RestResponse delete​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
    Performs a REST HTTP DELETE call and returns the HTTP response code.
    RestResponse get​(java.lang.String gatewayId, java.lang.String endpoint)
    Performs a REST HTTP GET call and returns a RestResponse representing the response.
    RestResponse get​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
    Performs a REST HTTP GET call supplying any request headers and/or parameters.
    RestResponse get​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
    Performs a REST HTTP GET call supplying any request headers and/or parameters.
    RestResponse head​(java.lang.String gatewayId, java.lang.String endpoint)
    Performs a REST HTTP HEAD call on a resource.
    RestResponse head​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
    Performs a REST HTTP HEAD call on a resource.
    RestResponse head​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
    Performs a REST HTTP HEAD call on a resource.
    RestResponse patch​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body)
    Performs a REST HTTP PATCH call.
    RestResponse patch​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
    Performs a REST HTTP PATCH call supplying any headers and/or parameters required.
    RestResponse patch​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
    Performs a REST HTTP PATCH call supplying any headers and/or parameters required.
    RestResponse post​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body)
    Performs a REST HTTP POST call.
    RestResponse post​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
    Performs a REST HTTP POST call supplying any headers and/or parameters required.
    RestResponse post​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
    Performs a REST HTTP POST call supplying any headers and/or parameters required.
    RestResponse put​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body)
    Performs a REST HTTP PUT call.
    RestResponse put​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
    Performs a REST HTTP PUT call supplying any headers and/or parameters required.
    RestResponse put​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
    Performs a REST HTTP PUT call supplying any headers and/or parameters required.
  • Method Details

    • get

      RestResponse get​(java.lang.String gatewayId, java.lang.String endpoint)
      Performs a REST HTTP GET call and returns a RestResponse representing the response. A GET is a read only call.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var response = gateway.rest.get("myGateway", "/users");
       if(response.isSuccess())
       {
            var results = JSON.parse(response.getBody());
            if(results)
            {
                 //populate results using the JSON object
                 populateResults(results);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      Since:
      V5.7
      See Also:
      RestResponse, get(String, String, Map, Map)
    • get

      RestResponse get​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Performs a REST HTTP GET call supplying any request headers and/or parameters. Returns a RestResponse representing the response. A GET is a read only call.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var gatewayId = "myGateway";
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       var response = services.rest.get(gatewayId, "/users", headers, params);
       if(response.isSuccess())
       {
            var results = JSON.parse(response.getBody());
            if(results)
            {
                 //populate results using the JSON object
                 populateResults(results);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      Since:
      V5.7
      See Also:
      RestResponse, get(String, String, Map, Map, RestOptions)
    • get

      RestResponse get​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
      Performs a REST HTTP GET call supplying any request headers and/or parameters. Returns a RestResponse representing the response. A GET is a read only call.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var gatewayId = "myGateway";
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       
       var opts = new RestOptions();
       //setting the wait time to establish a connection to the target server to 5 seconds
       opts.setConnectionTimeout(5);
       //set the time to wait for no inactivity from the rest call to 10 seconds
       opts.setSocketTimeout(10);
       //set UTF-8 character set when decoding the response
       opts.setResponseCharset("UTF-8");
       var response = services.rest.get(gatewayId, "/users", headers, params, opts);
       if(response.isSuccess())
       {
            var results = JSON.parse(response.getBody());
            if(results)
            {
                 //populate results using the JSON object
                 populateResults(results);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      options - rest configuration options RestOptions
      Since:
      V5.7
      See Also:
      RestResponse, get(String, String), get(String, String, Map, Map)
    • post

      RestResponse post​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body)
      Performs a REST HTTP POST call. Returns a RestResponse representing the response. A POST is used to insert a new resource or can also create a new one if one does not exist.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.userId = 1;
       user.title = 'foo';
       user.body = 'bar';
       
       var response = services.rest.post("myGateway", "/update/user", JSON.stringify(user));
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      Since:
      V5.7
      See Also:
      RestResponse, post(String, String, String, Map, Map)
    • post

      RestResponse post​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Performs a REST HTTP POST call supplying any headers and/or parameters required. Returns a RestResponse representing the response. A POST is used to insert a new resource or can also create a new one if one does not exist.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.userId = 1;
       user.title = 'foo';
       user.body = 'bar';
       
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       var response = services.rest.post("myGateway", "/update/users", JSON.stringify(user), headers, params);
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      Since:
      V5.7
      See Also:
      RestResponse, post(String, String, String, Map, Map, RestOptions)
    • post

      RestResponse post​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
      Performs a REST HTTP POST call supplying any headers and/or parameters required. Returns a RestResponse representing the response. A POST is used to insert a new resource or can also create a new one if one does not exist.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.userId = 1;
       user.title = 'foo';
       user.body = 'bar';
      
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
        
       var opts = new RestOptions();
       //setting the wait time to establish a connection to the target server to 5 seconds
       opts.setConnectionTimeout(5);
       //set the time to wait for no inactivity from the rest call to 10 seconds
       opts.setSocketTimeout(10);
       var response = services.rest.post("myGateway", "/update/users", JSON.stringify(user), headers, params, opts);
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      options - rest configuration options RestOptions
      Since:
      V5.7
      See Also:
      RestResponse, post(String, String, String), patch(String, String, String, Map, Map)
    • patch

      RestResponse patch​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body)
      Performs a REST HTTP PATCH call. Returns a RestResponse representing the response. A PATCH call should be used for a partial update to a resource.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.title = 'foo';
       
       var response = services.rest.patch("myGateway", "update/users", JSON.stringify(user));
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      Since:
      V5.7
      See Also:
      RestResponse, patch(String, String, String, Map, Map)
    • patch

      RestResponse patch​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Performs a REST HTTP PATCH call supplying any headers and/or parameters required. Returns a RestResponse representing the response. A PATCH call should be used for a partial update to a resource.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.title = 'foo';
       
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       var response = services.rest.patch("myGateway", "/update/users", JSON.stringify(user), headers, params);
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      Since:
      V5.7
      See Also:
      RestResponse, patch(String, String, String, Map, Map, RestOptions)
    • patch

      RestResponse patch​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
      Performs a REST HTTP PATCH call supplying any headers and/or parameters required. Returns a RestResponse representing the response. A PATCH call should be used for a partial update to a resource.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.title = 'foo';
       
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       
       var opts = new RestOptions();
       //setting the wait time to establish a connection to the target server to 5 seconds
       opts.setConnectionTimeout(5);
       //set the time to wait for no inactivity from the rest call to 10 seconds
       opts.setSocketTimeout(10);
       var response = services.rest.patch("myGateway", "/update/users", JSON.stringify(user), headers, params, opts);
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      options - rest configuration options RestOptions
      Since:
      V5.7
      See Also:
      RestResponse, patch(String, String, String), patch(String, String, String, Map, Map)
    • put

      RestResponse put​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body)
      Performs a REST HTTP PUT call. Returns a RestResponse representing the response. A PUT is used to insert a new resource or update an existing one.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.userId = 1;
       user.title = 'foo';
       user.body = 'bar';
       
       var response = services.rest.put("myGateway", "/update/user", JSON.stringify(user));
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      Since:
      V5.7
      See Also:
      RestResponse, put(String, String, String, Map, Map)
    • put

      RestResponse put​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Performs a REST HTTP PUT call supplying any headers and/or parameters required. Returns a RestResponse representing the response. A PUT is used to insert a new resource or update an existing one.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.userId = 1;
       user.title = 'foo';
       user.body = 'bar';
       
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       var response = services.rest.put("myGateway", "/update/user", JSON.stringify(user), headers, params);
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      Since:
      V5.7
      See Also:
      RestResponse, put(String, String, String, Map, Map, RestOptions)
    • put

      RestResponse put​(java.lang.String gatewayId, java.lang.String endpoint, java.lang.String body, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
      Performs a REST HTTP PUT call supplying any headers and/or parameters required. Returns a RestResponse representing the response. A PUT is used to insert a new resource or update an existing one.

      RestResponse contains the following data:

      • HTTP response code - returns a HTTP response code e.g 200 (OK)
      • HTTP response headers - returns list of response headers as key-->value pairs. e.g "WWW-Authenticate", "Gateway"
      • Response body - returns the response body if the response is successful. If there is no response, this value will be null.

      Example:

       var user = {};
       user.userId = 1;
       user.title = 'foo';
       user.body = 'bar';
       
       //set any headers
       var headers = {"Content-Type":"application/json", "Accept":"application/json"};
       //set params
       var params = {"userId":fields.filter.value};
       
       var opts = new RestOptions();
       //setting the wait time to establish a connection to the target server to 5 seconds
       opts.setConnectionTimeout(5);
       //set the time to wait for no inactivity from the rest call to 10 seconds
       opts.setSocketTimeout(10);
       var response = services.rest.put("myGateway", "/update/user", JSON.stringify(user), headers, params, opts);
       if(response.isSuccess())
       {
            var result = JSON.parse(response.getBody());
            if(result)
            {
                 //populate response using the JSON object
                 displayResult(result);
            }
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      body - String representation of the HTTP body for the request
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      options - rest configuration options RestOptions
      Since:
      V5.7
      See Also:
      RestResponse, put(String, String, String), patch(String, String, String, Map, Map)
    • delete

      RestResponse delete​(java.lang.String gatewayId, java.lang.String endpoint)
      Performs a REST HTTP DELETE call and returns the HTTP response code. Returns a RestResponse representing the response. A DELETE is used to delete a resource if it exists. The response code returned is 200 if successfully deleted or 404 if the resource does not exist.

      Example:

       var response = services.rest.delete("myGateway", "users/1");
       if(response.isSuccess())
       {
            //display success message
       }
       else
       {
            //display failure message
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      Since:
      V5.7
      See Also:
      delete(String, String, Map, Map)
    • delete

      RestResponse delete​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Performs a REST HTTP DELETE call and returns the HTTP response code. Returns a RestResponse representing the response. A DELETE is used to delete a resource if it exists. The response code returned is 200 if successfully deleted or 404 if the resource does not exist.

      Example:

       //set any headers
       var headers = {};
       //set params
       var params = {"userId":fields.filter.value};
       var response = services.rest.delete("myGateway", "/users", headers, params);
       if(response.isSuccess())
       {
            //display success message
       }
       else
       {
            //display failure message
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      Since:
      V5.7
      See Also:
      delete(String, String, Map, Map, RestOptions)
    • delete

      RestResponse delete​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
      Performs a REST HTTP DELETE call and returns the HTTP response code. Returns a RestResponse representing the response. A DELETE is used to delete a resource if it exists. The response code returned is 200 if successfully deleted or 404 if the resource does not exist.

      Example:

       //set any headers
       var headers = {};
       //set params
       var params = {"userId":fields.filter.value};
       var opts = new RestOptions();
       //setting the wait time to establish a connection to the target server to 5 seconds
       opts.setConnectionTimeout(5);
       //set the time to wait for no inactivity from the rest call to 10 seconds
       opts.setSocketTimeout(10);
       var response = services.rest.delete("myGateway", "/users", headers, params, opts);
       if(response.isSuccess())
       {
            //display success message
       }
       else
       {
            //display failure message
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      options - rest configuration options RestOptions
      Since:
      V5.7
      See Also:
      delete(String, String)
    • head

      RestResponse head​(java.lang.String gatewayId, java.lang.String endpoint)
      Performs a REST HTTP HEAD call on a resource. Returns a RestResponse representing the response. A HEAD is the same as a GET, apart from it does not have a body. This is only used to determine whether a resource is available.

      Example:

       var response = services.rest.head("myGateway", "users");
       if(response.isSuccess())
       {
            //display available message
       }
       else
       {
            //display failure message
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      Since:
      V5.7
      See Also:
      head(String, String, Map, Map), get(String, String, Map, Map)
    • head

      RestResponse head​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters)
      Performs a REST HTTP HEAD call on a resource. Returns a RestResponse representing the response. A HEAD is the same as a GET, apart from it does not have a body. This is only used to determine whether a resource is available.

      Example:

       //set any headers
       var headers = {};
       //set params
       var params = {"userId":fields.filter.value};
       var response = services.rest.head("myGateway", "/users", headers, params);
       if(response.isSuccess())
       {
            //display available message
       }
       else
       {
            //display failure message
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      Since:
      V5.7
      See Also:
      head(String, String, Map, Map), get(String, String, Map, Map)
    • head

      RestResponse head​(java.lang.String gatewayId, java.lang.String endpoint, java.util.Map<java.lang.String,​java.lang.Object> headers, java.util.Map<java.lang.String,​java.lang.Object> parameters, RestOptions options)
      Performs a REST HTTP HEAD call on a resource. Returns a RestResponse representing the response. A HEAD is the same as a GET, apart from it does not have a body. This is only used to determine whether a resource is available.

      Example:

       //set any headers
       var headers = {};
       //set params
       var params = {"userId":fields.filter.value};
       
       var opts = new RestOptions();
       //setting the wait time to establish a connection to the target server to 5 seconds
       opts.setConnectionTimeout(5);
       //set the time to wait for no inactivity from the rest call to 10 seconds
       opts.setSocketTimeout(10);
       var response = services.rest.head("myGateway", "/users", headers, params, opts);
       if(response.isSuccess())
       {
            //display available message
       }
       else
       {
            //display failure message
       }
       
      Further documentation.
      Parameters:
      gatewayId - the full URI of the request
      endpoint - path to invoke
      headers - Map of HTTP request headers
      parameters - Map of HTTP request query parameters
      options - rest configuration options RestOptions
      Since:
      V5.7
      See Also:
      get(String, String, Map, Map)