Generating API requester archives for DevOps

An API requester archive (.ara) file contains the information that is needed by IBM® z/OS® Connect to call a remote endpoint.

The properties files used to configure API requesters can also be checked into a source control management system, then automatically built and deployed as part of a DevOps pipeline. You can use the build toolkit to build the API requester properties files into deployable archive files and use scripts to copy the files to the apiRequesters directory.

zosConnect-2.0 Applies to zosConnect-2.0.

Started task Applies to z/OS Connect Servers run by using a z/OS started task procedure.

Before you begin

Ensure that the z/OS Connect build toolkit is installed.

About this task

An API requester archive (.ara) file contains the information that is needed by z/OS Connect to provide the API. The API project directories can also be checked in to the source control management (SCM) system and therefore automatically built and deployed as part of a DevOps pipeline. You can use the build toolkit to build the API projects into deployable archive files and use scripts to copy the files to the API directory.

Procedure

  1. Obtain the latest API source files from your source control management system and put them in a location that the zconbt command can access.
  2. Use the zconbt command to generate the API requester archive. Use the --projectDirectory parameter to specify the project directory, and --file parameter to specify the file name for the generated API archive.
    For example:
    zconbt --projectDirectory=C:/APIs/purchaseAPI --file=C:/APIs/purchaseAPI.ara
    zconbt --projectDirectory=./u/apiProjects/lookupAPI --file=./u/AARs/lookup.ara
    Note: If you are running on Microsoft Windows, use either a double backslash \\ or a forward slash character / in the path name.
    Note: If you are running on z/OS, you can use the sample JCL provided in <hlq>.SBAQSAMP(BAQZCBT) to run the zconbt.zos command. You must customize the sample JCL following the instructions in BAQZCBT.
  3. If any errors occur, make the necessary corrections and repeat the procedure.
  4. You can now deploy the API requester archive file by copying it to the designated API directory.

Results

An API is automatically deployed when the API requester archive is copied into the API directory if the server is configured to monitor the API directory for changes. For more information about API archive management, see Automated API management.