Skip to main content

Addons

  • Reference

Control the lifecycle of Dynatrace apps opened in addon mode.

Latest (V1)
npm install @dynatrace-sdk/addons

Functions

getMode

getMode(): "overlay" | undefined

Retrieves the current mode of the app when opened in the addon context. Returns undefined when app is not opened as an addon.

Returns

Return typeDescription
"overlay" | undefinedSpecified mode of an addon.

rejectAddon

rejectAddon(reason?): void

Closes the addon app and rejects the request awaited by the source app.

Parameters

NameType
reasonunknown

resolveAddon

resolveAddon(): void

Closes the addon app and returns control to the source app that has sent the intent.

resolveAddonWithNavigation

resolveAddonWithNavigation(appRoute): void

Interrupts a response request, closes the addon app and navigates from the source app to the addon app as the main app at the given route.

Parameters

NameType
appRoute*requiredstring

resolveAddonWithResponse

resolveAddonWithResponse(responseProperties): void

Closes the addon app and resolves the request awaited by the source app by passing response properties as a result.

Parameters

NameTypeDescription
responseProperties*requiredResponsePropertiesset of data to be sent as a response to origin app. Must comply with format specified in the app manifest.
Still have questions?
Find answers in the Dynatrace Community