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

(POST) /jobs/{ID}?action=edit

Starts a job having the specified ID.

Request

To start a job, you need to send the POST HTTP request to the /jobs/{ID}?action=edit URL.

HTTP Request

POST 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:

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 Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512?format=Entity" Type="Job" Name="DC Backup" UID="urn:veeam:Job:da736815-4fea-4c8e-b0e1-5ecdbca1c512" 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">
 <Links>
   <Link Href="http://localhost:9399/api/backupServers/15942270-fb56-4dcc-96e9-5f80e4725a15" Name="localhost" Type="BackupServerReference" Rel="Up"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512" Name="DC Backup" Type="JobReference" Rel="Alternate"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512/backupSessions" Type="BackupJobSessionReferenceList" Rel="Down"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512/includes" Type="ObjectInJobList" Rel="Down"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512" Name="DC Backup" Type="JobReference" Rel="Edit"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512/includes" Type="ObjectInJob" Rel="Create"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512?action=start" Rel="Start"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512?action=stop" Rel="Stop"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512?action=retry" Rel="Retry"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512?action=clone" Rel="Clone"/>
   <Link Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512?action=toggleScheduleEnabled" Rel="ToggleScheduleEnabled"/>
 </Links>
 <JobType>Backup</JobType>
 <Platform>VMware</Platform>
 <Description>Created by  VEEAMBACKUP\Administrator at 8/22/2013 2:47:36 AM.</Description>
 <ScheduleConfigured>false</ScheduleConfigured>
 <ScheduleEnabled>true</ScheduleEnabled>
 <JobScheduleOptions>
   <RetryOptions>
     <RetryTimes>3</RetryTimes>
     <RetryTimeout>10</RetryTimeout>
     <RetrySpecified>true</RetrySpecified>
   </RetryOptions>
   <WaitForBackupCompletion>true</WaitForBackupCompletion>
   <BackupCompetitionWaitingPeriodMin>180</BackupCompetitionWaitingPeriodMin>
   <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>
   <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>
   <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>
   <OptionsContinuous Enabled="false"/>
   <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>
   <OptionsDaisyChaining Enabled="false">
     <PreviousJobUid/>
   </OptionsDaisyChaining>
 </JobScheduleOptions>
 <JobInfo>
   <BackupJobInfo>
     <Includes>
       <ObjectInJob Href="http://localhost:9399/api/jobs/da736815-4fea-4c8e-b0e1-5ecdbca1c512/includes/e310aa12-eff2-41f4-97c8-631b677fc17f" Type="ObjectInJob">
         <ObjectInJobId>e310aa12-eff2-41f4-97c8-631b677fc17f</ObjectInJobId>
         <HierarchyObjRef>urn:VMware:Vm:3e7fea0c-e92d-4459-9842-0304df34c644.vm-2831</HierarchyObjRef>
         <Name>DC</Name>
         <DisplayName>DC</DisplayName>
         <Order>0</Order>
         <GuestProcessingOptions>
           <AppAwareProcessingMode>RequireSuccess</AppAwareProcessingMode>
           <FileSystemIndexingMode>ExceptSpecifiedFolders</FileSystemIndexingMode>
           <IncludedIndexingFolders/>
           <ExcludedIndexingFolders>
             <Path>%windir%</Path>
             <Path>%ProgramFiles%</Path>
             <Path>%TEMP%</Path>
           </ExcludedIndexingFolders>
           <CredentialsId/>
         </GuestProcessingOptions>
       </ObjectInJob>
     </Includes>
     <GuestProcessingOptions>
       <AppAwareProcessingMode>Disabled</AppAwareProcessingMode>
       <FileSystemIndexingMode>Disabled</FileSystemIndexingMode>
       <IncludedIndexingFolders/>
       <ExcludedIndexingFolders>
         <Path>%windir%</Path>
         <Path>%ProgramFiles%</Path>
         <Path>%TEMP%</Path>
       </ExcludedIndexingFolders>
       <CredentialsId/>
     </GuestProcessingOptions>
   </BackupJobInfo>
 </JobInfo>
</Job>

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 jobs. Defines whether the job must wait for the corresponding backup or replication job to launch.

Yes

0/1

BackupCompetitionWaiting
PeriodMin

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

JobSchedulePeriodicallyOptionsType

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

JobScheduleBackupWindowOptionsType

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

Yes

0/1

OptionsDaisyChaining

JobScheduleDaisyChainingOptionsType

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

Yes

0/1

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 daily scheduling 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 daily 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 monthly 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

FullPeriod

Int64

Defines periodic cycles (in hours) 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

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 monthly scheduling 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 monthly scheduling 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

(POST) /jobs/{ID}?action=edit 

NOTE:

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

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:

 

POST 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 Href="http://localhost:9399/api/jobs/d1b85018-2769-45be-89bc-03f66b60e6cb?format=Entity" Type="Job" 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">
   <RetryOptions>
     <RetryTimes>5</RetryTimes>
     <RetryTimeout>10</RetryTimeout>
</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 Backup Explorers User Guide

PowerShell Reference

RESTful API Reference

Veeam Backup FREE Edition User Guide

Veeam Backup for Microsoft Office 365

Veeam ONE Documentation

Veeam Endpoint Backup Documentation

Veeam Management Pack Documentation