Get a task execution in Dynatrace with the AutomationEngine API by execution ID and task name, with optional admin access.
| GET | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/executions/{executionId}/tasks/{id} |
You use executionId and id to retrieve one task execution by workflow execution and task name. If you set adminAccess, you can access all workflows and executions and also need automation:work. The response returns the task execution details.
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 |
| executionId | string | - | path | Required |
| id | string | Task name | path | Required |
| Code | Type | Description |
|---|---|---|
| 200 | Task | - |
| 4XX | Error | - |
TaskExecution object| Element | Type | Description |
|---|---|---|
| id | string | - |
| execution | string | Parent execution |
| name | string | - |
| state | Task | -The element can hold these values
|
| errorReason | string | - |
| stateInfo | string | - |
| input | object | - |
| startedAt | string | - |
| endedAt | string | - |
| runtime | integer | Calculate the runtime of a task execution in seconds. If the task execution is not ended, runtime is calculated until now. |
| position | Task | - |
| conditions | object | - |
| predecessors | string[] | - |
| active | boolean | Whether task is active |
| result | - | - |
| conditionResults | object | - |
| description | string | - |
| action | string | - |
| isApproval | boolean | Whether this task is an approval request |
| packageVersions | object | - |
TaskExecutionState objectTaskPosition 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. |
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","execution": "string","name": "string","state": "CANCELLED","errorReason": "string","stateInfo": "string","input": {},"startedAt": "string","endedAt": "string","runtime": 1,"position": {"x": 1,"y": 1},"conditions": {},"predecessors": ["string"],"active": true,"result": {},"conditionResults": {},"description": "string","action": "string","isApproval": true,"packageVersions": {}}
{"error": {"message": "string","code": 1,"details": {"errorCode": "string","errorRef": "string"}}}