Export a workflow template in Dynatrace with the AutomationEngine API by workflow ID to retrieve a reusable template representation.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/workflows/{id}/template |
You export the template for the workflow identified by the id path parameter. The request also accepts adminAccess, and it returns the template in a 200 response.
To execute this request, you need a platform token or OAuth access token with automation:workflows:read scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin | query | Optional |
| id | string | A UUID string identifying this workflow. | path | Required |
| Code | Type | Description |
|---|---|---|
| 200 | Workflow | - |
| 4XX | Error | - |
WorkflowTemplate object| Element | Type | Description |
|---|---|---|
| metadata | Workflow | - |
| workflow | Workflow | - |
WorkflowTemplateMetadata object| Element | Type | Description |
|---|---|---|
| version | string | - |
| dependencies | Workflow | - |
| inputs | Workflow | - |
WorkflowTemplateDependencies object| Element | Type | Description |
|---|---|---|
| apps | Workflow | - |
WorkflowTemplateApp object| Element | Type | Description |
|---|---|---|
| id | string | - |
| version | string | - |
WorkflowTemplateInput object| Element | Type | Description |
|---|---|---|
| type | string | - |
| schema | string | - |
| connectionFilter | string | Optional filter expression to limit the connections shown in this template input of type 'connection' |
| targets | string[] | - |
WorkflowDefinitionTemplate object| Element | Type | Description |
|---|---|---|
| title | string | - |
| tasks | Tasks | - |
| description | string | - |
| schemaVersion | integer | - |
| trigger | Trigger | - |
| result | string | - |
| type | Workflow | Workflow type. |
| input | object | - |
| hourlyExecutionLimit | integer | - |
| guide | string | - |
Tasks objectTask object| Element | Type | Description |
|---|---|---|
| name | string | - |
| action | string | - |
| description | string | - |
| input | object | - |
| active | - | Specifies whether a task should be skipped as a no operation or not. |
| position | Task | - |
| customSampleResult | - | - |
| predecessors | string[] | - |
| conditions | Task | - |
| withItems | string | - |
| concurrency | - | - |
| retry | Task | - |
| timeout | - | Specifies a default task timeout. 60 * 60 (60min) is used when not set. |
| waitBefore | - | Specifies a default task wait before in seconds. 0 is used when not set. |
TaskPosition object| Element | Type | Description |
|---|---|---|
| x | integer | Grid (not pixel) coordinate in workflow graph. x=0 is horizontal center. |
| y | integer | Grid (not pixel) coordinate in workflow graph. Expands downwards. Must be >= 1. |
TaskConditionOption object| Element | Type | Description |
|---|---|---|
| states | object | - |
| custom | string | - |
| else | Else | - |
Else objectTaskRetryOption object| Element | Type | Description |
|---|---|---|
| count | - | Specifies a maximum number of times that a task can be repeated in case it fails on execution. |
| delay | - | Specifies a delay in seconds between subsequent task retries |
| failedLoopIterationsOnly | boolean | Specifies whether retrying the failed iterations or the whole loop. Default: True. |
TriggerExport object| Element | Type | Description |
|---|---|---|
| schedule | Schedule | - |
| eventTrigger | Event | - |
ScheduleExport object| Element | Type | Description |
|---|---|---|
| isActive | boolean | - |
| trigger | Cron | - |
| rule | string | - |
| filterParameters | Schedule | - |
| timezone | Timezone | -The element can hold these values
|
| inputs | Schedule | - |
ScheduleTrigger objectCronTrigger object| Element | Type | Description |
|---|---|---|
| type | Cron | -The element can hold these values
|
| cron | string | - |
TimeTrigger object| Element | Type | Description |
|---|---|---|
| type | Time | -The element can hold these values
|
| time | string | - |
IntervalTrigger object| Element | Type | Description |
|---|---|---|
| type | Interval | -The element can hold these values
|
| intervalMinutes | integer | - |
| betweenStart | string | - |
| betweenEnd | string | - |
OnceTrigger object| Element | Type | Description |
|---|---|---|
| type | Once | -The element can hold these values
|
| at | string | Datetime in ISO 8601 format without timezone information. |
CronTriggerType objectTimeTriggerType objectIntervalTriggerType objectOnceTriggerType objectScheduleFilterParameters object| Element | Type | Description |
|---|---|---|
| count | integer | - |
| earliestStart | string | - |
| earliestStartTime | string | - |
| until | string | - |
| includeDates | string[] | - |
| excludeDates | string[] | - |
Timezone objectScheduleInputs objectScheduleInput object| Element | Type | Description |
|---|---|---|
| type | Schedule | -The element can hold these values
|
| value | - | - |
ScheduleInputType objectEventTriggerExport object| Element | Type | Description |
|---|---|---|
| isActive | boolean | - |
| triggerConfiguration | Event | - |
EventTriggerConfig objectEventQueryTriggerConfig objectConfig for generic event triggers ("Event trigger"). No dedup — fires on every matching event.
| Element | Type | Description |
|---|---|---|
| type | Event | -The element can hold these values
|
| value | Event | - |
DavisProblemTriggerConfig objectConfig for Problem event triggers ("Problem trigger").
Deduplicated across a problem's lifecycle: fires once per phase selected by the trigger config (triggerOn, triggerOnUpdateFields), not on every update.
| Element | Type | Description |
|---|---|---|
| type | Davis | -The element can hold these values
|
| value | Davis | - |
DavisEventTriggerConfig objectConfig for Davis Event event triggers ("Davis event trigger").
Deduplicated across an event's lifecycle: fires once per phase selected by the trigger config (triggerOn), not on every update.
| Element | Type | Description |
|---|---|---|
| type | Davis | -The element can hold these values
|
| value | Davis | - |
EventQueryTriggerConfigType objectEventQuery object| Element | Type | Description |
|---|---|---|
| query | string | DQL matcher expression defining which events to match. |
| eventType | Event | Grail event type. The element can hold these values
|
EventType objectGrail event type.
DavisProblemTriggerConfigType objectDavisProblemConfig object| Element | Type | Description |
|---|---|---|
| entityTagsMatch | Entity | - |
| entityTags | Entity | - |
| boolean | DEPRECATED Trigger on Davis problem open only or also on close. Deprecated — use triggerOn instead. | |
| triggerOn | Trigger | Problem state to trigger on. "open" (active only), "open-and-close" (both phases), or "close" (closure only). When unset, falls back to onProblemClose for backward compatibility. |
| categories | Davis | - |
| customFilter | string | Additional DQL matcher expression to further filter events to match. |
| analysisReady | boolean | Run only after first root cause analysis run completed. |
| severityThreshold | integer | Triggers only for problems whose severity is this value or more severe. Lower numbers are more severe (1 = critical, 5 = informational), so 3 matches severities 1, 2, and 3. |
| triggerOnUpdateFields | Trigger | Problem event fields tracked for value changes. Changes to any selected field cause re-triggering. |
| problemOpenDuration | integer | Minimum problem duration in minutes before the trigger fires. The element can hold these values
|
EntityTagsMatch objectEvent must match all or any of the entity tags.
EntityTags objectEntity tags to match by key and (optional) values. For example {"foo": [], "bar": ["a", "b", "c"]}
TriggerOn objectDavisProblemCategories object| Element | Type | Description |
|---|---|---|
| monitoringUnavailable | boolean | - |
| availability | boolean | - |
| error | boolean | - |
| slowdown | boolean | - |
| resource | boolean | - |
| custom | boolean | - |
| info | boolean | - |
TriggerOnUpdateFields objectDavisEventTriggerConfigType objectDavisEventConfig object| Element | Type | Description |
|---|---|---|
| entityTagsMatch | Entity | - |
| entityTags | Entity | - |
| boolean | DEPRECATED Trigger on Davis event open only or also on close. Deprecated — use triggerOn instead. | |
| triggerOn | Trigger | Event state to trigger on. "open" (active only), "open-and-close" (both phases), or "close" (closure only). When unset, falls back to onProblemClose for backward compatibility. |
| names | Davis | - |
| string[] | DEPRECATED - | |
| customFilter | string | Additional DQL matcher expression to further filter events to match. |
| maintenanceWindowTriggerBehavior | Maintenance | - |
DavisEventName object| Element | Type | Description |
|---|---|---|
| match | Davis | Davis event name must equal or contain the string provided. The element can hold these values
|
| name | string | - |
DavisEventNameMatch objectDavis event name must equal or contain the string provided.
MaintenanceWindowTriggerBehaviorType objectSpecifies when to trigger based on maintenance window status.
WorkflowType objectRepresents a Workflow type.
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| message | string | - |
| code | integer | - |
| details | Error | - |
ErrorDetails object| Element | Type | Description |
|---|---|---|
| errorCode | string | - |
| errorRef | string | - |
{"metadata": {"version": "string","dependencies": {"apps": [{"id": "string","version": "string"}]},"inputs": [{"type": "string","schema": "string","connectionFilter": "string","targets": ["string"]}]},"workflow": {"title": "string","tasks": {},"description": "string","schemaVersion": 1,"trigger": {"schedule": {"isActive": true,"trigger": {"type": "cron","cron": "0 0 * * *"},"rule": "string","filterParameters": {"count": 10,"earliestStart": "string","earliestStartTime": "00:00","until": "string","includeDates": ["string"],"excludeDates": ["string"]},"timezone": "Africa/Abidjan","inputs": {}},"eventTrigger": {"isActive": true,"triggerConfiguration": {"type": "event","value": {"eventType": "bizevents","query": "event.kind == \"CUSTOM_KIND\""}}}},"result": "string","type": "STANDARD","input": {},"hourlyExecutionLimit": 1000,"guide": "string"}}
{"error": {"message": "string","code": 1,"details": {"errorCode": "string","errorRef": "string"}}}