API Builder AMPLIFY CLI

Note

Icon

The AMPLIFY CLI is a companion CLI for the Axway AMPLIFY platform. It can be used to create API Builder Standalone projects and initialize them with Swagger specifications that are downloaded from the AMPLIFY Catalog. If you are using API Builder without the platform, you can optionally use the API Builder CLI instead.

API Builder AMPLIFY CLI

This document will guide you through the steps necessary to use API Builder with the Axway AMPLIFY Platform CLI.

Installation

If you have not already installed the AMPLIFY CLI, you can install via npm:

Install @axway/amplify-cli
$ [sudo] npm install -g @axway/amplify-cli

Use the AMPLIFY CLI package manager to install the API Builder CLI

Install @axway/amplify-builder-cli
$ amplify pm install @axway/amplify-api-builder-cli

Getting started

Log in to the Axway AMPLIFY Platform using the following command:

AMPLIFY login
 $ amplify auth login --client-id apicentral

Then, initialize a new API Builder Standalone project and specify the --get-catalog option. This will use the current AMPLIFY user session to download the proxy services available from API Central. The command will create the project, download the proxy services, and execute a npm install in the myproject directory.

Create new API Builder project
$ amplify builder init --get-catalog myproject
AMPLIFY API Builder CLI, version 1.1.2
Copyright (c) 2019, Axway, Inc. All Rights Reserved.
Using account: apicentral:user@company.com
✔ Create project directory: myproject
✔ Fetching API Catalog
✔ Installed marketo_129818
✔ Installed slack_126453
✔ Installed another-api-builder-service
✔ Install dependencies
Successfully created: myproject. To run:
 cd myproject
 npm start

If you want to download only specific catalog entries, you can optionally supply a filter, which is evaluated as a regular expression:

Create new API Builder project
$ amplify builder init --get-catalog --filter="Marketo" myproject

Related Links