@dynatrace-sdk/client-automation

Manage and run workflows with the AutomationEngine API.
Installation
npm install @dynatrace-sdk/client-automation
Getting help
License
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
API reference
Full API reference for the latest version of the SDK is also available at the Dynatrace Developer.
actionExecutionsClient
import { actionExecutionsClient } from '@dynatrace-sdk/client-automation';
getActionExecution
actionExecutionsClient.getActionExecution(config): Promise<ActionExecution>
Required scope: automation:workflows:read
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| config.id*required | string | A UUID string identifying this action execution. |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { actionExecutionsClient } from "@dynatrace-sdk/client-automation";
const data =
await actionExecutionsClient.getActionExecution({
id: "...",
});
getActionExecutionLog
actionExecutionsClient.getActionExecutionLog(config): Promise<[string](https://developer.mozilla.org/en-US/docs/Glossary/String)>
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
Default: false |
| 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
⚠️ Deprecated
actionsSampleResultClient.getActionSampleResult(config): Promise<[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)>
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
businessCalendarsClient.createBusinessCalendar(config): Promise<BusinessCalendarResponse>
Required scope: automation:calendars:write
Parameters
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.createBusinessCalendar({
body: { title: "..." },
});
deleteBusinessCalendar
businessCalendarsClient.deleteBusinessCalendar(config): Promise<void>
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
businessCalendarsClient.duplicateBusinessCalendar(config): Promise<BusinessCalendarResponse>
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
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.duplicateBusinessCalendar({
id: "...",
body: {},
});
getBusinessCalendar
businessCalendarsClient.getBusinessCalendar(config): Promise<BusinessCalendarResponse>
Required scope: automation:calendars:read
Parameters
| Name | Type | Description |
| config.id*required | string | A UUID string identifying this business calendar. |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendar({
id: "...",
});
getBusinessCalendarHistoryRecord
businessCalendarsClient.getBusinessCalendarHistoryRecord(config): Promise<BusinessCalendarResponse>
Required scope: automation:calendars:read
Parameters
| Name | Type | Description |
| config.id*required | string | A UUID string identifying this business calendar. |
| config.version*required | string | Pattern: ^[\d]+$ |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendarHistoryRecord(
{ id: "...", version: "..." },
);
getBusinessCalendarHistoryRecords
businessCalendarsClient.getBusinessCalendarHistoryRecords(config): Promise<PaginatedChangeHistory>
Required scope: automation:calendars:read
Parameters
| Name | Type | Description |
| config.all | boolean | When false, the latest historical record is not returned.
Default: false |
| config.id*required | string | A UUID string identifying this business calendar. |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendarHistoryRecords(
{ id: "..." },
);
getBusinessCalendars
businessCalendarsClient.getBusinessCalendars(config): Promise<PaginatedBusinessCalendarResponseList>
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
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.getBusinessCalendars();
patchBusinessCalendar
businessCalendarsClient.patchBusinessCalendar(config): Promise<BusinessCalendarResponse>
Required scope: automation:calendars:write
Parameters
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.patchBusinessCalendar({
id: "...",
body: {},
});
restoreBusinessCalendarHistoryRecord
businessCalendarsClient.restoreBusinessCalendarHistoryRecord(config): Promise<void>
Required scope: automation:calendars:write
Parameters
| Name | Type | Description |
| config.id*required | string | A UUID string identifying this business calendar. |
| config.version*required | string | Pattern: ^[\d]+$ |
Returns
| Return type | Status code | Description |
| void | 200 | No response body |
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { businessCalendarsClient } from "@dynatrace-sdk/client-automation";
const data =
await businessCalendarsClient.restoreBusinessCalendarHistoryRecord(
{ id: "...", version: "..." },
);
updateBusinessCalendar
businessCalendarsClient.updateBusinessCalendar(config): Promise<BusinessCalendarResponse>
Required scope: automation:calendars:write
Parameters
Returns
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
⚠️ Deprecated
eventTriggersClient.previewFilter(config): Promise<EventTriggerPreviewResponse>
Required scope: automation:workflows:read
Parameters
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { eventTriggersClient } from "@dynatrace-sdk/client-automation";
const data = await eventTriggersClient.previewFilter({
body: {
triggerConfiguration: {
type: "event",
value: { query: "..." },
},
},
});
executionsClient
import { executionsClient } from '@dynatrace-sdk/client-automation';
cancelExecution
executionsClient.cancelExecution(config): Promise<void>
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
Default: false |
| 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
executionsClient.cancelTaskExecution(config): Promise<void>
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
Default: false |
| 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
executionsClient.getAllEventLogs(config): Promise<EventLogs>
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
Default: false |
| 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
executionsClient.getExecution(config): Promise<Execution>
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
Default: false |
| 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
executionsClient.getExecutionActions(config): Promise<Array<[string](https://developer.mozilla.org/en-US/docs/Glossary/String)>>
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
Default: false |
| 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
executionsClient.getExecutionLog(config): Promise<[string](https://developer.mozilla.org/en-US/docs/Glossary/String)>
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
Default: false |
| 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
executionsClient.getExecutions(config): Promise<PaginatedExecutionList>
Required scope: automation:workflows:read
Get list of executions (executions of draft and simple workflows aren't included in the response).
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| 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
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getExecutions();
getTaskExecution
executionsClient.getTaskExecution(config): Promise<TaskExecution>
Required scope: automation:workflows:read
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| config.executionId*required | string | |
| config.id*required | string | Task name |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecution({
executionId: "...",
id: "...",
});
executionsClient.getTaskExecutionInput(config): Promise<[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)>
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
Default: false |
| 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
executionsClient.getTaskExecutionLog(config): Promise<[string](https://developer.mozilla.org/en-US/docs/Glossary/String)>
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
Default: false |
| 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
executionsClient.getTaskExecutionResult(config): Promise<[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)>
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
Default: false |
| 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
executionsClient.getTaskExecutions(config): Promise<TaskExecutions>
Required scope: automation:workflows:read
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| config.executionId*required | string | |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTaskExecutions({
executionId: "...",
});
getTransitions
executionsClient.getTransitions(config): Promise<TaskTransitions>
Required scope: automation:workflows:read
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| config.executionId*required | string | |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { executionsClient } from "@dynatrace-sdk/client-automation";
const data = await executionsClient.getTransitions({
executionId: "...",
});
pauseExecution
executionsClient.pauseExecution(config): Promise<void>
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
Default: false |
| 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: "...",
});
resumeExecution
executionsClient.resumeExecution(config): Promise<void>
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
Default: false |
| 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
schedulesClient.getCountries(config): Promise<CountryList>
Required scope: automation:workflows:read
Returns the list of countries that can be used to look up the holiday calendar
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.getCountries();
getHolidayCalendar
schedulesClient.getHolidayCalendar(config): Promise<HolidayCalendarList>
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
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.getHolidayCalendar({
key: "...",
});
getTimezones
schedulesClient.getTimezones(config): Promise<Array<[string](https://developer.mozilla.org/en-US/docs/Glossary/String)>>
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
⚠️ Deprecated
schedulesClient.previewSchedule(config): Promise<SchedulePreviewResponse>
Required scope: automation:workflows:read
Parameters
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulesClient.previewSchedule({
body: {
schedule: {
trigger: { type: "cron", cron: "0 0 * * *" },
},
},
});
schedulingRulesClient
import { schedulingRulesClient } from '@dynatrace-sdk/client-automation';
createRule
schedulingRulesClient.createRule(config): Promise<Rule>
Required scope: automation:rules:write
Parameters
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: "rrule" },
});
deleteRule
schedulingRulesClient.deleteRule(config): Promise<void>
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
schedulingRulesClient.duplicateRule(config): Promise<Rule>
Required scope: automation:rules:write
Parameters
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
schedulingRulesClient.getRule(config): Promise<Rule>
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
schedulingRulesClient.getRuleHistoryRecord(config): Promise<Rule>
Required scope: automation:rules:read
Parameters
| Name | Type | Description |
| config.id*required | string | A UUID string identifying this rule. |
| config.version*required | string | Pattern: ^[\d]+$ |
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
schedulingRulesClient.getRuleHistoryRecords(config): Promise<PaginatedChangeHistory>
Required scope: automation:rules:read
Parameters
| Name | Type | Description |
| config.all | boolean | When false, the latest historical record is not returned.
Default: false |
| config.id*required | string | A UUID string identifying this rule. |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data =
await schedulingRulesClient.getRuleHistoryRecords({
id: "...",
});
getRules
schedulingRulesClient.getRules(config): Promise<PaginatedRuleList>
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
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.getRules();
patchRule
schedulingRulesClient.patchRule(config): Promise<Rule>
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
⚠️ Deprecated
schedulingRulesClient.previewRule(config): Promise<RulePreviewResponse>
Required scope: automation:workflows:read
Parameters
| Name | Type |
| config.body*required | RulePreviewCreate |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data = await schedulingRulesClient.previewRule({
body: {
ruleType: "rrule",
rrule: { freq: "YEARLY", datestart: "..." },
},
});
restoreRuleHistoryRecord
schedulingRulesClient.restoreRuleHistoryRecord(config): Promise<void>
Required scope: automation:rules:write
Parameters
| Name | Type | Description |
| config.id*required | string | A UUID string identifying this rule. |
| config.version*required | string | Pattern: ^[\d]+$ |
Returns
| Return type | Status code | Description |
| void | 200 | No response body |
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { schedulingRulesClient } from "@dynatrace-sdk/client-automation";
const data =
await schedulingRulesClient.restoreRuleHistoryRecord({
id: "...",
version: "...",
});
updateRule
schedulingRulesClient.updateRule(config): Promise<Rule>
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
⚠️ Deprecated
settingsClient.getServiceUsers(config): Promise<GetServiceUsersResponse>
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
⚠️ Deprecated
settingsClient.getSettings(config): Promise<GetSettingsResponse>
Required scope: automation:workflows:read
Get system settings
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.getSettings();
getUserPermissions
⚠️ Deprecated
settingsClient.getUserPermissions(config): Promise<Array<[string](https://developer.mozilla.org/en-US/docs/Glossary/String)>>
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
⚠️ Deprecated
settingsClient.getUserSettings(config): Promise<UserSettings>
Required scope: automation:workflows:read
Get user-specific settings
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { settingsClient } from "@dynatrace-sdk/client-automation";
const data = await settingsClient.getUserSettings();
updateAuthorizations
⚠️ Deprecated
settingsClient.updateAuthorizations(config): Promise<void>
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
versionClient.getVersion(config): Promise<VersionResponse>
Required scope: automation:workflows:read
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { versionClient } from "@dynatrace-sdk/client-automation";
const data = await versionClient.getVersion();
webhookHandlersClient
import { webhookHandlersClient } from '@dynatrace-sdk/client-automation';
deleteWebhookHandler
webhookHandlersClient.deleteWebhookHandler(config): Promise<void>
Required scope: automation:webhookhandlers:write
Parameters
| Name | Type | Description |
| config.connectionId*required | string | The ID of the connection this webhook handler belongs to |
Returns
| Return type | Status code | Description |
| void | 204 | No response body |
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { webhookHandlersClient } from "@dynatrace-sdk/client-automation";
const data =
await webhookHandlersClient.deleteWebhookHandler({
connectionId: "...",
});
getWebhookHandler
webhookHandlersClient.getWebhookHandler(config): Promise<WebhookHandler>
Required scope: automation:webhookhandlers:read
Parameters
| Name | Type | Description |
| config.connectionId*required | string | The ID of the connection this webhook handler belongs to |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { webhookHandlersClient } from "@dynatrace-sdk/client-automation";
const data = await webhookHandlersClient.getWebhookHandler({
connectionId: "...",
});
getWebhookHandlers
webhookHandlersClient.getWebhookHandlers(config): Promise<Array<WebhookHandlerList>>
Required scope: automation:webhookhandlers:read
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { webhookHandlersClient } from "@dynatrace-sdk/client-automation";
const data =
await webhookHandlersClient.getWebhookHandlers();
writeWebhookHandler
webhookHandlersClient.writeWebhookHandler(config): Promise<WebhookHandler>
Required scope: automation:webhookhandlers:write
Parameters
| Name | Type | Description |
| config.body*required | WebhookHandlerWrite | |
| config.connectionId*required | string | The ID of the connection this webhook handler belongs to |
Returns
Throws
| Error Type | Error Message |
| ErrorEnvelopeError | |
Code example
import { webhookHandlersClient } from "@dynatrace-sdk/client-automation";
const data =
await webhookHandlersClient.writeWebhookHandler({
connectionId: "...",
body: {
active: false,
validationMethod: "slack",
eventSignatureHeader: "...",
},
});
workflowsClient
import { workflowsClient } from '@dynatrace-sdk/client-automation';
createWorkflow
workflowsClient.createWorkflow(config): Promise<Workflow>
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
Default: false |
| 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 } },
});
deleteTrashedWorkflow
workflowsClient.deleteTrashedWorkflow(config): Promise<void>
Required scope: automation:workflows:write
Permanently delete a workflow that is in the trash. Returns 404 if the workflow does not exist or is not in the trash.
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| 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.deleteTrashedWorkflow({
id: "...",
});
deleteWorkflow
workflowsClient.deleteWorkflow(config): Promise<void>
Required scope: automation:workflows:write
Move the workflow to trash (trash=true) or permanently delete it (trash=false or omitted). Trashed workflows can be permanently deleted via /trash/workflows/{id}.
Parameters
| Name | Type | Description |
| config.adminAccess | boolean | Allow access to all workflows/executions - additionally requires automation:workflows:admin
Default: false |
| config.id*required | string | A UUID string identifying this workflow. |
| config.trash | boolean | When true, moves the workflow to trash instead of permanently deleting it. Trashed workflows are |