Defining your APIs with the z/OS Connect API toolkit
zosConnect-2.0 Applies to zosConnect-2.0.
For each path and method combination, you can select an existing z/OS Connect service and specify optional HTTP-to-JSON mappings. The mapping is based on a service archive (.sar) file, which is a compressed collection of files that represent all the information that is needed by a z/OS Connect service provider to install and provide the service, and to enable the service as a JSON asset.
The service archive file is generated by the related tool for each of the z/OS Connect service providers. You can use the z/OS Connect API toolkit to create a service to access CICS®, IMS, or IBM® MQ through their respective service provider. For CICS access through the WebSphere® Optimized Local Adapter (WOLA), you can use the build toolkit.
With the service archive, you can map an HTTP method to a field in the service, or assign a value to a field in the service, by using the z/OS Connect API toolkit. After the mapping is complete, you export the API project into an API archive file.
API archive file
The generated Swagger document in the API archive file is the REST API equivalent of a WSDL document for a SOAP-based web service.
Defining your API in z/OS Connect API toolkit
- Define an API by specifying a name, some description, the base path, and a version number. The base path is the root of all resources that are associated with this API. The base path can contain a variable.
- Define API contact information by specifying a API author name, URL, and email address to provide consumers of the API additional information if support is needed for using the API.
- Add or remove one or more paths (relative paths). For each path:
- You can specify a path parameter in the path, which is indicated with curly braces
({}), such as:
/myPath/{myVariable} - You can add and remove HTTP methods.
- You can reorder methods.
- Each method can be associated with:
- A z/OS Connect service
- One or more query parameters
- One or more headers
- For each method, you can specify the following actions:
- Assign a static value to a field.
- Assign a value to a field from the header, path parameter, or query parameter.
- Remove a field.
- You can specify a path parameter in the path, which is indicated with curly braces
({}), such as:
After the HTTP-to-JSON mapping is defined, you can deploy the API to the z/OS Connect server. From the API toolkit, right-click the API, then click .
Testing, starting, and stopping an API
