WSO2 App Manager facilitates creating multiple versions of an application with and without the app version mentioned in the URL. Once an app is published as the default version, that particular app version can be accessed without specifying the version in the URL.
For example, let's create an app with the following information:
Provider | Lahiru |
App Name | myapp1 |
App Context | myapp1 |
Version | 1.0 |
Default Version | true |
Two synapse configuration XML files are created in the
wso2appm-home/repository/deployment/server/synapse-configs/default/api
directory as versioned and non versioned APIs. In this example, lahriu--myapp1.xml
and lahriu--myapp1_1.0.xml
. The non versioned configuration retains the default version details so that if a request is received without a version, it is redirected to the versioned app.Note the following:
- The non versioned configuration is only created if the published app is the default version (along with the versioned config).
- If a non default app version is published, only the versioned configuration is created.
- If the default app version is unpublished/deleted, the non versioned configuration is deleted along with the versioned configuration.
- If a non default app version is unpublished/deleted, the non versioned configuration remains as it is while the versioned configuration is removed.
App Publisher: Mark an app version as the default
You can either create a new app from scratch or create a new version of an existing app (when the new app is published, all subscriptions to the original app version are copied over to the newly published version). You can define whether or not the app is the default version by using the Make As Default Version check box.
It is also possible to mark any version of an existing app as the default version.
- Display all published versions
- Display only the default version
Open the app-manager.xml
file located in the <APPM_HOME>/repository/conf
directory. If you want to display all published versions of an app, set the DisplayMultipleVersions
property to true. If you want to display only the default version of an app, leave the DisplayMultipleVersions
property as false.