Retrieve a workflow task in Dynatrace with the AutomationEngine API, using workflow and task IDs and optional admin access to all workflows.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/workflows/{workflowId}/tasks/{id} |
You use workflowId and id to identify the task you want to retrieve. If you set adminAccess, you can access all workflows and executions and it additionally requires automation:work. The operation returns the workflow task.
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 | - | path | Required |
| workflowId | string | - | path | Required |
| Code | Type | Description |
|---|---|---|
| 200 | Task | - |
| 4XX | Error | - |
Task 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. |
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 | - |
{"name": "string","action": "my.app:action_1","description": "string","input": {},"active": true,"position": {"x": 1,"y": 1},"customSampleResult": {},"predecessors": ["string"],"conditions": {"states": {},"custom": "string","else": "SKIP"},"withItems": "string","concurrency": "string","retry": {"count": "string","delay": "string","failedLoopIterationsOnly": true},"timeout": 3600,"waitBefore": 0}
{"error": {"message": "string","code": 1,"details": {"errorCode": "string","errorRef": "string"}}}