Skip to main content

AppEngine - registry

  • Reference

The Registry is mainly responsible for:

  • installing / updating apps
  • uninstalling apps
  • getting detailed app information

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}.

Version 4
npm install @dynatrace-sdk/client-app-engine-registry

appEngineRegistryActionsClient​

import { appEngineRegistryActionsClient } from '@dynatrace-sdk/client-app-engine-registry';

getAppAction​

appEngineRegistryActionsClient.getAppAction(config): Promise<ActionDetails>

Get a single action of an installed app.

Required scope: app-engine:apps:run

Early adopter: May be changed in non-compatible ways, although we try to avoid this.

Returns the action with all its fields, as declared in the manifest of the app.

Parameters​

NameTypeDescription
config.actionName*requiredstringThe name of the action (action.name in the response).

Example: jira-link-issue
config.appId*requiredstringThe id of the app (app.id in the response).

Example: dynatrace.jira

Returns​

Return typeStatus codeDescription
ActionDetails200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorThe app is not installed, the user is not allowed to run it, or it has no action with this name. | Client side error. | Server side error.

Code example

import { appEngineRegistryActionsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data =
await appEngineRegistryActionsClient.getAppAction({
appId: "dynatrace.jira",
actionName: "jira-link-issue",
});

getAppActions​

appEngineRegistryActionsClient.getAppActions(config): Promise<ActionList>

Get actions of installed apps.

Required scope: app-engine:apps:run

Early adopter: May be changed in non-compatible ways, although we try to avoid this.

Returns a flat list of the actions of all installed apps.

Every entry carries a minimal set of fields. Use add-fields to request more fields, or GET /actions/{appId}/{actionName} to get a single action with all its fields.

Parameters​

NameTypeDescription
config.addFieldsstring

Comma-separated list of field names that are added to the default set of fields.

The default set of fields is:

  • app.id
  • action.name
  • action.title
  • action.description

You can add any top-level field of the action, as declared in the manifest, with the prefix action.. Fields that an action does not declare are left out for that action.

config.filterstring

The filter parameter, as explained here.

Filtering is supported on the following fields:

  • app.id
  • action.<field>: top-level fields of the action, as declared in the manifest

Use search for a free-text search. Use filter for conditions on specific fields. If you use both, an action must match both.

Examples:

  • app.id = 'dynatrace.jira'
  • action.name starts-with 'jira-'
  • not (action.inputSchema is-empty)

If this parameter is omitted, all actions are returned.

The maximum nesting depth (via parentheses) is 3. The maximum expression length is 256 characters.

Filtering on a field does not add the field to the response. Use add-fields for that.

config.searchstring

A whitespace separated list of search terms. For an action to match, each search term must be contained in either: app id, app name, action name, action title or action description.

Search terms are case insensitive and each additional search term restricts actions further. Maximum length is 256 characters.

If you also use filter, an action must match both.

Example: search=jira issue returns actions that contain both jira and issue.

If this parameter is omitted, all actions are returned.

Returns​

Return typeStatus codeDescription
ActionList200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistryActionsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data =
await appEngineRegistryActionsClient.getAppActions();

appEngineRegistryAppsClient​

import { appEngineRegistryAppsClient } from '@dynatrace-sdk/client-app-engine-registry';

getApp​

appEngineRegistryAppsClient.getApp(config): Promise<AppInfo>

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​

NameTypeDescription
config.addFieldsstring

Comma-separated list of field names that are added to the default set of fields.

You can include the following additional fields:

  • resourceContext
  • resourceStatus.subResourceTypes
  • resourceStatus.subResourceStatuses
  • manifest
  • any top-level manifest field to include a part of the manifest, for example, manifest.scopes or manifest.intents
  • isBuiltin
  • isolatedUri
  • deactivationReasons
config.id*requiredstringThe unique identifier for the app
config.latestAppVersionboolean

If true, the latest version of the app is returned.

If false, the current version of the app is returned.

During an update, an app typically has two versions: the current version and the latest version with status=PENDING.



Default: false

Returns​

Return typeStatus codeDescription
AppInfo200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data = await appEngineRegistryAppsClient.getApp({
id: "...",
});

getApps​

appEngineRegistryAppsClient.getApps(config): Promise<AppInfoList>

List all installed apps.

Required scope: app-engine:apps:run

Parameters​

NameTypeDescription
config.addFieldsstring

Comma-separated list of field names that are added to the default set of fields.

You can include the following additional fields:

  • resourceContext
  • resourceStatus.subResourceTypes
  • resourceStatus.subResourceStatuses
  • manifest
  • any top-level manifest field to include a part of the manifest, for example, manifest.scopes or manifest.intents
  • isBuiltin
  • isolatedUri
  • deactivationReasons
config.filterstring

The filter parameter, as explained here.

Filtering is supported on the following fields:

  • id
  • resourceStatus.subResourceTypes
  • top-level manifest fields, for example manifest.description or manifest.version Examples:
  • id = 'my.custom-app'
  • id contains 'custom'
  • id starts-with 'my.'
  • not(id starts-with 'my.')
  • id in ('my.custom-app', 'my.other-custom-app')
  • resourceStatus.subResourceTypes contains 'DOCUMENTS'
  • resourceStatus.subResourceTypes contains 'DOCUMENTS' or resourceStatus.subResourceTypes contains 'FUNCTIONS'
  • not (id starts-with 'dynatrace.classic.') (to exclude classic apps)
  • not (manifest.document-types is-empty)
  • manifest.document-types contains 'Notebook' (to filter the json content of the top-level manifest field document-types for apps that provide the Notebook document type)

If this parameter is omitted, all apps will be returned.

The maximum nesting depth (via parentheses) is 3. The maximum expression length is 256 characters.

Filtering on a field does not add the field to the response. Use add-fields for that.

config.includeAllAppVersionsboolean

If true, all versions of every app are included in the response.

If false, only the current version of every app is included.

During an update, an app typically has two versions: the current version and the latest version with status=PENDING. After the update, the old version may remain for some time with status=PENDING_DELETION.



Default: false
config.includeDeactivatedbooleanIf true, apps that are DEACTIVATED are included in the response.

Default: false
config.includeNonRunnablebooleanIf true, apps that the user is not allowed to run because of missing permissions are included in the response.

Default: false

Returns​

Return typeStatus codeDescription
AppInfoList200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data = await appEngineRegistryAppsClient.getApps();

installApp​

appEngineRegistryAppsClient.installApp(config): Promise<AppStub>

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​

NameType
config.body*requiredBlob

Returns​

Return typeStatus codeDescription
AppStub202Accepted; new app will be installed/updated

Throws​

Error TypeError Message
ErrorEnvelopeErrorBad Request | Client side error. | Server side error.

Code example

import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data = await appEngineRegistryAppsClient.installApp({
body: new Blob(),
});

searchActions​

appEngineRegistryAppsClient.searchActions(config): Promise<SearchAppActionList>

Search actions of installed apps.

Required scope: app-engine:apps:run

Parameters​

NameTypeDescription
config.querystring

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, action title or action description.

Search terms are case insensitive and each additional search term restricts actions further. Maximum length is 256 characters.

Returns​

Return typeStatus codeDescription
SearchAppActionList200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data =
await appEngineRegistryAppsClient.searchActions();

uninstallApp​

appEngineRegistryAppsClient.uninstallApp(config): Promise<void>

Uninstall an app.

Required scope: app-engine:apps:delete

Parameters​

NameTypeDescription
config.id*requiredstringThe unique identifier for the app

Returns​

Return typeStatus codeDescription
void202Accepted; app will be uninstalled

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistryAppsClient } from "@dynatrace-sdk/client-app-engine-registry";

const data = await appEngineRegistryAppsClient.uninstallApp(
{ id: "..." },
);

appEngineRegistryDefaultCspClient​

import { appEngineRegistryDefaultCspClient } from '@dynatrace-sdk/client-app-engine-registry';

getDefaultCspProperties​

appEngineRegistryDefaultCspClient.getDefaultCspProperties(config): Promise<AppDefaultCsp>

Get default CSP rules for apps

Returns​

Return typeStatus codeDescription
AppDefaultCsp200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistryDefaultCspClient } from "@dynatrace-sdk/client-app-engine-registry";

const data =
await appEngineRegistryDefaultCspClient.getDefaultCspProperties();

appEngineRegistrySchemaManifestClient​

import { appEngineRegistrySchemaManifestClient } from '@dynatrace-sdk/client-app-engine-registry';

getAppManifestSchema​

appEngineRegistrySchemaManifestClient.getAppManifestSchema(config): Promise<Record<string | any>>

Get JSON schema for app manifests

Returns​

Return typeStatus codeDescription
void200OK

Throws​

Error TypeError Message
ErrorEnvelopeErrorClient side error. | Server side error.

Code example

import { appEngineRegistrySchemaManifestClient } from "@dynatrace-sdk/client-app-engine-registry";

const data =
await appEngineRegistrySchemaManifestClient.getAppManifestSchema();

Types​

ActionApp​

The app that declares the action.

NameTypeDescription
id*requiredstringThe id of the app.

Example: dynatrace.jira

ActionDefinition​

The action as declared in the manifest of the app.

Any further field that the app declares for the action is passed through as is.

NameTypeDescription
descriptionstringThe description of the action.

Example: Link two Jira issues
name*requiredstringThe name of the action. It is unique within the app.

Example: jira-link-issue
titlestringThe human readable title of the action.

Example: Link issue

ActionDetails​

An action of an app with all its fields.

action contains every field that the app declares for the action in its manifest.

NameTypeDescription
action*requiredActionDefinition

The action as declared in the manifest of the app.

Any further field that the app declares for the action is passed through as is.

app*requiredActionAppThe app that declares the action.

ActionList​

A flat list of app actions.

NameTypeDescription
actions*requiredArray<ActionStub>

A flat list of actions. Actions are sorted by action name, then by app id, both in ascending order.

ActionStub​

An action of an app with a minimal set of fields.

action contains the default fields and the fields requested through add-fields.

NameTypeDescription
action*requiredActionDefinition

The action as declared in the manifest of the app.

Any further field that the app declares for the action is passed through as is.

app*requiredActionAppThe app that declares the action.

AppDefaultCsp​

Default Content Security Policies for apps.

NameTypeDescription
policyDirectives*requiredAppDefaultCspPolicyDirectivesThe policy directives

AppDefaultCspPolicyDirectives​

The policy directives

type: Record<string, string[]>

AppIcon​

Representation of an app icon.

NameTypeDescription
href*requiredstringThe reference to an app icon

AppInfo​

A minimal representation of an app.

NameTypeDescription
appIconAppIconRepresentation of an app icon.
deactivationReasonsArray<"CapabilityAppEngineFunctionsSmallDisabled" | "AppCertificateRevoked">Contains the reasons if the app has the status DEACTIVATED
description*requiredstringThe description of the app
id*requiredstringThe id of the app
isBuiltinboolean

Whether this is a built-in app or not. Built-in apps are provided by Dynatrace and installed on every environment.

isolatedUriAppIsolatedUriRepresentation of an app's isolated uri.
manifestAppInfoManifestThe manifest of the app
modificationInfo*requiredModificationInfoModification information about the app
name*requiredstringThe name of the app
resourceContextResourceContextAdditional resource context information
resourceStatus*requiredResourceStatusThe status of the app plus additional details.
signatureInfo*requiredAppSignatureInfoRepresentation of an app's signature verification.
version*requiredstringThe version of the app

AppInfoList​

A list of minimal app representations.

NameTypeDescription
apps*requiredArray<AppInfo>The list of minimal app representations.

AppIsolatedUri​

Representation of an app's isolated uri.

NameTypeDescription
baseUrl*requiredstringThe base URL of an app
url*requiredstringThe URL of an app
widgetUrl*requiredstringThe base URL for widgets of an app

AppSignatureInfo​

Representation of an app's signature verification.

NameTypeDescription
publisherstringThe organization name of the app publisher.
signed*requiredbooleanApp is signed and its signature has been verified.

AppStub​

A minimal representation of an installed/updated app.

NameTypeDescription
id*requiredstringId of the installed/updated app
warningsArray<Warning>Contains warning information although the request was successful

ConstraintViolation​

Contains information about a constraint violation caused by invalid input.

NameTypeDescription
errorCode"DependencyVersionIncompatible" | "DependencyUnknown"

An optional error code that contains more detailed error information.

Possible error codes:

  • DependencyVersionIncompatible: The app's manifest contains a dependency with an incompatible version.
  • DependencyUnknown: The app's manifest contains a dependency that is unknown.
errorCodePropertiesConstraintViolationErrorCodePropertiesAdditional properties related to the provided error code.
message*requiredstringThe error message
path*requiredstringThe path of the property that caused the constraint violation

ConstraintViolationErrorCodeProperties​

Additional properties related to the provided error code.

NameTypeDescription
availableVersionstringThe version that is available. This value is present if the error code is DependencyVersionIncompatible.

Example: 1.2.0
dependencystringThe name of the dependency. This value is present if the error code is DependencyUnknown or DependencyVersionIncompatible.

Example: /platform/storage/query/v1
incompatibleVersionstringThe version that is incompatible. This value is present if the error code is DependencyVersionIncompatible.

Example: 1.1.0

Error​

Contains information for 4xx and 5xx errors.

NameTypeDescription
code*requirednumberThe HTTP status code
detailsErrorDetailsContains details for 4xx and 5xx errors.
helpstringAdditional information related to the error
message*requiredstringThe error message
retryAfterSecondsnumberSeconds to wait until the next retry

ErrorDetails​

Contains details for 4xx and 5xx errors.

NameTypeDescription
constraintViolationsArray<ConstraintViolation>A list of constraint violations
errorCode"MaxNumberOfInstalledAppsExceeded"

An optional error code that contains more detailed error information than the HTTP response code alone.

Possible error codes:

errorCodePropertiesErrorDetailsErrorCodePropertiesAdditional properties related to the provided error code
errorRefstringGenerated unique value for 5xx errors.
missingPermissionsArray<string>The IAM permissions the authorization token would need to be granted for this request.
missingScopesArray<string>The OAuth scopes the authorization token would need to carry for this request.
traceIdstringOpenTelemetry trace id of the trace where error occurs.

ErrorDetailsErrorCodeProperties​

Additional properties related to the provided error code

NameTypeDescription
appLimitstringLimit for number of installed apps in an environment. This value is present if the error code is `MaxNumberOfInstalledAppsExceeded'.

Example: 3

ErrorEnvelope​

Error response for all 4xx and 5xx errors.

NameTypeDescription
error*requiredErrorContains information for 4xx and 5xx errors.

ModificationInfo​

Modification information about the app

NameTypeDescription
createdAt*requiredstringTimestamp when the resource was created in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
createdBy*requiredstringUserId of the user that created the resource
lastModifiedAt*requiredstringTimestamp when the resource was last modified in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')
lastModifiedBy*requiredstringUserId of the user that last modified the resource

ResourceContext​

Additional resource context information

NameTypeDescription
operations*requiredArray<"run" | "update" | "uninstall">

Operations that are allowed on the app depending on the user's permissions.

  • run: user is allowed to run the app.

  • update: user is allowed to update the app.

  • uninstall: user is allowed to uninstall the app.

ResourceStatus​

The status of the app plus additional details.

NameTypeDescription
operationStateBeforeError"OK" | "PENDING_INSTALL" | "PENDING_UPDATE" | "PENDING_DELETE"

Details about the state when an error occurred. Only present if the app's status is ERROR.

  • PENDING_INSTALL: The error occurred while installing the app.

  • PENDING_UPDATE: The error occurred while updating the app.

  • PENDING_DELETE: The error occurred while deleting the app.

  • OK: At least one sub resource failed while the app was already running.

pendingOperation"INSTALL" | "UPDATE" | "DELETE"

The pending operation of the app. Only present if the app's status is PENDING.

  • INSTALL: The app is currently being installed.

  • UPDATE: The app is currently being updated.

  • DELETE: The app is currently being deleted.

status*required"OK" | "PENDING" | "PENDING_DELETION" | "DEACTIVATED" | "ERROR"

The status of the app.

  • OK: The app is fully installed and running.

  • PENDING: The app is currently being installed, updated or deleted.

  • PENDING_DELETION: A new version of the app was successfully installed and this version is scheduled for deletion.

  • DEACTIVATED: The app is deactivated and cannot be executed.

  • ERROR: The app failed with an error.

subResourceStatusesArray<SubResourceStatus>The statuses of the app's sub resources.
subResourceTypesArray<"FUNCTIONS" | "FILES" | "SETTINGS_SCHEMAS" | "DOCUMENTS">The sub resource types that the app contains.

SearchAppAction​

NameTypeDescription
actions*requiredArray<SearchAppActionActionsItem>List of app actions. Actions are sorted by name in ascending order. Actions without name are last.
id*requiredstringApp id

Example: my.example.appid
name*requiredstringApp name

Example: Example app

SearchAppActionList​

NameTypeDescription
apps*requiredArray<SearchAppAction>List of apps with actions. Apps are sorted by name in ascending order.
totalCount*requirednumberTotal actions count.

Example: 1

SubResourceConstraintViolation​

Contains information about a constraint violation caused by invalid input.

NameTypeDescription
message*requiredstringThe error message
pathstringThe path of the property that caused the constraint violation

SubResourceError​

Additional error information that can be present if the sub resource status is FAILED

NameTypeDescription
constraintViolationsArray<SubResourceConstraintViolation>A list of constraint violations
errorCodestringAn error code that can be used determine the nature of an error and why it occurred.
errorRefstringOptional generated unique value to reference this error.
message*requiredstringThe error message.

SubResourceStatus​

The status of the sub resource.

NameTypeDescription
errorSubResourceErrorAdditional error information that can be present if the sub resource status is FAILED
status*required"SCHEDULED" | "DEPLOYING" | "DEPLOYED" | "FAILED" | "NO_RESOURCES"

The deployment status of the app's sub resource:

  • SCHEDULED: Only the uploaded app bundle is persisted.

  • DEPLOYING: The app's sub resources are currently being deployed.

  • DEPLOYED: The app's sub resources were successfully deployed.

  • FAILED: The deployment of the app's sub resources failed.

  • NO_RESOURCES: The app bundle does not contain any sub resources of this type

subResourceType*required"FUNCTIONS" | "FILES" | "SETTINGS_SCHEMAS" | "DOCUMENTS"

The sub resource type.

  • FUNCTIONS: app functions.

  • FILES: static files of an app.

  • SETTINGS_SCHEMAS: settings schemas of an app.

  • DOCUMENTS: documents, e.g. templates, that are part of an app bundle.

Warning​

A warning.

NameTypeDescription
messagestringThe warning message.

Enums​

ConstraintViolationErrorCode​

⚠️ Deprecated Use literal values.

An optional error code that contains more detailed error information.

Possible error codes:

  • DependencyVersionIncompatible: The app's manifest contains a dependency with an incompatible version.
  • DependencyUnknown: The app's manifest contains a dependency that is unknown.

Enum keys​

DependencyUnknown | DependencyVersionIncompatible

DeactivationReason​

⚠️ Deprecated Use literal values.

Possible reasons why app has deactivated status

Enum keys​

AppCertificateRevoked | CapabilityAppEngineFunctionsSmallDisabled

DeploymentStatus​

⚠️ Deprecated Use literal values.

The deployment status of the app's sub resource:

  • SCHEDULED: Only the uploaded app bundle is persisted.

  • DEPLOYING: The app's sub resources are currently being deployed.

  • DEPLOYED: The app's sub resources were successfully deployed.

  • FAILED: The deployment of the app's sub resources failed.

  • NO_RESOURCES: The app bundle does not contain any sub resources of this type

Enum keys​

Deployed | Deploying | Failed | NoResources | Scheduled

ErrorDetailsErrorCode​

⚠️ Deprecated Use literal values.

An optional error code that contains more detailed error information than the HTTP response code alone.

Possible error codes:

Enum keys​

MaxNumberOfInstalledAppsExceeded

OperationStateBeforeError​

⚠️ Deprecated Use literal values.

Details about the state when an error occurred. Only present if the app's status is ERROR.

  • PENDING_INSTALL: The error occurred while installing the app.

  • PENDING_UPDATE: The error occurred while updating the app.

  • PENDING_DELETE: The error occurred while deleting the app.

  • OK: At least one sub resource failed while the app was already running.

Enum keys​

Ok | PendingDelete | PendingInstall | PendingUpdate

PendingOperation​

⚠️ Deprecated Use literal values.

The pending operation of the app. Only present if the app's status is PENDING.

  • INSTALL: The app is currently being installed.

  • UPDATE: The app is currently being updated.

  • DELETE: The app is currently being deleted.

Enum keys​

Delete | Install | Update

ResourceContextOperationsItem​

⚠️ Deprecated Use literal values.

Enum keys​

Run | Uninstall | Update

Status​

⚠️ Deprecated Use literal values.

The status of the app.

  • OK: The app is fully installed and running.

  • PENDING: The app is currently being installed, updated or deleted.

  • PENDING_DELETION: A new version of the app was successfully installed and this version is scheduled for deletion.

  • DEACTIVATED: The app is deactivated and cannot be executed.

  • ERROR: The app failed with an error.

Enum keys​

Deactivated | Error | Ok | Pending | PendingDeletion

SubResourceType​

⚠️ Deprecated Use literal values.

The sub resource type.

  • FUNCTIONS: app functions.

  • FILES: static files of an app.

  • SETTINGS_SCHEMAS: settings schemas of an app.

  • DOCUMENTS: documents, e.g. templates, that are part of an app bundle.

Enum keys​

Documents | Files | Functions | SettingsSchemas

Still have questions?
Find answers in the Dynatrace Community