Use the API Explorer to test the projectManager API

Test your newly created projectManager API by using the API Explorer.

Before you begin

zosConnect-2.0 Applies to zosConnect-2.0.

You must also ensure that you have the API Discovery feature enabled in the server.xml server configuration by adding the following element to the feature list:
<feature>apiDiscovery-1.0</feature>
Note: Use of the API Discovery feature requires that you are using z/OS® Connect 3.0.48 and z/OS Connect API toolkit 3.0.9.4, 3.2.9.4, or later.

Procedure

  1. Ensure your Db2 instance which has the native REST services installed is running.
  2. Ensure your z/OS Connect Server is running.

    For more information, see Starting and stopping the IBM z/OS Connect Servers. Use the z/OS Connect Servers view to confirm your APIs and services are installed.

    Image showing z/OS Connect Servers view
    1. View installed services.
      Expand the z/OS Connect Server and the Services subfolder and check the employeeList, employeeDetails, and employeeUpdate services are listed
    2. View installed APIs.
      Expand the APIs subfolder and check the projectManager API is listed
  3. In the z/OS Connect Servers view of the API toolkit, under the APIs folder, double-click on the projectManager API.
    The API opens in the API Explorer. If you are not using the API Explorer feature, select Open in Swagger UI from the context menu.
  4. Click List Operations to see available operations in the API.
    <figure of API Explorer>
  5. Click GET /employees to test listing employees.
    Click Try it out!. Information about the request URL, request headers, response body, response code, and response headers are provided.
    API Explorer try it out image
    The response body contains an array of employees.
    API Explorer try it out response array image
  6. Click GET /employees/{employeeNumber} to get the details of a single employee.
    Enter an employeeNumber, as found in the response from the previous request, in the employeeNumber path parameter. Click Try it out!. Information about the request URL, request headers, response body, response code, and response headers are provided.
    API Explorer try it out image
    The response body contains details for a single employee.
    API Explorer try it out response array image
  7. Click PUT /employees/{employeeNumber} to update the details for a single employee.
    Enter the same employeeNumber, firstName, lastName, hireDate, and department as used in the previous request, in the matching parameters. Enter a different 4 digit number in the employeePhoneNumber request body. Click Try it out!. Information about the request URL, request headers, response body, response code, and response headers are provided.
    API Explorer try it out image
    The response body contains details for a single employee.
    API Explorer try it out response array image
  8. To confirm the update was successful, click GET /employees/{employeeNumber} to get the details of the same employee.
    Enter the same employeeNumber, as used in the previous request, in the employeeNumber path parameter. Click Try it out!. Information about the request URL, request headers, response body, response code, and response headers are provided.
    API Explorer try it out image
    The response body contains details for a single employee.
    API Explorer try it out response array image

Results

You have verified that your newly created projectManager API works to Db2.