Create a workflow in Dynatrace with the AutomationEngine API and set its tasks, trigger, ownership, and deployment state.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/workflows |
You send workflow fields such as title, tasks, trigger, actor, owner, type, input, and hourlyExecutionLimit in the request body to create a workflow in Dynatrace. The adminAccess query parameter can expand access, and the operation returns 201 with the created workflow.
To execute this request, you need a platform token or OAuth access token with automation:workflows:write 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 |
| body | Workflow | Workflow can define multiple tasks and have at most one automatic trigger. In undeployed state, a workflow is not billed and its automatic trigger won't be running. | body | Required |
WorkflowCreate objectWorkflow can define multiple tasks and have at most one automatic trigger. In undeployed state, a workflow is not billed and its automatic trigger won't be running.
| Element | Type | Description | Required |
|---|---|---|---|
| id | string | - | Optional |
| title | string | - | Required |
| isDeployed | boolean | - | Optional |
| tasks | Tasks | - | Optional |
| description | string | - | Optional |
| actor | string | - | Optional |
| owner | string | - | Optional |
| ownerType | Owner | -The element can hold these values
| Optional |
| isPrivate | boolean | - | Optional |
| schemaVersion | integer | - | Optional |
| trigger | Trigger | - | Optional |
| result | string | - | Optional |
| type | Workflow | Workflow type. | Optional |
| input | object | - | Optional |
| hourlyExecutionLimit | integer | - | Optional |
| guide | string | - | Optional |
| basedOnTemplate | Based | - | Optional |
| throttle | Throttle | - | Optional |
| unacknowledgedSkippedScheduleAt | string | - | Optional |
Tasks objectTask object| Element | Type | Description | Required |
|---|---|---|---|
| name | string | - | Optional |
| action | string | - | Required |
| description | string | - | Optional |
| input | object | - | Optional |
| active | - | Specifies whether a task should be skipped as a no operation or not. | Optional |
| position | Task | - | Optional |
| customSampleResult | - | - | Optional |
| predecessors | string[] | - | Optional |
| conditions | Task | - | Optional |
| withItems | string | - | Optional |
| concurrency | - | - | Optional |
| retry | Task | - | Optional |
| timeout | - | Specifies a default task timeout. 60 * 60 (60min) is used when not set. | Optional |
| waitBefore | - | Specifies a default task wait before in seconds. 0 is used when not set. | Optional |
TaskPosition object| Element | Type | Description | Required |
|---|---|---|---|
| x | integer | Grid (not pixel) coordinate in workflow graph. x=0 is horizontal center. | Required |
| y | integer | Grid (not pixel) coordinate in workflow graph. Expands downwards. Must be >= 1. | Required |
TaskConditionOption object| Element | Type | Description | Required |
|---|---|---|---|
| states | object | - | Optional |
| custom | string | - | Optional |
| else | Else | - | Optional |
Else objectTaskRetryOption object| Element | Type | Description | Required |
|---|---|---|---|
| count | - | Specifies a maximum number of times that a task can be repeated in case it fails on execution. | Required |
| delay | - | Specifies a delay in seconds between subsequent task retries | Optional |
| failedLoopIterationsOnly | boolean | Specifies whether retrying the failed iterations or the whole loop. Default: True. | Optional |
OwnerType objectTriggerRequest object| Element | Type | Description | Required |
|---|---|---|---|
| schedule | Schedule | - | Optional |
| eventTrigger | Event | - | Optional |
ScheduleRequest object| Element | Type | Description | Required |
|---|---|---|---|
| trigger | Cron | - | Required |
| rule | string | - | Optional |
| filterParameters | Schedule | - | Optional |
| timezone | Timezone | -The element can hold these values
| Optional |
| isActive | boolean | - | Optional |
ScheduleTrigger objectCronTrigger object| Element | Type | Description | Required |
|---|---|---|---|
| type | Cron | -The element can hold these values
| Required |
| cron | string | - | Required |
TimeTrigger object| Element | Type | Description | Required |
|---|---|---|---|
| type | Time | -The element can hold these values
| Required |
| time | string | - | Required |
IntervalTrigger object| Element | Type | Description | Required |
|---|---|---|---|
| type | Interval | -The element can hold these values
| Required |
| intervalMinutes | integer | - | Required |
| betweenStart | string | - | Optional |
| betweenEnd | string | - | Optional |
OnceTrigger object| Element | Type | Description | Required |
|---|---|---|---|
| type | Once | -The element can hold these values
| Required |
| at | string | Datetime in ISO 8601 format without timezone information. | Required |
CronTriggerType objectTimeTriggerType objectIntervalTriggerType objectOnceTriggerType objectScheduleFilterParameters object| Element | Type | Description | Required |
|---|---|---|---|
| count | integer | - | Optional |
| earliestStart | string | - | Optional |
| earliestStartTime | string | - | Optional |
| until | string | - | Optional |
| includeDates | string[] | - | Optional |
| excludeDates | string[] | - | Optional |
Timezone objectEventTriggerRequest object| Element | Type | Description | Required |
|---|---|---|---|
| isActive | boolean | - | Optional |
| triggerConfiguration | Event | - | Optional |
EventTriggerConfig objectEventQueryTriggerConfig objectConfig for generic event triggers ("Event trigger"). No dedup — fires on every matching event.
| Element | Type | Description | Required |
|---|---|---|---|
| type | Event | -The element can hold these values
| Required |
| value | Event | - | Required |
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 | Required |
|---|---|---|---|
| type | Davis | -The element can hold these values
| Required |
| value | Davis | - | Required |
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 | Required |
|---|---|---|---|
| type | Davis | -The element can hold these values
| Required |
| value | Davis | - | Required |
EventQueryTriggerConfigType objectEventQuery object| Element | Type | Description | Required |
|---|---|---|---|
| query | string | DQL matcher expression defining which events to match. | Required |
| eventType | Event | Grail event type. The element can hold these values
| Optional |
EventType objectGrail event type.
DavisProblemTriggerConfigType objectDavisProblemConfig object| Element | Type | Description | Required |
|---|---|---|---|
| entityTagsMatch | Entity | - | Optional |
| entityTags | Entity | - | Optional |
| boolean | DEPRECATED Trigger on Davis problem open only or also on close. Deprecated — use triggerOn instead. | Optional | |
| 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. | Optional |
| categories | Davis | - | Required |
| customFilter | string | Additional DQL matcher expression to further filter events to match. | Optional |
| analysisReady | boolean | Run only after first root cause analysis run completed. | Optional |
| 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. | Optional |
| triggerOnUpdateFields | Trigger | Problem event fields tracked for value changes. Changes to any selected field cause re-triggering. | Optional |
| problemOpenDuration | integer | Minimum problem duration in minutes before the trigger fires. The element can hold these values
| Optional |
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 | Required |
|---|---|---|---|
| monitoringUnavailable | boolean | - | Optional |
| availability | boolean | - | Optional |
| error | boolean | - | Optional |
| slowdown | boolean | - | Optional |
| resource | boolean | - | Optional |
| custom | boolean | - | Optional |
| info | boolean | - | Optional |
TriggerOnUpdateFields objectDavisEventTriggerConfigType objectDavisEventConfig object| Element | Type | Description | Required |
|---|---|---|---|
| entityTagsMatch | Entity | - | Optional |
| entityTags | Entity | - | Optional |
| boolean | DEPRECATED Trigger on Davis event open only or also on close. Deprecated — use triggerOn instead. | Optional | |
| 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. | Optional |
| names | Davis | - | Optional |
| string[] | DEPRECATED - | Optional | |
| customFilter | string | Additional DQL matcher expression to further filter events to match. | Optional |
| maintenanceWindowTriggerBehavior | Maintenance | - | Optional |
DavisEventName object| Element | Type | Description | Required |
|---|---|---|---|
| match | Davis | Davis event name must equal or contain the string provided. The element can hold these values
| Required |
| name | string | - | Required |
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.
BasedOnTemplate object| Element | Type | Description | Required |
|---|---|---|---|
| trackingId | string | - | Required |
| originAppId | string | - | Optional |
| version | string | - | Optional |
| title | string | - | Optional |
ThrottleRequest object| Element | Type | Description | Required |
|---|---|---|---|
| isLimitHit | boolean | - | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"id": "string","title": "string","isDeployed": true,"tasks": {},"description": "string","actor": "string","owner": "string","ownerType": "USER","isPrivate": true,"schemaVersion": 1,"trigger": {"schedule": {"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","isActive": true},"eventTrigger": {"isActive": true,"triggerConfiguration": {"type": "event","value": {"eventType": "bizevents","query": "event.kind == \"CUSTOM_KIND\""}}}},"result": "string","type": "STANDARD","input": {},"hourlyExecutionLimit": 1000,"guide": "string","basedOnTemplate": {"trackingId": "string","originAppId": "string","version": "string","title": "string"},"throttle": {"isLimitHit": true},"unacknowledgedSkippedScheduleAt": "string"}
| Code | Type | Description |
|---|---|---|
| 201 | Workflow | - |
| 4XX | Error | - |
Workflow objectWorkflow can define multiple tasks and have at most one automatic trigger. In undeployed state, a workflow is not billed and its automatic trigger won't be running.
| Element | Type | Description |
|---|---|---|
| id | string | - |
| title | string | - |
| isDeployed | boolean | - |
| tasks | Tasks | - |
| lastExecution | Execution | - |
| description | string | - |
| actor | string | - |
| owner | string | - |
| ownerType | Owner | -The element can hold these values
|
| isPrivate | boolean | - |
| triggerType | string | - |
| schemaVersion | integer | - |
| trigger | Trigger | - |
| modificationInfo | Modification | - |
| result | string | - |
| type | Workflow | Workflow type. |
| input | object | - |
| hourlyExecutionLimit | integer | - |
| guide | string | - |
| throttle | Throttle | - |
| workflowLimit | Workflow | - |
| version | integer | - |
| unacknowledgedSkippedScheduleAt | 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. |
Execution object| Element | Type | Description |
|---|---|---|
| id | string | - |
| workflow | string | Executed Workflow |
| state | Execution | -The element can hold these values
|
| stateInfo | string | - |
| input | object | - |
| providedInput | object | - |
| params | object | - |
| startedAt | string | - |
| endedAt | string | - |
| runtime | integer | Calculate the runtime of an execution in seconds. If the execution is not ended, runtime is calculated until now. |
| trigger | string | - |
| schedule | string | - |
| eventTrigger | string | - |
| user | string | - |
| actor | string | - |
| title | string | - |
| result | - | - |
| triggerType | Trigger | - |
| workflowVersion | integer | - |
| workflowType | Workflow | - |
| triggerTypeDetail | Trigger | - |
| parentExecution | string | - |
| parentTaskName | string | Parent task execution's name (subworkflows only) |
| rootExecution | string | - |
| rootWorkflow | string | - |
| isDraft | boolean | - |
ExecutionState objectTriggerType objectWorkflowType objectRepresents a Workflow type.
TriggerTypeDetail objectTriggerSubTypeDetail object| Element | Type | Description |
|---|---|---|
| subType | Trigger | - |
TriggerWorkflowDetail object| Element | Type | Description |
|---|---|---|
| workflowTitle | string | - |
| isTaskTest | boolean | - |
TriggerManualDetail object| Element | Type | Description |
|---|---|---|
| userId | string | - |
TriggerSubType objectOwnerType objectTrigger object| Element | Type | Description |
|---|---|---|
| schedule | Schedule | - |
| eventTrigger | Event | - |
Schedule object| Element | Type | Description |
|---|---|---|
| isActive | boolean | - |
| isFaulty | boolean | - |
| trigger | Cron | - |
| rule | string | - |
| filterParameters | Schedule | - |
| timezone | Timezone | -The element can hold these values
|
| inputs | Schedule | - |
| nextExecution | string | - |
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 objectEventTrigger object| Element | Type | Description |
|---|---|---|
| isActive | boolean | - |
| filterQuery | string | - |
| string | DEPRECATED - | |
| 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.
ModificationInfo object| Element | Type | Description |
|---|---|---|
| createdBy | string | - |
| createdTime | string | - |
| lastModifiedBy | string | - |
| lastModifiedTime | string | - |
Throttle object| Element | Type | Description |
|---|---|---|
| limitEvents | Throttle | - |
| isLimitHit | boolean | - |
ThrottleLimitEvents objectThrottleLimitEvent object| Element | Type | Description |
|---|---|---|
| timestamp | string | - |
| limit | integer | - |
| timeLeftInSeconds | integer | - |
| type | Throttle | -The element can hold these values
|
ThrottleLimitEventType objectWorkflowLimit object| Element | Type | Description |
|---|---|---|
| isActive | boolean | - |
| throttle | Throttle | - |
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 | - |
{"id": "string","title": "string","isDeployed": true,"tasks": {},"lastExecution": {"id": "string","workflow": "string","state": "CANCELLED","stateInfo": "string","input": {},"providedInput": {},"params": {},"startedAt": "string","endedAt": "string","runtime": 1,"trigger": "string","schedule": "string","eventTrigger": "string","user": "string","actor": "string","title": "string","result": {},"triggerType": "Manual","workflowVersion": 1,"workflowType": "STANDARD","triggerTypeDetail": {"subType": "CUSTOM"},"parentExecution": "string","parentTaskName": "string","rootExecution": "string","rootWorkflow": "string","isDraft": true},"description": "string","actor": "string","owner": "string","ownerType": "USER","isPrivate": true,"triggerType": "string","schemaVersion": 1,"trigger": {"schedule": {"isActive": true,"isFaulty": 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": {},"nextExecution": "string"},"eventTrigger": {"isActive": true,"filterQuery": "string","uniqueExpression": "string","triggerConfiguration": {"type": "event","value": {"eventType": "bizevents","query": "event.kind == \"CUSTOM_KIND\""}}}},"modificationInfo": {"createdBy": "string","createdTime": "string","lastModifiedBy": "string","lastModifiedTime": "string"},"result": "string","type": "STANDARD","input": {},"hourlyExecutionLimit": 1000,"guide": "string","throttle": {"limitEvents": [{"timestamp": "string","limit": 1,"timeLeftInSeconds": 1,"type": "workflow"}],"isLimitHit": true},"workflowLimit": {"isActive": true,"throttle": {}},"version": 1,"unacknowledgedSkippedScheduleAt": "string"}
{"error": {"message": "string","code": 1,"details": {"errorCode": "string","errorRef": "string"}}}