Map the API request to the z/OS Asset

How to map the API request to the z/OS Asset.

Before you begin

zosConnect-3.0 Applies to zosConnect-3.0.

Containers Applies to z/OS Connect container deployments.

The following tasks must be completed:

  1. Preparing the sample IMS application.
  2. Starting the z/OS Connect Designer with Docker Desktop and importing an OpenAPI definition.
  3. Configuring connections to IMS with Docker Desktop and basic authentication.
  4. Create the phonebook z/OS Asset.

About this task

In the previous procedure, you created the phonebook z/OS Asset. In this task, you map parameters in the API request to fields in the z/OS Asset request.

Procedure

  1. Open the GET /phonebook/contacts/{lastName} Operation flow diagram.
    Expand the /phonebook/contacts/{lastName} path in the navigation panel and click GET. The GET /phonebook/contacts/{lastName} operation is displayed.
  2. Click the API Request node in the Operation flow diagram.
    The API request structure displays the parameters and the body of the request that are expanded by default.

    Within Parameters, there is a single parameter that is called lastName as defined in the OpenAPI definition. Click Down arrow to expand and see more details about this parameter.

    Figure 1. Viewing the API request parameters
    Screen capture to show viewing the API request parameters.
  3. Click the phonebook z/OS Asset node in the Operation flow diagram. The z/OS Asset configuration window opens.
    Figure 2. z/OS Asset view
    Screen capture to show the z/OS Asset node to view request, response and z/OS Asset details
  4. Map the API request parameters in the z/OS Asset request field.
    1. Type DISPLAY in the IN-COMMAND z/OS Asset request field.
    2. Type lastName into the IN-LAST-NAME z/OS Asset request field.
      When you start typing, the Available Mappings menu opens with the available parameters. Select lastName from the list.
      Figure 3. Mapping the lastName API request parameter
      Screen capture to show mapping the lastName API request parameter to IN-LAST-NAME z/OS Asset request field.

      You do not have to type the parameter names. To the right of each text box are two icons:
      • Click Insert a mapping icon to select a Path parameter from the list. When the list opens, be sure that you look in the correct group.
      • Click Insert a function icon to insert a function. Functions are not used in this tutorial. For more information, see Mapping your API and z/OS Assets.
  5. Optional: Review other information about this request within the phonebook window.
    1. Click View structure to see the request schema.
    2. Click Response to view the response schema.
    3. Click z/OS Asset details to view the z/OS Asset configuration details.

Results

The API request parameters are successfully mapped to the fields in the phonebook z/OS Asset.

What to do next

Define the GET /phonebook/contacts/{lastName} responses.