Delete an Application Package
Application packages are meant to be immutable, which means that if you need to change something, the preferred way of doing so is releasing a new version (typically a patch version, where the last segment of the version number is increased). This approach makes it possible for the system to keep track of different versions and to handle version upgrades gracefully.
Note the following points:
- By default, new application deployments will automatically use the latest published version of the application.
- There is no automatic mechanism for running applications to stop working immediately even if an old application version is removed.
- If you remove an application version from the Application Store, then no application upgrade will be performed automatically, but the application can stop working any time when it needs to load the (removed) application package during its normal operation.
In the rare case when you need to delete an application version from the Application Store, you can use the DELETE /api/v1/applications/<repo>/<app>/<version>
HTTP endpoint.
You can find the values for <repo>/<app>
:
- on the dashboard at the end of the URL of Application Store entries, in the
ApplicationID
field of an application deployment’s details page, or - in the application list available through the
GET /api/v1/applications
endpoint.
Delete an application version
-
Make a note of the application identifier (
<repo>/<app>
) and the exact version number. -
Set your API key as a variable in your shell by running the following command:
GBEAR_API_KEY=<your-api-key>
To access the API key, login to the Great Bear Dashboard, select the top right Profile icon, then click Copy API Key.
-
Make sure that the given application version is not deployed to any sites.
-
Issue the DELETE call using cURL:
curl -H "x-id-api-key: ${GBEAR_API_KEY}" \ -X DELETE \ "https://api.greatbear.io/api/v1/applications/<repo>/<app>/<version>"
For example, to delete version
1.2.3
of an application package calledmy-application
in the main repository ofmy-tenant
, you can use the following cURL command:curl -H "x-id-api-key: ${GBEAR_API_KEY}" \ -X DELETE \ "https://api.greatbear.io/api/v1/applications/my-tenant/my-application/1.2.3"
-
Reload the dashboard and check if the application version disappeared from the Application Store listing.
Delete an application
If you want to delete all versions of an application:
- Make a note of the application identifier (
<repo>/<app>
) and the version numbers available. You can use the Application Store listing of the dashboard, or theGET /api/v1/applications
endpoint to collect them. - Complete the Delete an application version procedure for each version.
- Reload the dashboard and check if the application disappeared from the Application Store listing.