Help Center
Choose product document...
Veeam Backup & Replication 9.5 [Archived]
RESTful API Reference

(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

PUT http://<Enterprise-Manager>:9399/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. 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"?>
<Job Type="Job" Href="http://localhost:9399/api/jobs/6c86549b-154f-4566-a76e-52bd64a33aea?format=Entity" Name="DC Backup" UID="urn:veeam:Job:6c86549b-154f-4566-a76e-52bd64a33aea" xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Description>DC Backup Job</Description>
 <ScheduleConfigured>true</ScheduleConfigured>
 <ScheduleEnabled>true</ScheduleEnabled>
</Job>

 

(PUT)/jobs/{ID}?action=edit Note:

In the request body, you can send all resource properties or only those properties that you want to edit.

Job Scheduling Options

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 and backup copy 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
Type

Daily backup options set for the job. To learn more, see Daily Backup Scheduling Options.

Yes

0/1

OptionsMonthly

JobScheduleMonthly
OptionsType

Monthly backup options set for the job. To learn more, see Monthly Backup Scheduling Options.

Yes

0/1

OptionsPeriodically

JobSchedulePeriodically
OptionsType

Periodic backup options set for the job. To learn more, see Periodic Backup Scheduling Options.

Yes

0/1

OptionsContinuous

JobScheduleContinuousOptionsType

Continuous backup options set for the job. To learn more, see Continuous Backup Scheduling Options.

Yes

0/1

OptionsBackupWindow

JobScheduleBackupWindow
OptionsType

Backup window options set for the job. To learn more, see Backup Window Options.

Yes

0/1

OptionsDaisyChaining

JobScheduleDaisyChaining
OptionsType

Defines whether backup job chaining is enabled for the job. To learn more, see Job Chaining Options

Yes

0/1

 

(PUT)/jobs/{ID}?action=edit Note:

Scheduling options must be defined in the JobScheduleOptions section of the request body (see Example).

Retry Options

Retry options are provided in the following format:

<RetryOptions>
 <RetryTimes>3</RetryTimes>
 <RetryTimeout>10</RetryTimeout>
 <RetrySpecified>true</RetrySpecified>
</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">
 <Kind>Everyday</Kind>
 <Days>Sunday</Days>
 <Days>Monday</Days>
 <Days>Tuesday</Days>
 <Days>Wednesday</Days>
 <Days>Thursday</Days>
 <Days>Friday</Days>
 <Days>Saturday</Days>
 <Time>22:00:00.0000000-07:00</Time>
</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:

  • Everyday
  • WeekDays
  • SelectedDays

Yes

0/1

Days

DaysOfWeekEnumeration

Days on which the job must be launched. Possible values:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

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">
 <Time>22:00:00.0000000-07:00</Time>
 <DayNumberInMonth>Fourth</DayNumberInMonth>
 <DayOfWeek>Saturday</DayOfWeek>
 <Months>January</Months>
 <Months>February</Months>
 <Months>March</Months>
 <Months>April</Months>
 <Months>May</Months>
 <Months>June</Months>
 <Months>July</Months>
 <Months>August</Months>
 <Months>September</Months>
 <Months>October</Months>
 <Months>November</Months>
 <Months>December</Months>
</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

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:

  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

Yes

0/unbounded

Months

JobScheduleMonthEnumeration

Months on which the job must be launched. Possible values:

  • January
  • February
  • March
  • April
  • May
  • June
  • July
  • August
  • September
  • October
  • November
  • December

Yes

0/unbounded

Periodic Backup Scheduling Options

Periodic scheduling options are provided in the following format:

<OptionsPeriodically Enabled="false">
 <Kind>Hours</Kind>
 <FullPeriod>1</FullPeriod>
 <Schedule>
   <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>
   <Day Name="Monday">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>
   <Day Name="Tuesday">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>
   <Day Name="Wednesday">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>
   <Day Name="Thursday">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>
   <Day Name="Friday">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>
   <Day Name="Saturday">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>
 </Schedule>
</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:

  • Hours
  • Minutes

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
Type

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:

<OptionsContinuous Enabled="false">
 <Schedule>
   <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>
   <Day Name="Monday">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>
   <Day Name="Tuesday">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>
   <Day Name="Wednesday">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>
   <Day Name="Thursday">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>
   <Day Name="Friday">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>
   <Day Name="Saturday">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>
 </Schedule>
</OptionsContinuous>

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
Type

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

Backup window options are provided in the following format:

<OptionsBackupWindow Enabled="false">
 <TimePeriods>
   <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>
   <Day Name="Monday">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>
   <Day Name="Tuesday">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>
   <Day Name="Wednesday">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>
   <Day Name="Thursday">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>
   <Day Name="Friday">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>
   <Day Name="Saturday">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>
 </TimePeriods>
</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
Type

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

Job chaining options are provided in the following format:

<OptionsDaisyChaining Enabled="true">
<PreviousJobUid></PreviousJobUid>
</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

URN

ID of the previous job in the chain, for example: veeam:Job:da736815-4fea-4c8e-b0e1-5ecdbca1c512

Yes

1/1

Query Parameters

None.

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: application/xml.

Response Body

In the response body, Veeam Backup Enterprise Manager returns an ID of the task that has been created to perform the requested action, and the task state. You can check the operation results by sending the GET HTTP request to the URL of the task resource.

Additionally, Veeam Backup Enterprise Manager returns a link to the task deletion operation. You can send the GET HTTP request to the URL in the link to stop the task execution.

Example

The example below changes the number of retries to 5 for the job having ID 78c3919c-54d7-43fe-b047-485d3566f11f.

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"?>
<Job Type="Job" Href="http://localhost:9399/api/jobs/6c86549b-154f-4566-a76e-52bd64a33aea?format=Entity" Name="SQL Backup HV" UID="urn:veeam:Job:d1b85018-2769-45be-89bc-03f66b60e6cb" xmlns="http://www.veeam.com/ent/v1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <JobScheduleOptions>
   <RetryOptions>
     <RetryTimes>5</RetryTimes>
   </RetryOptions>
 </JobScheduleOptions>
</Job>

 

Response:

202 Accepted

 

Response Body:

<Task xmlns="http://www.veeam.com/ent/v1.0" Type="Task" Href="http://localhost:9399/api/tasks/task-1">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Running</State>
 <Operation>EditJob</Operation>
</Task>

To trace the status of the operation, send the GET HTTP request to the URL of the received task resource:

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">
 <Links>
   <Link Rel="Delete" Type="Task" Href="http://localhost:9399/api/tasks/task-1" />
 </Links>
 <TaskId>task-1</TaskId>
 <State>Finished</State>
 <Operation>EditJob</Operation>
 <Result Success="true">
   <Message>Ok</Message>
 </Result>
</Task>

 

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Backup Explorers User Guide

Backup and Restore of SQL Server Databases

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide