External configuration

The following table lists the external configuration objects:
Parameter Description
basePath The base path to the REST endpoint URL
auth The authentication method that the REST API client uses. The following methods are supported:
  • HttpBasic
  • HttpBearer
  • ApiKey
  • OAuth
eventHandlers An array of eventHandlers that are applied to each request. The type property determines the event handler type:
  • retry
  • circuitbreaker
  • fallback
loggerName Defines a logger for an endpoint. Use this setting to define different logger for each endpoint.
logLevel Defines custom log levels. The org.apache.log4j.Level must be at DEBUG level to be able to set the following log levels:
  • NONE

    No logging

  • BASIC

    Logs method, URL, response status, and execution time.

  • HEADERS
    Logs the BASIC information and request/response headers.
    Note: The AUTH headers are also logged and this is a security exposure. Avoid using DEBUG level in production.
  • FULL

    Logs the HEADERS information, body, and metadata for request/response.

By default the logLevel is set to NONE.
timeout The timeout configuration for the request The timeout object is optional. If it is not supplied, a default timeout object with the default settings is provided .
  • connectTimeoutMillis
Defines the connection timeout in milliseconds. The default is set to 5 ms.
  • readTimeoutMillis
Defines the timeout for the waiting time on a read request. The timeout is in milliseconds. The default is 5 ms.
httpClient The configuration object for an HTTP client or Mutual Transport Layer Security (TLS) authentication. Providing this configuration is optional.
  • clientSupplierClass
A functional class that accepts a Map<String,String> and returns an Apache HttpClient. This setting is ignored if ClientSupplierClass is provided.
  • hostnameVerifierSupplierClass
A functional class that accepts a Map<String,String> and returns an object that implements HostnameVerifier. This is ignored if ClientSupplierClass is provided.
  • contextSupplierClass
A functional class that accepts a Map<String,String> and returns an object that implements SSLSocketFactory.
  • properties
The map of name/values pairs that is passed to the ClientSupplierClass, contextSupplierClass, and hostnameVerifierSupplierClass to get their respective CredentialSupplier object. . The JSON presentation looks like:
"properties":{ "key1":"value", "key2":"value"}
.
additionalInterceptors An array of additional interceptors. Interceptors provide a mechanism to intercept and/or mutate outgoing requests or incoming responses. The following interceptors are already added to the REST API client by declaring the corresponding auth configuration object:
  • ForwardingInterceptor
  • HttpBearerAuth
  • ApiKeyAuth
  • interceptorSupplierClass

    Required

Provides the name of the functional class for the additional supplier. The class accepts a Map<String,String> and returns an object that implements Feign.RequestInterceptor. Feign provides the Feign.RequestInterceptor interface for adding/removing/mutating any part of the request.
  • properties
The properties are map of name/values that are passed to the interceptorSupplierClass class. The JSON presentation follows this format:
"properties":{ "key1":"value", "key2":"value"}
traceActionsClass A class that implements TraceabilityActions. This is required if you use a diagnostic context that is different than Mapped Diagnostic Context (MDC) for holding this information. Implementing this class is also required if you use property keys that are different than HTTP header keys that the IS applications use.
mapperSupplierClass A supplier class that returns an object mapper
credentialSupplierSupplierClass A functional class that accepts a property map with the credentials that are used to authenticate the HTTP requests. The class returns an object the implements the CredentialSupplier class.
  • properties
The credential property map that is passed to the credentialSupplierSupplierClass class. The supplier is initialized with these properties, and is asked for the values of the required credentials depending on the authentication method. For example,
  • HttpBasic uses username and password
  • HttpBearer uses the schema or the bearToken
  • ApiKey uses apikey
  • OAuth uses username, password, clientId, clientSecret