-
Notifications
You must be signed in to change notification settings - Fork 18
3. Manage Applications
Import applications
Learn how you can import applications from a configuration file into the API-Manager
Export and report applications
You can export one or more applications from a running API-Manager or just get a list/report of the applications.
The Axway API-Management CLI tool allows you to import or basically replicate the desired Applications into the API-Manager to become the actual state.
To get started use the CLI with the following command: apim app import -h
which provides you with a complete usage.
The mandatory required parameters are the stage (alternatively host/username/password) and the API-Configuration file. The following examples should help you to get started:
Command | Comment/Description |
---|---|
apim app import -s qa -c myAppConfig.json |
Replicates an application into the QA-Stage |
{
"name" : "Complete application",
"description" : "Sample Client Application, registered for use in the Client Demo",
"state" : "approved",
"image" : "app-image.jpg",
"enabled" : true,
"email" : "[email protected]",
"phone" : "012345678",
"credentials" : [ {
"credentialType" : "oauth",
"enabled" : true,
"secret" : "9cb76d80-1bc2-48d3-8d31-edeec0fddf6c",
"corsOrigins" : [ ],
"cert" : "app-oauth-cert.crt",
"type" : "confidential",
"clientId" : "ClientConfidentialApp",
"redirectUrls" : [ "https://localhost:8088/client/apigateway/callback", "https://oauthclient:8088/client/apigateway/callback" ]
}, {
"credentialType" : "apikeys",
"enabled" : true,
"secret" : "34f2b2d6-0334-4dcc-8442-e0e7009b8950",
"corsOrigins" : [ "*" ],
"apiKey" : "6cd55c27-675a-444a-9bc7-ae9a7869184d"
} ],
"appQuota" : {
"restrictions" : [{
"api" : "*",
"method" : "*",
"type" : "throttle",
"config" : {
"messages" : "9999",
"period" : "week",
"per" : "1"
}
} ]
},
"permissions": [
{
"user": "ALL",
"permission": "view"
},
{
"user": "chris",
"permission": "manage"
}
]
}
Application permission management, i.e. sharing applications with users of the same organization, is possible from version 1.5.0.
The Axway API-Management CLI tool allows you to export Applications from the API-Manager for instance in order to promote them into the next stage, put them into a version-control system or just update the configuration.
To get started use the CLI with the following command: apim app get -h
which provides you with a complete usage.
You can filter the list of Applications. 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 app get -s prod |
Lists ALL applications with standard information on the console |
apim api get -s prod -name "*Banking*" -ultra |
Gets application named Banking and prints them with all available information |
There is no difference between the wide and ultra option for applications.
By default the get
operation is using the console view and generates a table representation of the exported data. However, you can provide a --output
or -o
parameter to the get
operation to control the export format you want.
This format gives you the JSON format as it's required to import the application with apim app import
. For each exported application an export folder is created.
Command | Comment/Description |
---|---|
apim app get -s prod -id 8f7bd987-0736-43b.... -o json |
Export the API with the provided ID into the current folder. |
apim app get -s qa -t C:/axway/applications -o json |
Gets All applications from the QA-Stage exported into the given local folder. For each exported application a folder is created automatically. |
You can provide the option: -deleteTarget
if you would like to replace existing folders.