GET /query?type=AgentBackupJob

Returns a resource representation of a collection of Veeam Agent backup jobs configured in Veeam Backup & Replication on backup servers connected to Veeam Backup Enterprise Manager. For details, see /agents/jobs.

Request

To get a list of Veeam Agent backup jobs, send the GET HTTP request to the query with the type parameter set to AgentBackupJob.

HTTP Request

GET https://<Enterprise-Manager>:9398/api/query?type=AgentBackupJob

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.

Accept

False

Identifies the format of the response. Possible values:

  • application/xml — the client can send this value in the header to accept response in the XML format.
  • application/json — the client must send this value in the header to accept the request in the JSON format.

If the request does not contain the header, the server will return the response in the XML format.

Request Body

None.

Optional Parameters

In the query, you can use the following parameters for filtering and sorting.

Parameter

Type

Description

UID

UidType

UID of the Veeam Agent backup job, for example: urn:veeam:Job:da736815-4fea-4c8e-b0e1-5ecdbca1c512.

Name

String

Name of the Veeam Agent backup job, for example: Linux job.

Description

String

Description of the Veeam Agent backup job.

JobType

String

Defines Veeam Agent backup job type. Possible value: AgentBackup.

Platform

String

Platform for which the job is created. Possible values:

  • AgentForLinux
  • AgentForWindows

ScheduleConfigured

Boolean

Defines whether scheduling options are specified for the job. Possible values:

  • True
  • False

ScheduleEnabled

Boolean

Defines whether schedule is enabled for the job. Possible values:

  • True
  • False

BackupServerUid

UidType

UID of the backup server parent to the Veeam Agent backup job resource, for example: urn:veeam:BackupServer:7445e6ce-86f5-4171-b909-dac209c66563.

BackupServerName

String

Name of the backup server parent to the Veeam Agent backup job resource.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns response code 200 OK.

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:

  • application/xml
  • application/json

Response Body

In the response body, the REST API returns a representation of the /agents/jobs resource collection.

Example

The example below returns an entity resource representation of a collection of Agent backup jobs that process Windows VMs.

Request:

GET https://localhost:9398/api/query?type=AgentBackupJob&format=Entities&filter=Platform==AgentForWindows

 

Request Header:

X-RestSvcSessionId   NDRjZmJkYmUtNWE5NS00MTU2LTg4NjctOTFmMDY5YjdjMmNj

 

Response:

200 OK

 

Response Body:

<QueryResult xmlns="http://www.veeam.com/ent/v1.0">
 <Entities>
   <AgentBackupJob>
     <AgentBackupJob Type="AgentBackupJob" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537?format=Entity" Name="Agent Backup Job 1" UID="urn:veeam:AgentBackupJob:b9b42e54-0e9e-42d0-a2f0-b0138596b537">
       <Links>
         <Link Rel="Up" Type="BackupServerReference" Href="https://localhost:9398/api/backupServers/7445e6ce-86f5-4171-b909-dac209c66563" Name="enterprise06.tech.local" />
         <Link Rel="Alternate" Type="JobReference" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537" Name="Agent Backup Job 1" />
         <Link Rel="Down" Type="ObjectInJobList" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537/includes" />
         <Link Rel="ToggleScheduleEnabled" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537?action=toggleScheduleEnabled" />
         <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537/backupSessions" />
         <Link Rel="Start" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537?action=start" />
         <Link Rel="Stop" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537?action=stop" />
         <Link Rel="Retry" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537?action=retry" />
       </Links>
       <JobType>AgentBackup</JobType>
       <Platform>AgentForWindows</Platform>
       <Description>Created by TECH\administrator</Description>
       <ScheduleConfigured>false</ScheduleConfigured>
       <ScheduleEnabled>true</ScheduleEnabled>
       <JobScheduleOptions>
         <Standart>
           <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+02:00</Time>
             <TimeOffsetUtc>2</TimeOffsetUtc>
           </OptionsDaily>
           <OptionsMonthly Enabled="false">
             <Time>22:00:00.0000000+02:00</Time>
             <TimeOffsetUtc>2</TimeOffsetUtc>
             <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>
             <DayOfMonth>1</DayOfMonth>
           </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">
             <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>
           <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>
         </Standart>
       </JobScheduleOptions>
       <JobInfo>
         <Includes>
           <ObjectInAgentBackupJob Type="ObjectInAgentBackupJob" Href="https://localhost:9398/api/agents/jobs/b9b42e54-0e9e-42d0-a2f0-b0138596b537/includes/17be5cbb-9d43-4a2d-8162-b805be77d320">
             <ObjectInJobId>17be5cbb-9d43-4a2d-8162-b805be77d320</ObjectInJobId>
             <Name>enterprise05.tech.local</Name>
             <DisplayName>enterprise05.tech.local</DisplayName>
             <GuestProcessingOptions>
               <VssSnapshotOptions>
                 <VssSnapshotMode>RequireSuccess</VssSnapshotMode>
                 <IsCopyOnly>false</IsCopyOnly>
               </VssSnapshotOptions>
               <WindowsGuestFSIndexingOptions>
                 <FileSystemIndexingMode>ExceptSpecifiedFolders</FileSystemIndexingMode>
                 <IncludedIndexingFolders />
                 <ExcludedIndexingFolders>
                   <Path>%windir%</Path>
                   <Path>%ProgramFiles%</Path>
                   <Path>%ProgramFiles(x86)%</Path>
                   <Path>%ProgramW6432%</Path>
                   <Path>%TEMP%</Path>
                 </ExcludedIndexingFolders>
               </WindowsGuestFSIndexingOptions>
               <LinuxGuestFSIndexingOptions>
                 <FileSystemIndexingMode>ExceptSpecifiedFolders</FileSystemIndexingMode>
                 <IncludedIndexingFolders />
                 <ExcludedIndexingFolders>
                   <Path>/cdrom</Path>
                   <Path>/dev</Path>
                   <Path>/media</Path>
                   <Path>/mnt</Path>
                   <Path>/proc</Path>
                   <Path>/tmp</Path>
                   <Path>/lost+found</Path>
                 </ExcludedIndexingFolders>
               </LinuxGuestFSIndexingOptions>
               <SqlBackupOptions>
                 <TransactionLogsProcessing>OnlyOnSuccessJob</TransactionLogsProcessing>
                 <BackupLogsFrequencyMin>15</BackupLogsFrequencyMin>
                 <UseDbBackupRetention>true</UseDbBackupRetention>
                 <RetainDays>15</RetainDays>
               </SqlBackupOptions>
               <WindowsCredentialsId />
               <LinuxCredentialsId />
             </GuestProcessingOptions>
           </ObjectInAgentBackupJob>
         </Includes>
         <GuestProcessingOptions>
           <VssSnapshotOptions>
             <VssSnapshotMode>RequireSuccess</VssSnapshotMode>
             <IsCopyOnly>false</IsCopyOnly>
           </VssSnapshotOptions>
           <WindowsGuestFSIndexingOptions>
             <FileSystemIndexingMode>Disabled</FileSystemIndexingMode>
             <IncludedIndexingFolders />
             <ExcludedIndexingFolders />
           </WindowsGuestFSIndexingOptions>
           <LinuxGuestFSIndexingOptions>
             <FileSystemIndexingMode>Disabled</FileSystemIndexingMode>
             <IncludedIndexingFolders />
             <ExcludedIndexingFolders />
           </LinuxGuestFSIndexingOptions>
           <SqlBackupOptions>
             <TransactionLogsProcessing>OnlyOnSuccessJob</TransactionLogsProcessing>
             <BackupLogsFrequencyMin>15</BackupLogsFrequencyMin>
             <UseDbBackupRetention>true</UseDbBackupRetention>
             <RetainDays>15</RetainDays>
           </SqlBackupOptions>
           <WindowsCredentialsId />
           <LinuxCredentialsId />
         </GuestProcessingOptions>
         <GfsRetentionPolicy Enabled="false">
           <Weekly>
             <Enabled>false</Enabled>
             <RetentionPeriod>1</RetentionPeriod>
             <SelectedDay>Sunday</SelectedDay>
           </Weekly>
           <Monthly>
             <Enabled>false</Enabled>
             <RetentionPeriod>1</RetentionPeriod>
             <SelectedWeek>First</SelectedWeek>
           </Monthly>
           <Yearly>
             <Enabled>false</Enabled>
             <RetentionPeriod>1</RetentionPeriod>
             <SelectedMonth>January</SelectedMonth>
           </Yearly>
         </GfsRetentionPolicy>
         <SimpleRetentionPolicy>
           <RetainCycles>7</RetainCycles>
           <RetainDaysToKeep>1</RetainDaysToKeep>
           <RetainLimitType>Days</RetainLimitType>
         </SimpleRetentionPolicy>
       </JobInfo>
     </AgentBackupJob>
   </AgentBackupJob>
 </Entities>
 <PagingInfo PagesCount="1" PageSize="100" PageNum="1">
   <Links>
     <Link Rel="First" Href="https://localhost:9398/api/query?type=AgentBackupJob&format=Entities&filter=Platform==AgentForWindows&pageSize=100&page=1" />
     <Link Rel="Last" Href="https://localhost:9398/api/query?type=AgentBackupJob&format=Entities&filter=Platform==AgentForWindows&pageSize=100&page=1" />
   </Links>
 </PagingInfo>
</QueryResult>

Page updated 9/1/2023

Page content applies to build 12.2.0.334