(PUT)/jobs/{ID}?action=edit
Edits a job having the specified ID.
Request
To edit a job, you need to send the PUT HTTP request to the /jobs/{ID}?action=edit URL.
HTTP Request
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. To learn more, see Authentication and Security. |
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 RESTful API.
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 is 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 parameter. | Yes | 0/1 |
For example:
<?xml version="1.0" encoding="utf-8"?> |
|
In the request body, you can send all resource properties or only those properties that you want to edit. |
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. To learn more, see Retry Options. | Yes | — |
WaitForBackupCompletion | Boolean | This parameter is set for SureBackup jobs. Defines whether the job must wait for the corresponding backup or replication job to launch. | Yes | 0/1 |
BackupCompetitionWaitingPeriodMin | Int64 | Time period in minutes for which the job must wait for the backup completion. | Yes | 0/1 |
OptionsDaily | JobScheduleDailyOptions | Daily backup options set for the job. To learn more, see Daily Backup Scheduling Options. | Yes | 0/1 |
OptionsMonthly | JobScheduleMonthly | Monthly backup options set for the job. To learn more, see Monthly Backup Scheduling Options. | Yes | 0/1 |
OptionsPeriodically | JobSchedulePeriodically | Periodic backup options set for the job. To learn more, see Periodic Backup Scheduling Options. | Yes | 0/1 |
OptionsContinuous | Boolean | Defines whether the job must be run in a continuous manner. | Yes | 0/1 |
OptionsBackupWindow | JobScheduleBackupWindow | Backup window options set for the job. To learn more, see Backup Window Options. | Yes | 0/1 |
OptionsDaisyChaining | JobScheduleDaisyChaining | Defines whether backup job chaining is enabled for the job. To learn more, see Job Chaining Options | Yes | 0/1 |
|
Scheduling options must be defined in JobScheduleOptions section of the request body (see Example). |
Retry options are provided in the following format:
<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:
<OptionsDaily Enabled="true"> |
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 |
Monthly Backup Scheduling Options
Monthly scheduling options are provided in the following format:
<OptionsMonthly Enabled="false"> |
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 | — |
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:
<OptionsPeriodically Enabled="false"> |
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 |
Backup window options are provided in the following format:
<OptionsBackupWindow Enabled="false"> |
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:
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 | URN | ID of the previous job in the chain, for example: veeam:Job:da736815-4fea-4c8e-b0e1-5ecdbca1c512 | Yes | 1/1 |
The server returns the following response to the client.
A successfully completed operation returns response code 202 Accepted.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the request body message: application/xml. |
Request: PUT http://localhost:9399/api/jobs/78c3919c-54d7-43fe-b047-485d3566f11f?action=edit
Request Header: 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="http://localhost:9399/api/tasks/task-1"> |
Request: GET http://localhost:9399/api/tasks/task-1
Request Header: X-RestSvcSessionId NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj
Response: 200 Success
Response Body: <Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1"> |