We’ve just released V3.0.9 of z/OS Connect EE. Here is the main enhancement that you may like to try out:
Mapping array type parameters to your z/OS Connect EE service fields
Do you need to allow multiple values for a query parameter, path parameter, or headers in your REST API? You can do so with IBM z/OS Connect EE V3.0.9 or later, together with its API toolkit V3.0.5 or later.
In the API toolkit’s mapping editor, you can now add array type HTTP headers, query parameters, and path parameters to your request messages and map them to various service fields. For response messages, array type HTTP headers can be added and mapped to various response fields.
The following figure shows how you can select â€śarrayâ€ť as the parameter type when you add a query parameter. The same option is also provided for path parameters and HTTP headers.
When the parameter type is set to array, you must specify the array type and the array format. The array type can be string, integer, boolean or number. The array format specifies how the values in the parameter or header are delimited. Supported delimiters differ for query parameters, path parameters, and headers.
For example, you are creating an API to allow client app developers to write an app to add contact information through a web-based form. The contact database contains fields for last name (the key), first name, middle name, address, and phone number. It’s very common that a form would let users enter their addresses on multiple lines. It’s also quite common that a person would have multiple middle names. Therefore, you decide that the query parameters in your API must support the following use cases:
- The middle name can be an array of strings that are separated by commas
- The address can be an array of strings that are separated by pipes (“|”)
- There can be multiple instances of phone numbers.
The following figure shows these array type query parameters in the HTTP request, and how they are mapped to fields in the service.
In this case, the following POST request:
Would produce the following response body:
The version of Liberty that is embedded in z/OS Connect EE is V184.108.40.206.
Get started today
Use the links below to find out more, and to get started with V3.0.9 now!