In the previous procedure, you created the
phonebookz/OS Asset. In this task, you map parameters in the
API request to fields in the z/OS Asset
request.
Procedure
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.
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 to expand and see more details about this parameter.
Figure 1. Viewing the API request parameters
Click the phonebookz/OS Asset node in the Operation flow diagram. The z/OS Asset
configuration window opens.
Figure 2. z/OS Asset view
Map the API request parameters in the z/OS Asset request field.
Type DISPLAY in the IN-COMMANDz/OS Asset request field.
Type lastName into the IN-LAST-NAMEz/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
You do not have to type the parameter names. To the right of each text box are two icons:
Click to select a Path parameter from
the list. When the list opens, be sure that you look in the correct group.
Click to insert a function. Functions
are not used in this tutorial. For more information, see Mapping your API and z/OS Assets.
Optional: Review other information about this request within the
phonebook window.
Click View structure to see the request schema.
Click Response to view the response schema.
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.