AppEngine - Registry
Overview
The Registry is mainly responsible for
- installing / updating / storing apps
- uninstalling / removing apps
- getting apps
Asynchronous behavior
Both the install and the uninstall process are performed asynchronously. The Registry persists the app bundle and defines the desired state of the app (e.g. installed, uninstalled). The installation / uninstallation process is then handled asynchronously by a separate service.
The current status of the app is provided by the status in the response body of the
respective GET request, e.g. /apps/{id}
.
npm install @dynatrace-sdk/client-app-engine-registry
appEngineRegistryAppsClient
import { appEngineRegistryAppsClient } from '@dynatrace-sdk/client-app-engine-registry';
getApp
Get an installed app
Required scope: app-engine:apps:run
During an app update, when a current version and a new version exists, the current one is returned.
Parameters
Name | Type | Description |
---|---|---|
config.addFields | string | Comma-separated list of field names that are added to the default set of fields. You can include the following additional fields:
|
config.id*required | string | The unique identifier for the app |
config.latestAppVersion | boolean | If If This is relevant while an app is being updated. During this time typically two versions of the same app exist, the current version and the latest version with |
Returns
OK
Code example
import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";
const data = await appEngineRegistryAppsClient.getApp({
id: "...",
});
getApps
List all installed apps.
Required scope: app-engine:apps:run
Parameters
Name | Type | Description |
---|---|---|
config.addFields | string | Comma-separated list of field names that are added to the default set of fields. You can include the following additional fields:
|
config.includeAllAppVersions | boolean | If If This is relevant while an app is being updated. During this time typically two versions of the same app exist, the current version and the latest version with |
config.includeDeactivated | boolean | If true , apps that are DEACTIVATED because of missing entitlements are included in the response. |
config.includeNonRunnable | boolean | If true , apps that the user is not allowed to run because of missing permissions are included in the response. |
Returns
OK
Code example
import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";
const data = await appEngineRegistryAppsClient.getApps();
installApp
Install or update an app.
Required scope: app-engine:apps:install
An app ID always starts with a namespace and a dot, e.g. dynatrace.
for Dynatrace apps. Custom apps can be installed in the my
namespace, e.g. my.first-app
.
The zipped app bundle has to be provided via the request body
Parameters
Name | Type |
---|---|
config.body*required | Blob |
Returns
Accepted; new app will be installed/updated
Code example
import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";
const data = await appEngineRegistryAppsClient.installApp({
body: new Blob(),
});
searchActions
Search actions of installed apps.
Required scope: app-engine:apps:run
Parameters
Name | Type | Description |
---|---|---|
config.query | string | A whitespace separated list of search terms. For an action to match, each search term must be contained in either: app name, app description, action name or action description. Search terms are case insensitive and each additional search term restricts actions further. Maximum length is 256 characters. |
Returns
OK
Code example
import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";
const data =
await appEngineRegistryAppsClient.searchActions();