Skip to content

2.2 Export and report APIs

Chris Wiechmann edited this page Jun 16, 2020 · 14 revisions

The Axway API-Management CLI tool allows you to export APIs from the API-Manager for instance in order to promote them into the next stage or update the configuration.
To get started use the CLI with the following command: apim api get -h which provides you with a complete usage.

Filter the list of APIs

You can filter the list of APIs. Multiple filters are combined with AND. The following provides you with a few examples. Please check the usage for all filter options:

Command Comment/Description
apim api get -s prod Lists ALL APIs with standard information on the console
apim api get -s prod -policy "*Security*" -wide Lists ALL APIs using a policy Security on the console on a wider format
apim api get -s prod -name "*Banking*" -ultra Gets All APIs named Banking and prints them with all available information

Export Format

By default the get operation is using the console view and generates a table representation of the exported data. However, you can provide a --format or -f parameter to the get operation to control the export format you want.

JSON

This format gives you the data format as it's required to import the API with apim api import. For each exported API an export folder is created.

Command Comment/Description
apim api get -s prod Lists ALL APIs with standard information on the console
apim api get -s prod -id 8f7bd987-0736-43b.... -f json Export the API with the provided UUID into the current folder. Keep in mind the is changed, whenever the API is recreated.
apim api get -s qa -format -l C:/axway/apis Gets All APIs from the QA-Stage exported into the given local folder. For each exported API a folder is automatically created.

You can provide the option: -deleteFolderif you would like to replace existing folders.

Excel

❗ Planned in one of the next versions.
A complete report allowing to see current subscriptions, which policies to use. Basically the same information as with using the -ultra option, but exported in a more detailed fashion.
Excel report

Clone this wiki locally