Update a scheduling rule in Dynatrace Automation API by UUID with changes to title, recurrence, offset, calendar, and description fields.
| PATCH | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/scheduling-rules/{id} |
You use the id path parameter to identify the rule and provide the fields you want to change in the request body, including title, ruleType, rrule, groupingRule, fixedOffsetRule, relativeOffsetRule, businessCalendar, and description. The response returns the updated scheduling rule.
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.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| id | string | A UUID string identifying this rule. | path | Required |
| body | Rule | - | body | Required |
RuleUpdate object| Element | Type | Description | Required |
|---|---|---|---|
| title | string | - | Optional |
| ruleType | Rule | -The element can hold these values
| Optional |
| rrule | R | - | Optional |
| groupingRule | Grouping | - | Optional |
| fixedOffsetRule | Fixed | - | Optional |
| relativeOffsetRule | Relative | - | Optional |
| businessCalendar | string | - | Optional |
| description | string | - | Optional |
RuleType objectRRule object| Element | Type | Description | Required |
|---|---|---|---|
| freq | Freq | -The element can hold these values
| Required |
| datestart | string | The recurrence start. | Required |
| interval | integer | The interval between each freq iteration. | Optional |
| wkst | Wkst | The week start day. | Optional |
| until | string | Specifying the upper-bound limit of the recurrence. | Optional |
| bysetpos | integer[] | Each given integer will specify an occurrence number, corresponding to the nth occurrence of the rule inside the frequency period | Optional |
| bymonth | integer[] | The months to apply the recurrence to. | Optional |
| bymonthday | integer[] | The month days to apply the recurrence to. | Optional |
| byyearday | integer[] | The year days to apply the recurrence to. | Optional |
| byweekno | integer[] | The week numbers to apply the recurrence to. | Optional |
| byday | Byday[] | Define the weekdays where the recurrence will be applied. | Optional |
| byworkday | Byworkday | The type of days on which the recurrence will be applied. | Optional |
Freq objectWkst objectThe week start day.
Byday objectByworkday objectThe type of days on which the recurrence will be applied.
GroupingRule object| Element | Type | Description | Required |
|---|---|---|---|
| combine | string[] | - | Optional |
| intersect | string[] | - | Optional |
| subtract | string[] | - | Optional |
FixedOffsetRule object| Element | Type | Description | Required |
|---|---|---|---|
| rule | string | - | Required |
| offset | number | Offset days | Required |
RelativeOffsetRule object| Element | Type | Description | Required |
|---|---|---|---|
| direction | Direction | -The element can hold these values
| Required |
| sourceRule | string | - | Required |
| targetRule | string | - | Required |
Direction objectThis is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"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"}
| Code | Type | Description |
|---|---|---|
| 200 | Rule | - |
| 4XX | Error | - |
Rule object| Element | Type | Description |
|---|---|---|
| id | string | - |
| version | integer | - |
| title | string | - |
| ruleType | Rule | -The element can hold these values
|
| rrule | R | - |
| groupingRule | Grouping | - |
| fixedOffsetRule | Fixed | - |
| relativeOffsetRule | Relative | - |
| businessCalendar | string | - |
| description | string | - |
| modificationInfo | Modification | - |
RuleType objectRRule object| Element | Type | Description |
|---|---|---|
| freq | Freq | -The element can hold these values
|
| datestart | string | The recurrence start. |
| interval | integer | The interval between each freq iteration. |
| wkst | Wkst | The week start day. |
| until | string | Specifying the upper-bound limit of the recurrence. |
| bysetpos | integer[] | Each given integer will specify an occurrence number, corresponding to the nth occurrence of the rule inside the frequency period |
| bymonth | integer[] | The months to apply the recurrence to. |
| bymonthday | integer[] | The month days to apply the recurrence to. |
| byyearday | integer[] | The year days to apply the recurrence to. |
| byweekno | integer[] | The week numbers to apply the recurrence to. |
| byday | Byday[] | Define the weekdays where the recurrence will be applied. |
| byworkday | Byworkday | The type of days on which the recurrence will be applied. |
Freq objectWkst objectThe week start day.
Byday objectByworkday objectThe type of days on which the recurrence will be applied.
GroupingRule object| Element | Type | Description |
|---|---|---|
| combine | string[] | - |
| intersect | string[] | - |
| subtract | string[] | - |
FixedOffsetRule object| Element | Type | Description |
|---|---|---|
| rule | string | - |
| offset | number | Offset days |
RelativeOffsetRule object| Element | Type | Description |
|---|---|---|
| direction | Direction | -The element can hold these values
|
| sourceRule | string | - |
| targetRule | string | - |
Direction objectModificationInfo object| Element | Type | Description |
|---|---|---|
| createdBy | string | - |
| createdTime | string | - |
| lastModifiedBy | string | - |
| lastModifiedTime | string | - |
ErrorEnvelope object| Element | Type | Description |
|---|---|---|
| error | Error | - |
Error object| Element | Type | Description |
|---|---|---|
| message | string | - |
| code | integer | - |
| details | Error | - |
ErrorDetails object| Element | Type | Description |
|---|---|---|
| errorCode | string | - |
| errorRef | string | - |
{"id": "string","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"}}}