Configuring a REST client connection to Db2

Follow these steps to configure a REST client connection to a Db2® endpoint.

Before you begin

Before you begin this task, ensure that a server instance is set up, see Creating a z/OS Connect (OpenAPI 2) server.

About this task

Edit the server.xml file to configure a REST client connection element to communicate with a Db2 endpoint. You can also define security elements.
Note: If IBM z/OS Connect connects to a System of Record (SoR) that is HTTP 1.1 compliant, then connections are persistent by default, but controlled by the server. The underlying HTTP connection is cached in the JVM and can be reused by another client.

Procedure

  1. Configure a zosconnect_zosConnectServiceRestClientConnection element in server.xml. The host and port attributes must be specified. For example:
    
    <zosconnect_zosConnectServiceRestClientConnection id="db2Conn" 
        host="db2.example.com" port="8080"/>
    
    For more information about the available configuration attributes and default values, see zosconnect_zosConnectServiceRestClientConnection.
  2. If the Db2 endpoint requires security, see Configuring security for a REST client connection to Db2.