Deploying an API in the API toolkit

After you define your API, you can deploy the API directly to your z/OS® Connect server from the API toolkit.

Before you begin

zosConnect-2.0 Applies to zosConnect-2.0.

By default, deployed APIs are automatically started. You can change this behavior by configuring the z/OS Connect preferences:
  1. From the main menu bar, click Windows > Preferences.
  2. In the Preferences wizard, select z/OS Connect.
  3. Make your changes and click Apply and then OK.

Make any final edits to the Swagger document. For example, you might want to add security and authentication requirements. Manual changes to the Swagger document in the API editor are preserved when saved. To edit the Swagger document with your preferred JSON editor, find the location of the Swagger document by right-clicking the api-docs/ folder of your API project in the Project Explorer view and selecting Properties. The location of the Swagger document is displayed in the Location field.

Ensure that you are connected to the server. For more information, see Connecting to a z/OS Connect server.

About this task

You can deploy an API directly from the package editor by clicking Deploy API to z/OS Connect Server (Icon for the Deploy API control in the corner.).

You can also deploy the API from Project Explorer view, or by using the apideploy command on the server.

Procedure

To deploy the API from the Project Explorer view:

  1. In the Project Explorer view, select one or more API projects and right-click to select z/OS Connect > Deploy API to z/OS Connect Server.
  2. In the Deploy API window, select the server to which to deploy the APIs.
  3. If an API of the same name exists and you want to overwrite it, select the Update existing APIs checkbox.
  4. Click OK.
    Alternatively, if you need to deploy the API by using the apideploy command on the server:
    1. Right-click the API project and click > Export z/OS Connect API Archive to save the API as an API archive (.aar) file to a location of your choice.
    2. Transfer the API archive file in binary mode to a file system that the API Deployment utility can access.
    3. In an OMVS shell, enter the apideploy -deploy command. For more information, see Deploying an API.

Results

Deployment result is reported. Errors that occur during the deployment are recorded in the Problems view. A deployed API is automatically started unless specified otherwise in the z/OS Connect preferences window.
Tips:
  • To see the newly deployed APIs on the server, in the z/OS Connect Servers view, right-click the APIs folder, and select Refresh.
  • If you right-click the server itself and select Refresh Server, status for all APIs and services that are deployed on the server is fetched and refreshed.
  • Save a copy of the API project in your source control management system.
  • The server stores the API in a file with the API name as the file name and a file extension of .aar.

What to do next

Examine and test the API directly within the API toolkit.