Duplicate a scheduling rule in Dynatrace with the AutomationEngine API by sending the rule ID and a new title in the request body.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/automation/v1/scheduling-rules/{id}/duplicate |
You provide the rule ID in the path and the title field in the request body. Dynatrace returns a 201 response when the AutomationEngine API creates the duplicated 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 | Duplication | - | body | Required |
DuplicationRequest object| Element | Type | Description | Required |
|---|---|---|---|
| title | string | - | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"title": "string"}
| Code | Type | Description |
|---|---|---|
| 201 | 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"}}}