Open Beta

Manage your project with AMPLIFY Choreography CLI

Axway's AMPLIFY Choreography text-based command line interface (CLI) is used to develop and manage your AMPLIFY project. Why CLI?

  • It requires limited system resources
  • It is fast
  • You can bundle commands

Before you start

  • You will need an administrator account for Axway AMPLIFY Platform. See Create account.
  • Install Axway AMPLIFY CLI:
    1. Install Node.js 10.15.1 LTS or later.
    2. Run the following command:
    3. $ [sudo] npm install -g @axway/amplify-cli
    4. Run the AMPLIFY package manager command to install the AMPLIFY Choreography CLI:
    5. $ amplify pm install @axway/amplify-ace-cli
  • Run the following command to log into the Axway AMPLIFY Platform:
$ amplify auth login

See available login and auth options using the command:
$ amplify auth login -h
  • Run the following command to log out of the Axway AMPLIFY Platform:
$ amplify auth logout
See available logout and auth options using the command:
$ amplify auth logout -h
  • Configure AMPLIFY Choreography CLI:
    • For pre-production and production, the CLI uses https://preprod.ace.axwaytest.net and https://choreography.platform.axway.com. This is based on env config in AMPLIFY CLI. The default env is "prod".
    • To switch the environment to preprod:
    • amplify config set env preprod
    • To setup "ace.runtime.url":
    • amplify config set ace.runtime.url {ACE_RUNTIME_URL}

Objectives

Learn how to use the AMPLIFY Choreography CLI commands to develop and manage your AMPLIFY project.

Note   All CLI commands require authentication. You must be logged in to the Axway AMPLIFY Platform.

CLI reference

$ amplify ace <command> [options]

Commands:
  init          Initialize project
  step          Step configuration management
  choreography  Choreography configuration management

Initialize project

The init command starts the project.:

$ amplify ace init

You are prompted through a series of questions:

  • Language - (Required): Go, Java, Node.js
  • Service name - (Required): Service name cannot be a single character of ".", "..", "_ ", or ""', or contain non-ASCII alphanumerics other than ".", "..", "_ ", or "-"'
  • Service version - (Required): Enter service version in the form of ‘Major.Minor.Patch’ (e.g., ‘1.0.0’)
  • Service Description - (Optional)
  • Project directory - (Required): Enter a valid path where the project will be created on the local machine. Length cannot exceed 249 characters

Output when the project is created successfully - 'Project configuration <new configuration file> successfully created.'

List available AMPLIFY Choreography services

The list command returns a list of tenant-registered AMPLIFY Choreography services:

$ amplify ace step list

You can also enter amplify ace -h for help.

Add choreography

The choreography add command creates functional choreographies using available AMPLIFY Choreography services.

Note   You can also use choreo as a shortcut for choreography.
ace choreography add --f=<./filePath>

If the services (steps) defined in the choreograph file have not been registered, the add command returns an error.

List choreography

The choreography list command lists choreographies uploaded by the tenant.

Note   You can also use choreo as a shortcut for choreography.
$ amplify ace choreography list

Only the ID and name of the choreography is displayed when viewing the entire list.

To view a specific choreography by id:

$ amplify ace choreography list --id=<id>

To view a specific choreography by name:

$ amplify ace choreography list --named=<name>

The choreography's JSON content is displayed when viewing by id or name.

You can also enter amplify ace -h for help.

Delete choreography

The choreography delete command deletes a previously created choreography.

Note   You can also use choreo as a shortcut for choreography.
$ amplify ace choreography delete --id=<id>

You can also enter amplify ace -h for help.

Execute choreography

The choreography run command triggers the execution of a choreography using the CLI.

Note   You can also use choreo as a shortcut for choreography.
$ amplify ace choreography run <name>

To pass an optional file containing a payload:

$ amplify ace choreography run <name> --f=<filePath>

To pass an optional reference to a file as the payload:

$ amplify ace choreography run <name> --ref=<filePath>

To pass an optional file containing a payload and associate metadata to the payload:

$ amplify ace choreography run <name> --f=<filePath> --meta=<metadata-filePath>

You can also enter amplify ace choreography run -h for help.

Related Links