Create a Db2 service
This scenario shows how you can recreate the Db2® employeeList
service using the
Db2 service manager in the API toolkit.
Before you begin
employeeList
service ensure that the following tasks are complete:
- Create and enable Db2 Native REST services. The procedure is described in the scenario Prepare the sample Db2 native REST services
- Install IBM® z/OS® Connect v3.0.29 or later. For more information, see Installing IBM z/OS Connect.
- Install the API Toolkit, see Installing z/OS Explorer and the z/OS Connect API toolkit.
- Configure and test your connection to Db2. The procedure is described in the scenario
Create a server to connect to Db2 and installs relevant artifacts using the supplied configuration
template
sampleDb2ProjectManager
. This includes theemployeeList
service. - Use the z/OS Connect API
toolkit to
Stop and Remove
the
employeeList
service.
About this task
In this case we use screenshots of the API toolkit running on a MacOS workstation to recreate the Db2

employeeList
service. This scenario also supports Windows and Linux workstations.

Procedure
- Start IBM Explorer for z/OS and open the z/OS Connect (OpenAPI 2) perspective.
- Right click in the project explorer window and select z/OS Connect Service Project wizard. . Select the
-
Enter employeeList for the project name, select Db2 Service for the project type and enter Returns a list of employees. for the description of the new service project.
Click Finish.The Service Project Editor opens.
-
Click Import from Db2 service manager...
The Import Db2 service from service manager dialog opens.
-
Select New Db2 service manager connection...
-
Enter the host name and port number for Db2. If Db2 uses a secure connection, select secure connection (TLS/SSL).
Click Save and Connect.
-
Enter your credentials to connect to Db2.
Click OK.A green circle indicates that the connection was successful.The Db2 native REST services for the connection are shown in the table.
-
Use the search tool in the top left corner to find the Db2 native REST service
employeeList
.Select theemployeeList
service in the table and click Import. -
The fields Collection ID, Db2 native REST service name, Db2 native REST service version, Request JSON schema and Response JSON schema have been filled.
You can view the contents of the selected
request-schema.json
andresponse-schema.json
schemas in the Project Explorer view as shown on the left hand side. -
Click the Configuration tab at the bottom of the screen.
Add the connection reference db2Conn.
- Save the
employeeList
service.
Results
The employeeList
service is
now ready to be deployed.
What to do next
employeeList
service.