Executing a Request from API Testing Tools

You can invoke Service Health Check request using API Testing tools such as SoapUI, GitHub REST Client, Postman. The request must conform to the HealthcheckRequest schema. The HealthCheck.wsdl request schema is available at <TIBCO_HOME>/administrator/<version>/samples/healthcheck/.

For related procedures on how to invoke Service Health Check using API testing tools, see Health Check Samples
The request schema consists of the following elements:
Element Description
hops

The hops element controls the span of the Service Health Check invocation, in terms of:

  • length, in the case of applications connected as a chain, or,
  • depth, in the case of applications connected in a tree/graph structure.

A hop is defined as an Application instance within such a set of Applications, connected via Promoted References and Services.

Valid values:

  • 0: Checks whether a SOAP or REST endpoint is up. For more information, see Ping a SOAP or REST Endpoint .
  • -1: Includes all the Applications in the chain.
  • Any value greater than 1. One hop = 1 Application, two hops = 2 Applications, and -1 hop = all applications in the chain.

For example, in the following Application chain: Application1 -> Application2 -> Application3 -> Application4:

  • hops = 1 indicates Service Health Check of Application1
  • hops = 2 indicates execution of Service Health Check operation up to and inclusive of Application2.
  • hops = 3 indicates execution of Service Health Check operation up to and inclusive of Application3.
  • hops= -1 indicates Service Health Check for all Applications in the chain (Application1, Application2, Application3, and Application4).
suppressStackTrace (Optional) The suppressStackTrace element specifies whether an exception stack trace in a Service Health Check response must be suppressed or not. The default is false.
  • If suppressStackTrace is set to true, the exception stack trace in a Service Health Check response is suppressed. Only the errorCode and errorString elements are returned.
  • If suppressStackTrace is set to false, the exception stack trace in a Service Health Check response is not suppressed. The stackTrace element is returned, along with the errorCode and errorString elements.

For more information, see Suppressing Stack Trace in a Service Health Check Response.

timeout (Optional) The timeout element specifies a timeout value for the Service Health Check invocation in milliseconds.

For more information, see Specifying a Timeout Value for a Service Health Check Invocation.

refreshCache (Optional) The refreshCache element controls whether the Service Health Check response for the current Service Health Check request must be cached. The default is false.
  • If refreshCache is set to true, a new Service Health Check Invocation is executed and the cache is updated with the new Service Health Check response. Based on the validityDurationInSecs element, subsequent Service Health Check results receive cached responses to avoid repeat invocations within a given time duration.
  • If refreshCache is set to false, a Service Health Check Response from the cache is returned, if available. If a cached response is not available, a new Service Health Check Invocation is executed and a new Service Health Check response is returned. The new Service Health Check response is not cached.

For more information about how this element works in combination with validityDurationInSecs, see Elements Related to Caching.

For more information about Caching, see Caching a Service Health Check Response.

validityDurationInSecs

(Optional) The validityDurationInSecs element specifies the validity of a particular Service Health Check response in seconds. After the validityDurationInSecs elapses, the response is considered invalid and is removed from the cache.

Note: By default, the cache validity duration provided by the com.tibco.amx.servicehealthcheck.caching.duration TRA property is used. For more information, refer to Specifying the Validity Duration for a Service Health Check.
  • If a value of "0" is specified for this element, it indicates that the Service Health Check response for the specified request must not be cached.
  • If a value is specified using this element, it overrides the existing caching interval provided by the com.tibco.amx.servicehealthcheck.caching.duration TRA property.
Note: The value of validityDurationInSecs is ignored if refreshCache=false.

For more information on how this element works in combination with refreshCache, refer to Elements Related to Caching.

For more information about Caching, see Caching a Service Health Check Response.

refreshIfOlderThan

(Optional) The refreshIfOlderThan parameter is used to make sure that the returned response is not older than the value specified in the refreshIfOlderThan parameter. This gives the end user more control of this function by overriding the validityDurationInSecs value. If a cached response is older than the value specified in the refreshIfOlderThan parameter, then a fresh invocation of the Service Health Check operation is made and the cache is updated.

The refreshIfOlderThan attribute has no role to play if user has explicitly mentioned refreshCache=true, which immediately results in a fresh invocation of the Service Health Check operation.

For more information on how this element works in combination with refreshCache, refer to Elements Related to Caching.

For more information on Caching, see Caching a Service Health Check Response.

Elements Related to Caching

refreshCache=true refreshCache=false

validityDurationInSecs=<valid value>

For example, 10.
A new Service Health Check Invocation is executed and cached for <validvalue> seconds.

If a valid cached entry is present, it is returned. A warning is logged about not using the validityDurationInSecs attribute.

If not, a new Service Health Check Invocation is executed but the response is not cached.

validityDurationInSecs is not specified Default system value of 60 seconds is used for the new Service Health Check Invocation.

If a valid cached entry is present, it is returned. Expiry time is not updated. A warning is logged about not using the validityDurationInSecs attribute.

If not, a new Service Health Check Invocation is executed. This response is not cached.

validityDurationInSecs=0 New Service Health Check Invocation is executed and returned, but cache is cleared for the request.

If a valid cached entry is present, it is returned and the cache is not cleared. A warning is logged about not using the validityDurationInSecs attribute.

If not, a new Service Health Check Invocation is executed. This response is not cached.