Run a workflow in Dynatrace with the AutomationEngine API by workflow ID and create an execution with the supplied input and parameters.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/workflows/{id}/run |
You create an execution for the workflow identified by the id path parameter. The request can include input, params, and uniqueQualifier in the body, plus monitor in the query, and it returns a 201 response.
To execute this request, you need a platform token or OAuth access token with automation:workflows:run 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 |
| monitor | boolean | Specifies whether the execution data of the SIMPLE workflow type is available for monitoring until the execution is complete. | query | Optional |
| body | Execution | Inputs for workflow executions | body | Required |
ExecutionInputsRequest objectInputs for workflow executions
| Element | Type | Description | Required |
|---|---|---|---|
| input | object | Inputs (key/value pairs) | Optional |
| params | object | Metadata (can be nested object) | Optional |
| uniqueQualifier | string | A qualifier that must not have been used before to trigger the execution | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"input": {},"params": {}}
| Code | Type | Description |
|---|---|---|
| 201 | Execution | Execution successfully created |
| 202 | Execution | No execution created - execution with uniqueQualifier provided already exists |
| 4XX | Error | - |
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 objectErrorEnvelope 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","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}
{"error": {"message": "string","code": 1,"details": {"errorCode": "string","errorRef": "string"}}}