PUT /cdpPolicies/{ID}
Edits a CDP policy having the specified ID.
Request
To edit a CDP policy, send the PUT HTTP request to the /cdpPolicies/{ID} URL.
HTTP Request
|
PUT https://<Enterprise-Manager>:9398/api/cdpPolicies/{ID} |
Request Headers
The request contains the following headers:
|
Header |
Required |
Description |
|---|---|---|
|
X-RestSvcSessionId |
True |
The request requires authorization. In the header, the client must send a session ID copied from the server reply to the request creating a new logon session. For details, see Authentication and Security. |
|
Content-Type |
True |
Identifies the format of the request body message. Possible values:
|
|
Accept |
False |
Identifies the format of the response. Possible values:
If the request does not contain the header, the server will return the response in the XML format. |
Request Body
In the request body, the client must send the parameters for the edited CDP policy. The body of the request must conform to the XML Schema Definitionem_rest_ of Veeam Backup Enterprise Manager REST API.
|
Important |
|
If you use the XML media type, make sure that the order of parameters in the request body is correct. For details, see request body examples in this section. |
|
Note |
|
In the request body, you can send all resource properties or only those properties that you want to edit. |
The request body must contain the elements you want to edit. You can define the following general parameters for the CDP policy:
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
Description |
String |
Description provided for the CDP policy. |
Yes |
0/1 |
|
ScheduleConfigured |
Boolean |
Defines whether scheduling options are configured for the CDP policy. |
Yes |
0/1 |
|
ScheduleEnabled |
Boolean |
Defines whether scheduling options are enabled for the CDP policy. If you set this option to True, you need to specify the PolicyScheduleOptions element. |
Yes |
0/1 |
|
NextRun |
DateTime |
Date and time of the next CDP policy run. The parameter accepts only UTC-formatted DateTime values. |
Yes |
0/1 |
|
PolicyScheduleOptions |
PolicyScheduleOptions |
Defines scheduling options for the CDP policy. For details, see CDP Policy Scheduling Options. |
Yes |
0/1 |
For example:
XML Representation
|
<?xml version="1.0" encoding="utf-8"?> |
JSON Representation
|
{ "Href": "https://localhost:9398/api/cdpPolicies/145f3365-6ec0-44e9-9538-8c8c34ebdcce?format=Entity", "Type": "CdpPolicy", "Name": "CDP Policy 1", "UID": "urn:veeam:CdpPolicy:145f3365-6ec0-44e9-9538-8c8c34ebdcce", "xmlns": "http://www.veeam.com/ent/v1.0", "Description": "Created by TECH\\sheila.d.cory", "ScheduleConfigured": "true", "ScheduleEnabled": "true" } |
You can define the following scheduling options for the CDP policy:
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
RecoveryPointObjectiveSeconds |
Int64 |
Recovery point objective in seconds. |
Yes |
0/1 |
|
RecoveryPointObjectiveMinutes |
Int64 |
Recovery point objective in minutes. |
Yes |
0/1 |
|
RPOSchedule |
RPOSchedule |
Time intervals that define when the CDP policy is allowed to create a replicated state of the source VMs. For details, see RPO Schedule Options. |
Yes |
0/1 |
|
RPOReporting |
RPOReporting |
Defines RPO reporting settings. For details, see RPO Reporting Options. |
Yes |
0/1 |
|
ShortTermRetentionMinutes |
Int64 |
Time period for which short-term restore points must be stored, in minutes. |
||
|
ShortTermRetentionHours |
Int64 |
Time period for which short-term restore points must be stored, in hours. |
||
|
LongTermRetentionHours |
Int64 |
Defines how often new long-term restore points must be created, in hours. |
||
|
LongTermRetentionKeepDays |
Int64 |
Defines for how long the long-term restore points must be retained, in days. |
Yes |
0/1 |
|
LongTermRetentionSchedule |
LongTermRetentionSchedule |
Time intervals that define when the CDP policy must create application-consistent and when crash-consistent long-term restore points. For details, see Long-Term Retention Schedule Options. |
Yes |
0/1 |
RPO schedule options are provided in the following format:
XML Representation
|
<RPOSchedule Enabled="true"> |
JSON Representation
|
"RPOSchedule": { "Enabled": "true", "TimePeriods": { "Day": [ { "Name": "Sunday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Monday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Tuesday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Wednesday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Thursday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Friday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Saturday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" } ] } } |
You can define the following RPO schedule options for the CDP policy:
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
Enabled |
Boolean |
Defines whether RPO schedule options are specified for the CDP policy. |
Yes |
1/1 |
|
TimePeriods |
TimePeriods |
Defines an hourly scheme by which the CDP policy must run. The schedule scheme is constructed by the following pattern: <Day Name ="Sunday"> 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1</Day> where 1 means the CDP policy must run, 0 means the CDP policy must not run. |
Yes |
0/unbounded |
RPO reporting options are provided in the following format:
XML Representation
|
<RPOReporting> |
JSON Representation
|
"RPOReporting": { "MarkAsWarning": { "Enabled": "true", "RPOThresholdSeconds": "2", "RPOThresholdMinutes": "0" }, "MarkAsFailed": { "Enabled": "true", "RPOThresholdSeconds": "3", "RPOThresholdMinutes": "0" } } |
You can define the following RPO reporting options for the CDP policy:
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
Enabled |
Boolean |
Defines whether RPO reporting options are specified for the job. |
Yes |
— |
|
MarkAsWarning |
CDPReplicaRPOReporting |
Time interval in seconds or minutes before Veeam Backup & Replication sends a notification with a warning if a newly created restore point is not transferred to the target within the set RPO. For details, see Warning Settings. |
Yes |
0/1 |
|
MarkAsFailed |
CDPReplicaRPOReporting |
Time interval in seconds or minutes before Veeam Backup & Replication sends a notification with an error if a newly created restore point is not transferred to the target within the set RPO. For details, see Error Settings. |
Yes |
0/1 |
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
Enabled |
Boolean |
Defines whether warning notifications are enabled. |
Yes |
— |
|
RPOThresholdSeconds |
Int |
Time interval in seconds before Veeam Backup & Replication sends a notification with a warning if a newly created restore point is not transferred to the target within the set RPO. |
Yes |
0/1 |
|
RPOThresholdMinutes |
Int |
Time interval in minutes before Veeam Backup & Replication sends a notification with a warning if a newly created restore point is not transferred to the target within the set RPO. |
Yes |
0/1 |
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
Enabled |
Boolean |
Defines whether error notifications are enabled. |
Yes |
— |
|
RPOThresholdSeconds |
Int |
Time interval in seconds before Veeam Backup & Replication sends a notification with an error if a newly created restore point is not transferred to the target within the set RPO. |
Yes |
0/1 |
|
RPOThresholdMinutes |
Int |
Time interval in minutes before Veeam Backup & Replication sends a notification with an error if a newly created restore point is not transferred to the target within the set RPO. |
Yes |
0/1 |
Long-Term Retention Schedule Options
Long-term retention schedule options are provided in the following format:
XML Representation
|
<LongTermRetentionSchedule Enabled="true"> |
JSON Representation
|
"LongTermRetentionSchedule": { "Enabled": "true", "TimePeriods": { "Day": [ { "Name": "Sunday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" }, { "Name": "Monday", "#text": "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" }, { "Name": "Tuesday", "#text": "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" }, { "Name": "Wednesday", "#text": "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" }, { "Name": "Thursday", "#text": "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" }, { "Name": "Friday", "#text": "2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2" }, { "Name": "Saturday", "#text": "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" } ] } } |
You can define the following periodic scheduling options for the CDP policy:
|
Element |
Type |
Description |
Modifiable |
Min/Max Occurrence |
|---|---|---|---|---|
|
Enabled |
Boolean |
Defines whether long-term retention schedule options are specified for the job. |
Yes |
— |
|
Schedule |
TimePeriods |
Defines an hourly scheme when the CDP policy must create application-consistent and when crash-consistent long-term restore points. The scheduling scheme is constructed by the following pattern: <Day Name ="Sunday"> 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1</Day> where 1 means the CDP policy must create crash-consistent long-term restore points, 2 means the CDP policy must create application-consistent long-term restore points. |
Yes |
0/1 |
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns response code 202 Accepted.
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTP headers.
|
Header |
Description |
|---|---|
|
Content-length |
The length of the response body. |
|
Content-type |
The media type and syntax of the request body message. Possible values:
|
Response Body
In the response body, the REST API returns a task that has been created to perform the requested operation. To track the status of the operation, send the GET /tasks/{ID} request.
The task resource also contains a link to the task deletion operation. To stop the task execution, send the DELETE /task/{ID} request to the URL in the link.
The example below changes the settings of the CDP policy having ID 8846d24b-d12f-4b7a-94e2-8c78241b841.
|
Request: PUT https://localhost:9398/api/jobs/78c3919c-54d7-43fe-b047-485d3566f11f?action=edit Request Headers: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj Request Body: <?xml version="1.0" encoding="utf-8"?> Response: 202 Accepted Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-3"> |
To track the status of the operation, send the GET HTTP request to the received task resource:
|
Request: GET https://localhost:9398/api/tasks/task-3 Request Header: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj Response: 200 OK Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="https://localhost:9398/api/tasks/task-3"> |