Try it free

Create a scheduling rule

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Create a scheduling rule in Dynatrace Automation API by sending rule details such as title, rule type, recurrence, and calendar settings.

POSTSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/scheduling-rules

Overview

You provide the rule fields in the request body, including id, title, ruleType, rrule, groupingRule, fixedOffsetRule, relativeOffsetRule, businessCalendar, and description. The response returns the created scheduling rule.

Authentication

To execute this request, you need a platform token or OAuth access token with automation:rules:write scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyRuleCreate-bodyRequired

Request body objects

The RuleCreate object

ElementTypeDescriptionRequired
idstring-Optional
titlestring-Required
ruleTypeRuleType-
The element can hold these values
  • rrule
  • grouping
  • fixed_offset
  • relative_offset
Required
rruleRRule-Optional
groupingRuleGroupingRule-Optional
fixedOffsetRuleFixedOffsetRule-Optional
relativeOffsetRuleRelativeOffsetRule-Optional
businessCalendarstring-Optional
descriptionstring-Optional

The RuleType object

The RRule object

ElementTypeDescriptionRequired
freqFreq-
The element can hold these values
  • YEARLY
  • MONTHLY
  • WEEKLY
  • DAILY
  • HOURLY
  • MINUTELY
  • SECONDLY
Required
datestartstring

The recurrence start.

Required
intervalinteger

The interval between each freq iteration.

Optional
wkstWkst

The week start day.

Optional
untilstring

Specifying the upper-bound limit of the recurrence.

Optional
bysetposinteger[]

Each given integer will specify an occurrence number, corresponding to the nth occurrence of the rule inside the frequency period

Optional
bymonthinteger[]

The months to apply the recurrence to.

Optional
bymonthdayinteger[]

The month days to apply the recurrence to.

Optional
byyeardayinteger[]

The year days to apply the recurrence to.

Optional
byweeknointeger[]

The week numbers to apply the recurrence to.

Optional
bydayByday[]

Define the weekdays where the recurrence will be applied.

Optional
byworkdayByworkday

The type of days on which the recurrence will be applied.

Optional

The Freq object

The Wkst object

The week start day.

The Byday object

The Byworkday object

The type of days on which the recurrence will be applied.

The GroupingRule object

ElementTypeDescriptionRequired
combinestring[]-Optional
intersectstring[]-Optional
subtractstring[]-Optional

The FixedOffsetRule object

ElementTypeDescriptionRequired
rulestring-Required
offsetnumber

Offset days

Required

The RelativeOffsetRule object

ElementTypeDescriptionRequired
directionDirection-
The element can hold these values
  • next
  • previous
Required
sourceRulestring-Required
targetRulestring-Required

The Direction object

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"id": "string",
"title": "string",
"ruleType": "rrule",
"rrule": {
"freq": "YEARLY",
"datestart": "string",
"interval": 1,
"wkst": "MO",
"until": "string",
"bysetpos": [
1
],
"bymonth": [
1
],
"bymonthday": [
1
],
"byyearday": [
1
],
"byweekno": [
1
],
"byday": [
"MO"
],
"byworkday": "WORKING"
},
"groupingRule": {
"combine": [
"string"
],
"intersect": [
"string"
],
"subtract": [
"string"
]
},
"fixedOffsetRule": {
"rule": "string",
"offset": 1
},
"relativeOffsetRule": {
"direction": "next",
"sourceRule": "string",
"targetRule": "string"
},
"businessCalendar": "string",
"description": "string"
}

Response

Response codes

CodeTypeDescription
201Rule-
4XXErrorEnvelope-

Response body objects

The Rule object

ElementTypeDescription
idstring-
versioninteger-
titlestring-
ruleTypeRuleType-
The element can hold these values
  • rrule
  • grouping
  • fixed_offset
  • relative_offset
rruleRRule-
groupingRuleGroupingRule-
fixedOffsetRuleFixedOffsetRule-
relativeOffsetRuleRelativeOffsetRule-
businessCalendarstring-
descriptionstring-
modificationInfoModificationInfo-

The RuleType object

The RRule object

ElementTypeDescription
freqFreq-
The element can hold these values
  • YEARLY
  • MONTHLY
  • WEEKLY
  • DAILY
  • HOURLY
  • MINUTELY
  • SECONDLY
datestartstring

The recurrence start.

intervalinteger

The interval between each freq iteration.

wkstWkst

The week start day.

untilstring

Specifying the upper-bound limit of the recurrence.

bysetposinteger[]

Each given integer will specify an occurrence number, corresponding to the nth occurrence of the rule inside the frequency period

bymonthinteger[]

The months to apply the recurrence to.

bymonthdayinteger[]

The month days to apply the recurrence to.

byyeardayinteger[]

The year days to apply the recurrence to.

byweeknointeger[]

The week numbers to apply the recurrence to.

bydayByday[]

Define the weekdays where the recurrence will be applied.

byworkdayByworkday

The type of days on which the recurrence will be applied.

The Freq object

The Wkst object

The week start day.

The Byday object

The Byworkday object

The type of days on which the recurrence will be applied.

The GroupingRule object

ElementTypeDescription
combinestring[]-
intersectstring[]-
subtractstring[]-

The FixedOffsetRule object

ElementTypeDescription
rulestring-
offsetnumber

Offset days

The RelativeOffsetRule object

ElementTypeDescription
directionDirection-
The element can hold these values
  • next
  • previous
sourceRulestring-
targetRulestring-

The Direction object

The ModificationInfo object

ElementTypeDescription
createdBystring-
createdTimestring-
lastModifiedBystring-
lastModifiedTimestring-

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
messagestring-
codeinteger-
detailsErrorDetails-

The ErrorDetails object

ElementTypeDescription
errorCodestring-
errorRefstring-

Response body JSON models

{
"id": "string",
"version": 1,
"title": "string",
"ruleType": "rrule",
"rrule": {
"freq": "YEARLY",
"datestart": "string",
"interval": 1,
"wkst": "MO",
"until": "string",
"bysetpos": [
1
],
"bymonth": [
1
],
"bymonthday": [
1
],
"byyearday": [
1
],
"byweekno": [
1
],
"byday": [
"MO"
],
"byworkday": "WORKING"
},
"groupingRule": {
"combine": [
"string"
],
"intersect": [
"string"
],
"subtract": [
"string"
]
},
"fixedOffsetRule": {
"rule": "string",
"offset": 1
},
"relativeOffsetRule": {
"direction": "next",
"sourceRule": "string",
"targetRule": "string"
},
"businessCalendar": "string",
"description": "string",
"modificationInfo": {
"createdBy": "string",
"createdTime": "string",
"lastModifiedBy": "string",
"lastModifiedTime": "string"
}
}
{
"error": {
"message": "string",
"code": 1,
"details": {
"errorCode": "string",
"errorRef": "string"
}
}
}
Related tags
Platform APIDynatrace Platform