Testing an API with z/OS Connect Designer

Test your API project with IBM z/OS Connect Designer by using the Open Liberty REST Client.

zosConnect-3.0 Applies to zosConnect-3.0.

Containers Applies to z/OS Connect container deployments.

The z/OS Connect Designer contains a z/OS Connect development server for iteratively developing and testing your API.

Alongside this, the Open Liberty REST Client is enabled as part of the z/OS Connect Designer container. During development, z/OS Connect Designer auto-deploys the updated API at approximately 10-second intervals to the z/OS Connect development server. Testing of the development changes can be completed in real-time with the Open Liberty REST Client.

Note: You are able to test your API in any REST client of your choosing, it does not have to be the Open Liberty REST Client available as part of the z/OS Connect Designer.

Before testing your API operations with Open Liberty REST Client, ensure:
  1. The z/OS Connect Designer is started and a valid OpenAPI 3 document imported.
  2. Connections are configured to the System of Record.
  3. A z/OS Asset is added to the operation that you want to call.
  4. The necessary API request fields are mapped to the required z/OS Asset request fields for the operation.
  5. The response conditions for the response cases are set for the operation you are calling.
  6. The required z/OS Asset response fields are mapped to the required API response fields for the operation.

At any point while developing your API, click the Test API button Test API button enabled as shown in Figure 1 to open the OpenLiberty REST Client.

Figure 1. Location of the Test API button
Screen capture to show the location of the Test API button in the upper right corner of the z/OS Connect Designer UI.
The Test API button changes to show the status of the API Project build. The following table shows the indicated status:
Table 1. Test API button status
Indication Status
Test API button enabled Enabled. Click the button to test your API.
Test API button in unavailable state with loading indicator Button is unavailable with a loading indicator. The project build is running.
Test API button in unavailable state with error indicator Button is unavailable with an error indicator. The project build failed. Hover over the button to see error information. For example, Test API button in unavailable state with error indicator and hover text with error message
Figure 2. The Open Liberty REST Client
Screen capture to show the Open Liberty REST Client.

Expanding any operation reveals request and response parameters for that operation.

Figure 3. Expanded operation in Open Liberty REST Client
Screen capture to show an expanded operation in the Open Liberty REST Client. The example is GET /employees/{id}

Click Try it out "Try it out" button to send a request to your API operations providing values for the API request parameters.

Attention: When trying your API operations ensure that the URL of the path level override matches the URL your z/OS Connect Designer is being served from. For example, if the URL starts with https://localhost:9443/ then ensure the path level override matches.

For examples that use the Open Liberty REST Client, see: