PUT /jobs/{ID}
Edits a job having the specified ID.
Supported Platforms
The request is supported for the following platforms:
- VMware vSphere
- VMware Cloud Director
- Microsoft Hyper-V
Request
To edit a job, send the PUT HTTP request to the /jobs/{ID}?action=edit URL.
HTTP Request
PUT https://<Enterprise-Manager>:9398/api/jobs/{ID}?action=edit |
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 job. The body of the request must conform to the XML Schema Definitionem_rest_ of Veeam Backup Enterprise Manager REST API.
Note |
In the request body, you can send all resource properties or only those properties that you want to edit. |
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. |
The request body must contain the elements you want to edit. You can define the following general parameters for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Description | String | Description provided for the job. | Yes | 0/1 |
ScheduleConfigured | Boolean | Defines whether scheduling options are configured for the job. | Yes | 0/1 |
ScheduleEnabled | Boolean | Defines whether scheduling settings are enabled for the job. If you set this option to True, you need to define the schedule by which the job should run in the JobScheduleOptions section of the request. | Yes | 0/1 |
GfsRetentionPolicy | Boolean | Defines whether long-term (GFS) retention policy settings are enabled for the job. If you set this option to True, you need to specify GFS retention settings for the job in the GFSRetentionPolicy section of the request. | Yes | 0/1 |
For example:
XML Representation
<?xml version="1.0" encoding="utf-8"?> |
JSON Representation
{ |
Note |
|
You can define the following scheduling options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
RetryOptions | JobScheduleRetryOptionsType | Retry options set for the job. For details, see Retry Options. | Yes | — |
WaitForBackupCompletion | Boolean | This parameter is set for SureBackup and backup copy jobs. Defines whether the job must wait for the backup or replication job to complete. | Yes | 0/1 |
BackupCompetitionWaitingPeriodMin | Int64 | Time period in minutes for which the job must wait for the backup job to complete. | Yes | 0/1 |
OptionsDaily | JobScheduleDailyOptions | Daily backup options set for the job. For details, see Daily Backup Scheduling Options. | Yes | 0/1 |
OptionsMonthly | JobScheduleMonthly | Monthly backup options set for the job. For details, see Monthly Backup Scheduling Options. | Yes | 0/1 |
OptionsPeriodically | JobSchedulePeriodically | Periodic backup options set for the job. For details, see Periodic Backup Scheduling Options. | Yes | 0/1 |
OptionsContinuous | JobScheduleContinuousOptionsType | Continuous backup options set for the job. For details, see Continuous Backup Scheduling Options. | Yes | 0/1 |
OptionsBackupWindow | JobScheduleBackupWindow | Backup window options set for the job. For details, see Backup Window Options. | Yes | 0/1 |
OptionsDaisyChaining | JobScheduleDaisyChaining | Defines whether backup job chaining is enabled for the job. For details, see Job Chaining Options. | Yes | 0/1 |
Retry options are provided in the following format:
XML Representation
<RetryOptions> |
JSON Representation
"RetryOptions": { |
You can define the following retry options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
RetryTimes | Int64 | Number of retries set for the job. | Yes | 0/1 |
RetryTimeout | Int64 | Time interval between job retries | Yes | 0/1 |
RetrySpecified | Boolean | Defines whether retry options are set for the job. | Yes | 0/1 |
Daily Backup Scheduling Options
Daily scheduling options are provided in the following format:
XML Representation
<OptionsDaily Enabled="true"> |
JSON Representation
"OptionsDaily": { |
You can define the following daily scheduling options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether daily scheduling options are specified for the job. | Yes | — |
Kind | String | Kind of daily scheduling scheme. Possible values:
| Yes | 0/1 |
Days | DaysOfWeekEnumeration | Days on which the job must be launched. Possible values:
| Yes | 0/unbounded |
Time | Time | Daily time interval within which the job session should be completed. | Yes | 0/1 |
TimeOffsetUtc | TimeSpan | UTC offset. | Yes | 0/1 |
Monthly Backup Scheduling Options
Monthly scheduling options are provided in the following format:
XML Representation
<OptionsMonthly Enabled="false"> |
JSON Representation
"OptionsMonthly": { |
You can define the following monthly scheduling options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether monthly scheduling options are specified for the job. | Yes | — |
Time | Time | Daily time interval within which the job session should be completed. | Yes | 0/1 |
TimeOffsetUtc | TimeSpan | UTC offset. | Yes | 0/1 |
DayNumberInMonth | String | Day in month on which the backup job must be launched. | Yes | 0/1 |
DayOfWeek | String | Days on which the job must be launched. Possible values:
| Yes | 0/unbounded |
Months | JobScheduleMonthEnumeration | Months on which the job must be launched. Possible values:
| Yes | 0/unbounded |
Periodic Backup Scheduling Options
Periodic scheduling options are provided in the following format:
XML Representation
<OptionsPeriodically Enabled="false"> |
JSON Representation
"OptionsPeriodically": { |
You can define the following periodic scheduling options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether periodic scheduling options are specified for the job. | Yes | — |
Kind | String | Defines the time unit for periodic job scheduling. Possible values:
| Yes | 0/1 |
FullPeriod | Int64 | Defines periodic cycles (in hours or minutes depending on the value of the Kind option) in which the job must be launched.
| Yes | 0/1 |
Schedule | TimePeriods | Defines an hourly scheme by which the job must be launched. 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 job must be started, 0 means the job must not be started. | Yes | 0/unbounded |
Continuous Backup Scheduling Options
Continuous scheduling options are provided in the following format:
XML Representation
<OptionsContinuous Enabled="false"> |
JSON Representation
"OptionsContinious": { |
You can define the following continuous scheduling options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether continuous scheduling options are specified for the job. | Yes | — |
Schedule | TimePeriods | Defines an hourly scheme by which the job can continuously perform. 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 job must be started, 0 means the job must not be started. | Yes | 0/unbounded |
Backup window options are provided in the following format:
XML Representation
<OptionsBackupWindow Enabled="false"> |
JSON Representation
"OptionsBackupWindow": { |
You can define the following backup window options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether backup window options are specified for the job. | Yes | — |
TimePeriods | TimePeriods | Defines an hourly scheme for the backup window. 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 job must be started, 0 means the job must not be started. | Yes | 0/unbounded |
Job chaining options are provided in the following format:
XML Representation
<OptionsDaisyChaining Enabled="true"> |
JSON Representation
"OptionsDaisyChaining": { |
You can define the following job chaining options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether job chaining is enabled. | Yes | — |
PreviousJobUid | UidType | UID of the previous job in the chain, for example: urn:veeam:Job:da736815-4fea-4c8e-b0e1-5ecdbca1c512. | Yes | 1/1 |
Note |
Retention policy options must be defined in the BackupJobInfo section in the request body. |
You can define the following retention policy options for the job:
Short-Term Retention Policy Options
Note |
Short-term retention policy options must be defined in the SimpleRetentionPolicy element of the BackupJobInfo section in the request body. |
Short-term retention policy options are provided in the following format:
XML Representation
<SimpleRetentionPolicy> |
JSON Representation
"SimpleRetentionPolicy": { |
You can define the following short-term retention policy options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
RetainCycles | Int64 | Number restore points to keep. | Yes | 0/1 |
RetainDaysToKeep | Int64 | Number of days for which to keep restore points. | Yes | 0/1 |
RetainLimitType | String | Defines whether to keep a specific number of restore points or restore points created during a specific number of days: Possible values:
| Yes | 0/1 |
Note |
Long-term (GFS) retention policy options must be defined in the GFSRetentionPolicy element of the BackupJobInfo section in the request body. |
GFS retention policy options are provided in the following format:
XML Representation
<GfsRetentionPolicy Enabled="true"> |
JSON Representation
"GfsRetentionPolicy": { |
You can define the following GFS retention policy options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Weekly | WeeklyOptionsInfoType | Weekly GFS retention policy options set for the job. For details, see Weekly GFS Retention Policy Options. | Yes | 0/1 |
Monthly | MonthlyOptionsInfoType | Monthly GFS retention policy options set for the job. For details, see Monthly GFS Retention Policy Options. | Yes | 0/1 |
Yearly | YearlyOptionsInfoType | Yearly GFS retention policy options set for the job. For details, see Yearly GFS Retention Policy Options. | Yes | 0/1 |
Weekly GFS Retention Policy Options
Weekly GFS retention policy options are provided in the following format:
XML Representation
<Weekly> |
JSON Representation
"Weekly": { |
You can define the following weekly GFS retention policy options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether weekly GFS retention policy settings are enabled. | Yes | 0/1 |
RetentionPeriod | Int64 | Number of weeks to keep full backups for archival purposes. | Yes | 0/1 |
SelectedDay | String | Day of the week when the full backup that will be kept for archival purposes is created. Possible values:
| Yes | 0/1 |
Monthly GFS Retention Policy Options
Monthly GFS retention policy options are provided in the following format:
XML Representation
<Monthly> |
JSON Representation
"Monthly": { |
You can define the following monthly GFS retention policy options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether monthly GFS retention policy settings are enabled. | Yes | 0/1 |
RetentionPeriod | Int64 | Number of months to keep full backups for archival purposes. | Yes | 0/1 |
SelectedWeek | String | Week of the month when the full backup that will be kept for archival purposes is created. Possible values:
| Yes | 0/1 |
Yearly GFS Retention Policy Options
Yearly GFS retention policy options are provided in the following format:
<Yearly> |
JSON Representation
"Yearly": { |
You can define the following yearly GFS retention policy options for the job:
Element | Type | Description | Modifiable | Min/Max Occurrence |
---|---|---|---|---|
Enabled | Boolean | Defines whether yearly GFS retention policy settings are enabled. | Yes | 0/1 |
RetentionPeriod | Int64 | Number of years to keep full backups for archival purposes. | Yes | 0/1 |
SelectedMonth | String | Month when the full backup that will be kept for archival purposes is created. Possible values:
| 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 number of retries to 5 for the job having ID 78c3919c-54d7-43fe-b047-485d3566f11f.
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-1"> |
To track the status of the operation, send the GET HTTP request to the URL of the received task resource:
Request: GET https://localhost:9398/api/tasks/task-1
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-1"> |