Optional Parameters

The query parameters component [&ParamName=ParamValue] is an optional part of the query. Optional parameters are specified as ParamName=ParamValue pairs. Multiple ParamName=ParamValue pairs are separated with the ‘&’ (ampersand) character.

When building a query string, you can use the following optional query parameters:

Important

The ParamName=ParamValue 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””.

Example

Using the query below, you can get a list of all job entities sorted in the ascending order. This query contains two ParamName=ParamValue pairs:

  • format=Entities — to display entities of resources, not references
  • sortAsc=Name — to sort jobs in the ascending order by the Name parameter

 

Request:

GET https://localhost:9398/api/query?type=job&format=Entities&sortAsc=Name

 

Response:

200 OK

 

Response Body:

<QueryResult xmlns="http://www.veeam.com/ent/v1.0">
<Entities>
   <Jobs>
     <Job Type="Job" Href="https://localhost:9398/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="https://localhost:9398/api/backupServers/21a631e0-af7f-46ba-afbd-273de2e6fd4a" Name="localhost" />
         <Link Rel="Alternate" Type="JobReference" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5" Name="DC Backup" />
         <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/backupSessions" />
         <Link Rel="Down" Type="ObjectInJobList" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/includes" />
         <Link Rel="Edit" Type="JobReference" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5" Name="DC Backup" />
         <Link Rel="Create" Type="ObjectInJob" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5/includes" />
         <Link Rel="Start" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=start" />
         <Link Rel="Stop" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=stop" />
         <Link Rel="Retry" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=retry" />
         <Link Rel="Clone" Href="https://localhost:9398/api/jobs/568c42ce-eb11-4140-92cf-39ab36712bf5?action=clone" />
         <Link Rel="ToggleScheduleEnabled" Href="https://localhost:9398/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="https://localhost:9398/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>
               <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="https://localhost:9398/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="https://localhost:9398/api/backupServers/21a631e0-af7f-46ba-afbd-273de2e6fd4a" Name="localhost" />
         <Link Rel="Alternate" Type="JobReference" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf" Name="Exchange Backup" />
         <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/backupSessions" />
         <Link Rel="Down" Type="ObjectInJobList" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/includes" />
         <Link Rel="Edit" Type="JobReference" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf" Name="Exchange Backup" />
         <Link Rel="Create" Type="ObjectInJob" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf/includes" />
         <Link Rel="Start" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=start" />
         <Link Rel="Stop" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=stop" />
         <Link Rel="Retry" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=retry" />
         <Link Rel="Clone" Href="https://localhost:9398/api/jobs/e5d94cae-4b8a-4f3d-97a5-43cb95b67bcf?action=clone" />
         <Link Rel="ToggleScheduleEnabled" Href="https://localhost:9398/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="https://localhost:9398/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>
               <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="https://localhost:9398/api/query?type=job&format=entities&sortAsc=name&pageSize=100&page=1" />
     <Link Rel="Last" Href="https://localhost:9398/api/query?type=job&format=entities&sortAsc=name&pageSize=100&page=1" />
   </Links>
 </PagingInfo>
</QueryResult>

Page updated 9/1/2023

Page content applies to build 12.2.0.334