This is an archive version of the document. To get the most up-to-date information, see the current version.

Query Syntax

In Veeam Backup Enterprise Manager RESTful API, the query component is added to the base URL. The query string has the following format:

http://<EnterpriseManager>:9399/api/query?type=<QueryType>[&ParamName=ParamValue]

where:

  • http://<EnterpriseManager>:9399/api/ is the base URL for Veeam Backup Enterprise Manager RESTful API.
  • query?type identifies the beginning of the query string. The query?type element is added to the base URL.
  • <QueryType> identifies the resource type for which the query is executed, for example, BackupServer or Job.
  • [ParamName=ParamValue]contains parameters passed to the query.

query?type=<QueryType>

The query?type component is a required part of the query. You can define the query for the following types of resources:

  • AgentRestorePoint
  • AgentBackupJob
  • AgentProtectionGroup
  • DiscoveredComputer
  • BackupServer
  • Repository
  • Job
  • Backup
  • BackupFile
  • FailoverPlan
  • RestorePoint
  • VmRestorePoint
  • vAppRestorePoint
  • Replica
  • VmReplicaPoint
  • HierarchyRoot
  • ManagedServer
  • BackupJobSession
  • ReplicaJobSession
  • RestoreSession
  • BackupTaskSession
  • ReplicaTaskSession
  • WanAccelerator
  • VCloudOrganizationConfig
  • VsphereSelfServiceConfig
  • CloudGateway
  • CloudGatewayPool
  • CloudTenant
  • CloudSubtenant
  • CloudHardwarePlan
  • CloudPublicIpAddress
  • CloudFailoverPlan
  • CloudVmReplicaPoint
  • CloudReplica
  • VlanConfiguration
  • CloudFailoverSession
  • ObjectInJob
  • Task
  • Credentials
  • Passwords

[ParamName=ParamValue]

The query parameters component [ParamName=ParamValue] is an optional part of the query. Using this component, you can pass arguments to the query. The query parameter component is separated with the ‘&’ (ampersand) character from the rest of the query string.

Parameters are passed to the query as "field=value" pairs. The query string can contain an unlimited number of ‘field=value’ pairs. Multiple "field=value" pairs are separated with the ‘&’ (ampersand) character.

Query Syntax Important!

The "field=value" pair must be presented as a string of the [A-Za-z_0-9] type without spaces. Stings containing spaces must be includes in quotes, for example: /query?type=job&filter=name==”Fileserver Backup”. If the string contains spaces and is not included in quotes, the server will ignore spaces in the string.

If the string itself contains a quote character, the quote must be doubled. For example, if the job name is “Backup”, the query string will have the following format: /query?type=job&filter=name==””Backup””.

For example, using the query below, you can get a list of all job entities sorted in the ascending order. This query contains two "field=value" pairs:

  • format=Entities’ (to display entities of resources, not references)
  • sortAsc=name’ (to sort jobs in the ascending order by the Name field)

Request:

GET http://localhost:9399/api/query?type=job&format=entities&sortAsc=name

 

Response:

200 Success

 

Response Body:

<QueryResult xmlns="http://www.veeam.com/ent/v1.0">
<Entities>
   <Jobs>
     <Job Type="Job" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?format=Entity" Name="DC Backup" UID="urn:veeam:Job:568c42ce-eb11-4140-92cf-39ab36712bf5">
       <Links>
         <Link Rel="Up" Type="BackupServerReference" Href="http://localhost:9399/api/backupServers/21a631e0-af7f-46ba-afbd-273de2e6fd4a" Name="localhost" />
         <Link Rel="Alternate" Type="JobReference" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5" Name="DC Backup" />
         <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/backupSessions" />
         <Link Rel="Down" Type="ObjectInJobList" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/includes" />
         <Link Rel="Edit" Type="JobReference" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5" Name="DC Backup" />
         <Link Rel="Create" Type="ObjectInJob" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/includes" />
         <Link Rel="Start" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=start" />
         <Link Rel="Stop" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=stop" />
         <Link Rel="Retry" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=retry" />
         <Link Rel="Clone" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=clone" />
         <Link Rel="ToggleScheduleEnabled" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=toggleScheduleEnabled" />
       </Links>
       <JobType>Backup</JobType>
       <Platform>VMware</Platform>
       <Description>Created by VEEAM\administrator at 7/30/2013 2:23:39 PM.</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+04:00</Time>
         </OptionsDaily>
         <OptionsMonthly Enabled="false">
           <Time>22:00:00.0000000+04: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 Type="ObjectInJob" Href="http://localhost:9399/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/includes/9a3e17b6-00df-4cbc-8816-b4ae568983e3">
               <ObjectInJobId>9a3e17b6-00df-4cbc-8816-b4ae568983e3</ObjectInJobId>
               <HierarchyObjRef>urn:VMware:Vm:4852fc4f-9646-41e6-988d-60ea9b85bc39.vm-10537</HierarchyObjRef>
               <Name>win-tw4</Name>
               <DisplayName>win-tw4</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 Type="Job" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?format=Entity" Name="Exchange Backup" UID="urn:veeam:Job:e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf">
       <Links>
         <Link Rel="Up" Type="BackupServerReference" Href="http://localhost:9399/api/backupServers/21a631e0-af7f-46ba-afbd-273de2e6fd4a" Name="localhost" />
         <Link Rel="Alternate" Type="JobReference" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf" Name="Exchange Backup" />
         <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/backupSessions" />
         <Link Rel="Down" Type="ObjectInJobList" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/includes" />
         <Link Rel="Edit" Type="JobReference" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf" Name="Exchange Backup" />
         <Link Rel="Create" Type="ObjectInJob" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/includes" />
         <Link Rel="Start" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=start" />
         <Link Rel="Stop" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=stop" />
         <Link Rel="Retry" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=retry" />
         <Link Rel="Clone" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=clone" />
         <Link Rel="ToggleScheduleEnabled" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=toggleScheduleEnabled" />
       </Links>
       <JobType>Backup</JobType>
       <Platform>VMware</Platform>
       <Description>Created by VEEAM\administrator at 7/30/2013 2:23:39 PM.</Description>
       <ScheduleConfigured>false</ScheduleConfigured>
       <ScheduleEnabled>false</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+04:00</Time>
         </OptionsDaily>
         <OptionsMonthly Enabled="false">
           <Time>22:00:00.0000000+04: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 Type="ObjectInJob" Href="http://localhost:9399/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/includes/0461a3f8-4d3e-42d7-8c91-f28e959278f2">
               <ObjectInJobId>0461a3f8-4d3e-42d7-8c91-f28e959278f2</ObjectInJobId>
               <HierarchyObjRef>urn:VMware:Vm:4852fc4f-9646-41e6-988d-60ea9b85bc39.vm-10537</HierarchyObjRef>
               <Name>win-tw4</Name>
               <DisplayName>win-tw4</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>
    ...
   </Jobs>
 </Entities>
 <PagingInfo PagesCount="1" PageSize="100" PageNum="1">
   <Links>
     <Link Rel="First" Href="http://localhost:9399/api/query?type=job&format=entities&sortAsc=name&pageSize=100&page=1" />
     <Link Rel="Last" Href="http://localhost:9399/api/query?type=job&format=entities&sortAsc=name&pageSize=100&page=1" />
   </Links>
 </PagingInfo>
</QueryResult>

 

I want to report a typo

There is a misspelling right here:

 

I want to let the Veeam Documentation Team know about that.