Try it free

Document types

  • Latest Dynatrace
  • Reference
  • 4-min read
  • Published Jul 13, 2026

This page is the full reference for the Document union type and its four shapes: EntityDetailsDefinitionDocument, EntityDetailsInjectionDocument, InvExDefinitionDocument, and InvExInjectionDocument.

DocumentType

type DocumentType =
| 'EntityDetailsDefinition'
| 'EntityDetailsInjection'
| 'InvExTypeDefinition'
| 'InvExInjection';

The type field is the discriminant used throughout the SDK to identify which shape a document is and how to process it.

Fields shared by every document

All four shapes extend a common base:

PropertyTypeRequiredDescription

version

Version

yes

Document format version. Used for runtime migration in case of breaking changes. Always set to the VERSION constant exported with Dynatrace Extension VS Code Add-on (currently '1.3.0').

type

DocumentType

yes

Discriminant identifying the document shape.

conditionContext

DqlConditionsContext

no

DQL queries whose results become condition variables usable elsewhere in the document. See Conditional rendering.

EntityDetailsDefinitionDocument

Defines the complete layout for a Smartscape entity type in Entity Details.

PropertyTypeDescription

target

EntityDetailsDefinitionTarget

Which app and entity type this document applies to. See Targeting.

content

DetailsComposition

The full details composition: header, health alert groups, and tabbed content.

{
"version": "1.3.0",
"type": "EntityDetailsDefinition",
"target": { "app": "dynatrace.infraops", "nodeType": "dt.entity.host" },
"content": {
"type": "details",
"id": "host-details",
"header": { "title": "Host details" },
"content": {
"type": "tabs",
"items": [
{ "type": "tab", "id": "overview", "title": "Overview", "content": [] }
]
}
}
}

EntityDetailsInjectionDocument

Adds a tab or a card into an existing Entity Details view, without owning the whole layout.

PropertyTypeDescription

target

EntityDetailsInjectionTarget

Which app, entity type, and optionally which tab to inject into. See Targeting.

content

InjectableDetailsLayoutElement

The element to inject — a Tab (to add a new tab) or a card element (to add into an existing tab).

{
"version": "1.3.0",
"type": "EntityDetailsInjection",
"target": { "app": "dynatrace.infraops", "nodeType": "dt.entity.host", "tabId": "overview" },
"content": {
"type": "message",
"id": "extra-info-card",
"cardTitle": "Extra info",
"content": "Injected content."
}
}

InvExDefinitionDocument

Defines a new type or subtype in Inventory Explorer.

PropertyTypeDescription

target

InvExDefinitionTarget

Which app, Inventory Explorer instance, and optional parent type this document applies to. See Targeting.

content

InvExType

The type/subtype definition: display name, icon, content layout, and filtering.

metadata

{ nodeType?: string }

Optional. nodeType declares which Smartscape node type this Inventory Explorer type supports, so the app can resolve in-app navigation to this type when another view links to that node type (for example, selecting a process from a host's "Processes" tab navigates to the Process Inventory Explorer type) instead of firing an intent to another app.

{
"version": "1.3.0",
"type": "InvExTypeDefinition",
"target": { "app": "dynatrace.infraops" },
"content": {
"id": "my-custom-type",
"displayName": "My custom type",
"content": { "type": "vertical-layout", "items": [] }
}
}

InvExInjectionDocument

Adds content into an existing Inventory Explorer type.

PropertyTypeDescription

target

InvExInjectionTarget

Which app and Inventory Explorer type to inject into. See Targeting.

content

LayoutElement

The layout element to inject.

{
"version": "1.3.0",
"type": "InvExInjection",
"target": { "app": "dynatrace.infraops", "invExType": "dt.entity.host" },
"content": {
"type": "message",
"id": "invex-banner",
"content": "Injected into Inventory Explorer."
}
}

Versioning

Every document carries a version field, set to the SDK's VERSION constant. The version only changes for breaking format changes that require a migration path — additive changes (new optional fields, new element types) do not bump it. Always write the current VERSION value when authoring a new document; don't hardcode a version string independently of the SDK you're building against.

See also

  • Targeting
  • Conditional rendering
  • Elements overview
Related tags
ExtensionsExtensionsInfrastructure Observability