Automation
Manage and run workflows with the AutomationEngine API.
npm install @dynatrace-sdk/client-automation
actionExecutionsClient
import { actionExecutionsClient } from '@dynatrace-sdk/client-automation';
getActionExecution
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this action execution. |
Returns
Return type | Status code | Description |
---|---|---|
ActionExecution | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { actionExecutionsClient } from "@dynatrace-sdk/client-automation";
const data =
await actionExecutionsClient.getActionExecution({
id: "...",
});
getActionExecutionLog
Required scope: automation:workflows:read
Returns the log output of a specific ActionExecution.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this action execution. |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { actionExecutionsClient } from "@dynatrace-sdk/client-automation";
const data =
await actionExecutionsClient.getActionExecutionLog({
id: "...",
});
actionsSampleResultClient
import { actionsSampleResultClient } from '@dynatrace-sdk/client-automation';
getActionSampleResult
Required scope: automation:workflows:read
Parameters
Name | Type |
---|---|
config.actionIdentifier*required | string |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { actionsSampleResultClient } from "@dynatrace-sdk/client-automation";
const data =
await actionsSampleResultClient.getActionSampleResult({
actionIdentifier: "...",
});
businessCalendarsClient
import { businessCalendarsClient } from '@dynatrace-sdk/client-automation';
createBusinessCalendar
Required scope: automation:calendars:write
Parameters
Name | Type |
---|---|
config.body*required | BusinessCalendarCreate |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 201 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.createBusinessCalendar({
body: { title: "..." },
});
deleteBusinessCalendar
Required scope: automation:calendars:write
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this business calendar. |
Returns
Return type | Status code | Description |
---|---|---|
void | 204 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.deleteBusinessCalendar({
id: "...",
});
duplicateBusinessCalendar
Required scope: automation:calendars:write
Parameters
Name | Type | Description |
---|---|---|
config.body*required | DuplicationRequest | |
config.id*required | string | A UUID string identifying this business calendar. |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 201 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.duplicateBusinessCalendar({
id: "...",
body: {},
});
getBusinessCalendar
Required scope: automation:calendars:read
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this business calendar. |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendar({
id: "...",
});
getBusinessCalendarHistoryRecord
Required scope: automation:calendars:read
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this business calendar. |
config.version*required | string |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendarHistoryRecord(
{ id: "...", version: "..." },
);
getBusinessCalendarHistoryRecords
Required scope: automation:calendars:read
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this business calendar. |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedChangeHistory | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendarHistoryRecords(
{ id: "..." },
);
getBusinessCalendars
Required scope: automation:calendars:read
Parameters
Name | Type | Description |
---|---|---|
config.limit | number | Number of results to return per page. |
config.offset | number | The initial index from which to return the results. |
config.ordering | string | Which field to use when ordering the results. |
config.search | string | A search term. |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedBusinessCalendarResponseList | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendars();
patchBusinessCalendar
Required scope: automation:calendars:write
Parameters
Name | Type | Description |
---|---|---|
config.body*required | BusinessCalendarUpdate | |
config.id*required | string | A UUID string identifying this business calendar. |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.patchBusinessCalendar({
id: "...",
body: {},
});
restoreBusinessCalendarHistoryRecord
Required scope: automation:calendars:write
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this business calendar. |
config.version*required | string |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.restoreBusinessCalendarHistoryRecord(
{ id: "...", version: "..." },
);
updateBusinessCalendar
Required scope: automation:calendars:write
Parameters
Name | Type | Description |
---|---|---|
config.body*required | BusinessCalendarUpdate | |
config.id*required | string | A UUID string identifying this business calendar. |
Returns
Return type | Status code | Description |
---|---|---|
BusinessCalendarResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.updateBusinessCalendar({
id: "...",
body: {},
});
eventTriggersClient
import { eventTriggersClient } from '@dynatrace-sdk/client-automation';
previewFilter
Required scope: automation:workflows:read
Parameters
Name | Type |
---|---|
config.body*required | EventTriggerPreviewRequest |
Returns
Return type | Status code | Description |
---|---|---|
EventTriggerPreviewResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { eventTriggersClient } from "@dynatrace-sdk/client-automation";
const data = await eventTriggersClient.previewFilter({
body: {
triggerConfiguration: {
type: EventQueryTriggerConfigType.Event,
value: { query: "..." },
},
},
});
executionsClient
import { executionsClient } from '@dynatrace-sdk/client-automation';
cancelExecution
Required scope: automation:workflows:run
Tries to cancel an Execution. Can only be done, if the Execution is in an active state.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
void | 204 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.cancelExecution({
id: "...",
});
cancelTaskExecution
Required scope: automation:workflows:run
Cancels task execution. Canceling action executions cause the task to be cancelled, which causes the workflow to be canceled.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string | |
config.id*required | string | Task name |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.cancelTaskExecution({
executionId: "...",
id: "...",
});
getAllEventLogs
Required scope: automation:workflows:read
Get all event logs
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
EventLogs | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getAllEventLogs({
id: "...",
});
getExecution
Required scope: automation:workflows:read
Get execution
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
Execution | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getExecution({
id: "...",
});
getExecutionActions
Required scope: automation:workflows:read
Return list of actions assigned to tasks in a given Execution.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getExecutionActions({
id: "...",
});
getExecutionLog
Required scope: automation:workflows:read
Gets the execution log
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getExecutionLog({
id: "...",
});
getExecutions
Required scope: automation:workflows:read
Get list of executions
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.limit | number | Number of results to return per page. |
config.offset | number | The initial index from which to return the results. |
config.ordering | string | Which field to use when ordering the results. |
config.parentExecution | string | |
config.parentWorkflow | string | |
config.schedule | Array<string> | Multiple values may be separated by commas. |
config.search | string | A search term. |
config.startedAtGte | string | |
config.startedAtLte | string | |
config.state | Array<string> | Multiple values may be separated by commas. |
config.subworkflowOfTask | string | Filter executions by parentExecution/task . |
config.trigger | string | |
config.triggerType | string | |
config.user | Array<string> | Multiple values may be separated by commas. |
config.workflow | Array<string> | Multiple values may be separated by commas. |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedExecutionList | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getExecutions();
getTaskExecution
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string | |
config.id*required | string | Task name |
Returns
Return type | Status code | Description |
---|---|---|
TaskExecution | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecution({
executionId: "...",
id: "...",
});
getTaskExecutionInput
Required scope: automation:workflows:read
Returns merged inputs from all ActionExecutions belonging to the TaskExecution.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string | |
config.id*required | string | Task name |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecutionInput({
executionId: "...",
id: "...",
});
getTaskExecutionLog
Required scope: automation:workflows:read
Returns the log output of a specific task. This can be large as its the STDOUT of the Action as defined by the user.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string | |
config.id*required | string | Task name |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecutionLog({
executionId: "...",
id: "...",
});
getTaskExecutionResult
Required scope: automation:workflows:read
Returns merged results from all ActionExecutions belonging to the TaskExecution.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string | |
config.id*required | string | Task name |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecutionResult({
executionId: "...",
id: "...",
});
getTaskExecutions
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string |
Returns
Return type | Status code | Description |
---|---|---|
TaskExecutions | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecutions({
executionId: "...",
});
getTransitions
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.executionId*required | string |
Returns
Return type | Status code | Description |
---|---|---|
TaskTransitions | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTransitions({
executionId: "...",
});
pauseExecution
Required scope: automation:workflows:run
Pauses an Execution. Can only be done, if the Execution is in an active state.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
void | 204 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.pauseExecution({
id: "...",
});
previewTaskInput
Required scope: automation:workflows:read
Returns preview expression by given task id from the workflow definition
Parameters
Name | Type |
---|---|
config.body*required | PreviewTaskInputRequest |
Returns
Return type | Status code | Description |
---|---|---|
ExpressionPreviewResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.previewTaskInput({
body: {
expression: {},
task: "...",
workflow: {
title: "...",
throttle: { isLimitHit: false },
},
},
});
resumeExecution
Required scope: automation:workflows:run
Resumes an Execution. Can only be done, if the Execution is in an inactive state.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this execution. |
Returns
Return type | Status code | Description |
---|---|---|
void | 204 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.resumeExecution({
id: "...",
});
schedulesClient
import { schedulesClient } from '@dynatrace-sdk/client-automation';
getCountries
Required scope: automation:workflows:read
Returns the list of countries that can be used to look up the holiday calendar
Returns
Return type | Status code | Description |
---|---|---|
CountryList | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.getCountries();
getHolidayCalendar
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.from | string | From date in ISO format |
config.key*required | string | The country name |
config.to | string | To date in ISO format |
Returns
Return type | Status code | Description |
---|---|---|
HolidayCalendarList | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.getHolidayCalendar({
key: "...",
});
getTimezones
Required scope: automation:workflows:read
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.getTimezones();
previewSchedule
Required scope: automation:workflows:read
Parameters
Name | Type |
---|---|
config.body*required | SchedulePreviewRequest |
Returns
Return type | Status code | Description |
---|---|---|
SchedulePreviewResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.previewSchedule({
body: {
schedule: {
trigger: {
type: CronTriggerType.Cron,
cron: "0 0 * * *",
},
},
},
});
schedulingRulesClient
import { schedulingRulesClient } from '@dynatrace-sdk/client-automation';
createRule
Required scope: automation:rules:write
Parameters
Name | Type |
---|---|
config.body*required | RuleCreate |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 201 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.createRule({
body: { title: "...", ruleType: RuleType.Rrule },
});
deleteRule
Required scope: automation:rules:write
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this rule. |
Returns
Return type | Status code | Description |
---|---|---|
void | 204 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.deleteRule({
id: "...",
});
duplicateRule
Required scope: automation:rules:write
Parameters
Name | Type | Description |
---|---|---|
config.body*required | DuplicationRequest | |
config.id*required | string | A UUID string identifying this rule. |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 201 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.duplicateRule({
id: "...",
body: {},
});
getRule
Required scope: automation:rules:read
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this rule. |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.getRule({
id: "...",
});
getRuleHistoryRecord
Required scope: automation:rules:read
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this rule. |
config.version*required | string |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data =
await schedulingRulesClient.getRuleHistoryRecord({
id: "...",
version: "...",
});
getRuleHistoryRecords
Required scope: automation:rules:read
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this rule. |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedChangeHistory | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data =
await schedulingRulesClient.getRuleHistoryRecords({
id: "...",
});
getRules
Required scope: automation:rules:read
Parameters
Name | Type | Description |
---|---|---|
config.limit | number | Number of results to return per page. |
config.offset | number | The initial index from which to return the results. |
config.ordering | string | Which field to use when ordering the results. |
config.search | string | A search term. |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedRuleList | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.getRules();
patchRule
Required scope: automation:rules:write
Parameters
Name | Type | Description |
---|---|---|
config.body*required | RuleUpdate | |
config.id*required | string | A UUID string identifying this rule. |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.patchRule({
id: "...",
body: {},
});
previewRule
Required scope: automation:workflows:read
Parameters
Name | Type |
---|---|
config.body*required | RulePreviewCreate |
Returns
Return type | Status code | Description |
---|---|---|
RulePreviewResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.previewRule({
body: {
ruleType: RRulePreviewRuleType.Rrule,
rrule: { freq: Freq.Yearly, datestart: "..." },
},
});
restoreRuleHistoryRecord
Required scope: automation:rules:write
Parameters
Name | Type | Description |
---|---|---|
config.id*required | string | A UUID string identifying this rule. |
config.version*required | string |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data =
await schedulingRulesClient.restoreRuleHistoryRecord({
id: "...",
version: "...",
});
updateRule
Required scope: automation:rules:write
Parameters
Name | Type | Description |
---|---|---|
config.body*required | RuleUpdate | |
config.id*required | string | A UUID string identifying this rule. |
Returns
Return type | Status code | Description |
---|---|---|
Rule | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.updateRule({
id: "...",
body: {},
});
settingsClient
import { settingsClient } from '@dynatrace-sdk/client-automation';
getServiceUsers
Required scope: automation:workflows:read
Get service users who could be used as workflow actor (deprecated).
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.getServiceUsers();
getSettings
Required scope: automation:workflows:read
Get system settings
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.getSettings();
getUserPermissions
Required scope: automation:workflows:read
Get current user effective permissions.
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.getUserPermissions();
getUserSettings
Required scope: automation:workflows:read
Get user-specific settings
Returns
Return type | Status code | Description |
---|---|---|
UserSettings | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.getUserSettings();
updateAuthorizations
Required scope: automation:workflows:read
Returns
Return type | Status code | Description |
---|---|---|
void | 202 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.updateAuthorizations();
versionClient
import { versionClient } from '@dynatrace-sdk/client-automation';
getVersion
Required scope: automation:workflows:read
Returns
Return type | Status code | Description |
---|---|---|
VersionResponse | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { versionClient } from "@dynatrace-sdk/client-automation";
const data = await versionClient.getVersion();
workflowsClient
import { workflowsClient } from '@dynatrace-sdk/client-automation';
createWorkflow
Required scope: automation:workflows:write
Creates a workflow and sets usages
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.body*required | WorkflowCreate |
Returns
Return type | Status code | Description |
---|---|---|
Workflow | 201 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.createWorkflow({
body: { title: "...", throttle: { isLimitHit: false } },
});
deleteWorkflow
Required scope: automation:workflows:write
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
void | 204 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.deleteWorkflow({
id: "...",
});
duplicateWorkflow
Required scope: automation:workflows:write
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.body*required | DuplicationRequest | |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
Workflow | 201 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.duplicateWorkflow({
id: "...",
body: {},
});
getWorkflow
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
Workflow | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.getWorkflow({
id: "...",
});
getWorkflowActions
Required scope: automation:workflows:read
Return list of actions assigned to tasks in a given Workflow.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.getWorkflowActions({
id: "...",
});
getWorkflowHistoryRecord
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
config.version*required | string |
Returns
Return type | Status code | Description |
---|---|---|
Workflow | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.getWorkflowHistoryRecord(
{ id: "...", version: "..." },
);
getWorkflowHistoryRecords
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedChangeHistory | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data =
await workflowsClient.getWorkflowHistoryRecords({
id: "...",
});
getWorkflowTask
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | |
config.workflowId*required | string |
Returns
Return type | Status code | Description |
---|---|---|
Task | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.getWorkflowTask({
id: "...",
workflowId: "...",
});
getWorkflowTasks
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
Tasks | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.getWorkflowTasks({
id: "...",
});
getWorkflows
Required scope: automation:workflows:read
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id | string | |
config.lastExecutionStateIn | Array<string> | Multiple values may be separated by commas. |
config.limit | number | Number of results to return per page. |
config.modificationInfoLastModifiedBy | Array<string> | Multiple values may be separated by commas. |
config.offset | number | The initial index from which to return the results. |
config.ordering | string | Which field to use when ordering the results. |
config.owner | string | |
config.ownerType | "GROUP" | "USER" | |
config.search | string | A search term. |
config.throttleIsLimitHit | boolean | |
config.triggerScheduleIsFaulty | boolean | |
config.triggerType | string | |
config.type | string | |
config.usages | string |
Returns
Return type | Status code | Description |
---|---|---|
PaginatedWorkflowList | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.getWorkflows();
patchWorkflow
Required scope: automation:workflows:write
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.body*required | WorkflowUpdate | |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
Workflow | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.patchWorkflow({
id: "...",
body: { throttle: { isLimitHit: false } },
});
resetWorkflowThrottles
Required scope: automation:workflows:write
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
WorkflowThrottlesResetStatus | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.resetWorkflowThrottles({
id: "...",
});
restoreWorkflowHistoryRecord
Required scope: automation:workflows:write
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.id*required | string | A UUID string identifying this workflow. |
config.version*required | string |
Returns
Return type | Status code | Description |
---|---|---|
void | 200 | No response body |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data =
await workflowsClient.restoreWorkflowHistoryRecord({
id: "...",
version: "...",
});
runWorkflow
Required scope: automation:workflows:run
Creates an Execution for the Workflow.
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.body*required | ExecutionInputsRequest | |
config.id*required | string | A UUID string identifying this workflow. |
config.monitor | boolean | Specifies whether the execution data of the SIMPLE workflow type is available for monitoring until the execution is complete. |
Returns
Return type | Status code | Description |
---|---|---|
Execution | 201 | Execution successfully created |
Execution | 202 | No execution created - execution with uniqueQualifier provided already exists |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.runWorkflow({
id: "...",
body: { input: {}, params: {} },
});
updateWorkflow
Required scope: automation:workflows:write
Parameters
Name | Type | Description |
---|---|---|
config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin |
config.body*required | WorkflowUpdate | |
config.id*required | string | A UUID string identifying this workflow. |
Returns
Return type | Status code | Description |
---|---|---|
Workflow | 200 |
Throws
Error Type | Error Message |
---|---|
ErrorEnvelopeError |
Code example
import { workflowsClient } from "@dynatrace-sdk/client-automation";
const data = await workflowsClient.updateWorkflow({
id: "...",
body: { throttle: { isLimitHit: false } },
});
Types
ActionExecution
Name | Type | Description |
---|---|---|
action*required | string | |
actionExecutionId | null | string | |
attempt | number | |
endedAt | null | Date | |
id*required | string | |
input | ActionExecutionInput | |
loopItem | ActionExecutionLoopItem | |
result | any | |
runtime | null | number | |
startedAt | null | Date | |
state | "ERROR" | "IDLE" | "RUNNING" | "SUSPENDED" | "SUCCESS" | "UNKNOWN" | |
stateInfo | null | string | |
taskExe*required | string | Parent task execution |
ActionExecutionInput
type: Record<string, any>
ActionExecutionLoopItem
type: Record<string, any>
BusinessCalendarCreate
Name | Type |
---|---|
description | string |
holidays | Holidays |
id | string |
title*required | string |
validFrom | Date |
validTo | Date |
weekdays | Weekdays |
weekstart | number |
BusinessCalendarResponse
Name | Type | Description |
---|---|---|
description | string | |
holidays | Holidays | |
id*required | string | |
modificationInfo*required | ModificationInfo | |
title*required | string | |
validFrom | Date | |
validTo | Date | |
version*required | number | |
weekdays*required | WeekdaysValues | The weekdays values |
weekdaysNames*required | WeekdaysNames | The weekdays names |
weekstart | number |
BusinessCalendarUpdate
Name | Type |
---|---|
description | string |
holidays | Holidays |
title | string |
validFrom | Date |
validTo | Date |
weekdays | Weekdays |
weekstart | number |
ChangeHistory
Name | Type |
---|---|
dateCreated*required | Date |
id*required | number |
user*required | string |
version*required | number |
Country
Name | Type |
---|---|
id*required | string |
title*required | string |
CountryList
Name | Type |
---|---|
count*required | number |
results*required | Array<Country> |
CronTrigger
Name | Type |
---|---|
cron*required | string |
type*required | "cron" |
DavisEventConfig
Name | Type | Description |
---|---|---|
customFilter | string | Additional DQL matcher expression to further filter events to match. |
entityTags | EntityTags | Entity tags to match by key and (optional) values. For example {"foo": [], "bar": ["a", "b", "c"]} |
entityTagsMatch | "all" | "any" | Event must match all or any of the entity tags. |
names | Array<DavisEventName> | |
onProblemClose | boolean | Trigger on Davis event open only or also on close. default: false |
Array<string> |
DavisEventName
Name | Type | Description |
---|---|---|
match*required | "equals" | "contains" | Davis event name must equal or contain the string provided. |
name*required | string |
DavisEventTriggerConfig
Name | Type |
---|---|
type*required | "davis-event" |
value*required | DavisEventConfig |
DavisProblemCategories
Name | Type |
---|---|
availability | boolean |
custom | boolean |
error | boolean |
info | boolean |
monitoringUnavailable | boolean |
resource | boolean |
slowdown | boolean |
DavisProblemConfig
Name | Type | Description |
---|---|---|
categories*required | DavisProblemCategories | |
customFilter | string | Additional DQL matcher expression to further filter events to match. |
entityTags | EntityTags | Entity tags to match by key and (optional) values. For example {"foo": [], "bar": ["a", "b", "c"]} |
entityTagsMatch | "all" | "any" | Event must match all or any of the entity tags. |
onProblemClose | boolean | Trigger on Davis problem open only or also on close. default: false |
DavisProblemTriggerConfig
Name | Type |
---|---|
type*required | "davis-problem" |
value*required | DavisProblemConfig |
DuplicationRequest
Name | Type |
---|---|
title | string |
EntityTags
Entity tags to match by key and (optional) values. For example {"foo": [], "bar": ["a", "b", "c"]}
type: Record<string, string | string[] | undefined>
Error
Name | Type |
---|---|
code*required | number |
details | ErrorDetails |
message*required | string |
ErrorDetails
type: Record<string, any>
ErrorEnvelope
Name | Type |
---|---|
error*required | Error |
EventLog
Name | Type |
---|---|
cause | string |
context | Record<string | any> |
event*required | string |
source*required | Source |
state*required | "ERROR" | "IDLE" | "RUNNING" | "SUCCESS" | "DEACTIVATED" | "WAITING" | "PAUSED" | "CANCELLED" | "SKIPPED" | "DISCARDED" |
timestamp*required | Date |
EventLogs
type: Array<EventLog>
EventQuery
Name | Type | Description |
---|---|---|
eventType | "events" | "bizevents" | "dt.system.events" | Grail event type. |
query*required | string | DQL matcher expression defining which events to match. |
EventQueryTriggerConfig
Name | Type |
---|---|
type*required | "event" |
value*required | EventQuery |
EventTrigger
Name | Type |
---|---|
filterQuery*required | string |
isActive | boolean |
triggerConfiguration | EventTriggerConfig |
uniqueExpression*required | null | string |
EventTriggerPreviewRequest
Name | Type |
---|---|
triggerConfiguration*required | EventTriggerConfig |
EventTriggerPreviewResponse
Name | Type |
---|---|
filterQuery*required | string |
triggerConfiguration*required | DavisEventTriggerConfig | DavisProblemTriggerConfig | EventQueryTriggerConfig |
EventTriggerRequest
Name | Type |
---|---|
isActive | boolean |
triggerConfiguration | EventTriggerConfig |
Execution
Name | Type | Description |
---|---|---|
actor*required | string | |
endedAt | null | Date | |
eventTrigger | null | string | |
id*required | string | |
input | ExecutionInput | |
params | ExecutionParams | |
parentExecution*required | null | string | |
parentTaskName*required | null | string | Parent task execution's name (subworkflows only) |
providedInput | null | ExecutionProvidedInput | |
result | ExecutionResult | |
rootExecution | null | string | |
rootWorkflow | null | string | |
runtime*required | number | Calculate the runtime of an execution in seconds. If the Execution is not ended, runtime is calculated until now. |
schedule | null | string | |
startedAt | Date | |
state*required | "ERROR" | "RUNNING" | "SUCCESS" | "UNKNOWN" | "PAUSED" | "CANCELLED" | |
stateInfo | null | string | |
title*required | string | |
trigger | null | string | |
triggerType*required | "Manual" | "Schedule" | "Event" | "Workflow" | |
triggerTypeDetail | TriggerTypeDetail | |
user | null | string | |
workflow*required | string | Executed Workflow |
workflowType*required | "STANDARD" | "SIMPLE" | |
workflowVersion*required | null | number |
ExecutionInput
type: Record<string, any>
ExecutionInputsRequest
Inputs for workflow executions
Name | Type | Description |
---|---|---|
input | ExecutionInputsRequestInput | Inputs (key/value pairs) default:
|
params | ExecutionInputsRequestParams | Metadata (can be nested object) default:
|
uniqueQualifier | string | A qualifier that must not have been used before to trigger the execution |
ExecutionParams
type: Record<string, any>
ExecutionProvidedInput
type: Record<string, any>
ExecutionResult
type: Record<string, any>
ExpressionPreviewResponse
Name | Type |
---|---|
error | Object |
valid*required | boolean |
value | any |
FixedOffsetRule
Name | Type | Description |
---|---|---|
offset*required | number | Offset days |
rule*required | string |