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

Grouping Operators

The query string may contain conditions grouped using the grouping operators “(“ and “)”. The grouping operators help the client to form complex queries that contain a number of “field-value” pairs.

For example, using the query below, the client can get a list of jobs that meets the following criteria:

  • Backup jobs with scheduling options enabled
  • Replication jobs with scheduling options disabled

Request:

GET http://localhost:9399/api/query?type=job&filter=(jobtype==replica;scheduleconfigured==false),(jobtype==backup;scheduleconfigured==true)

 

Response:

200 Success

 

Response Body:

<QueryResult xmlns="http://www.veeam.com/ent/v1.0">
 <Refs>
   <Ref Type="JobReference" Href="http://localhost:9399/api/jobs/795f2f57-6cc0-4c33-8c1b-bd7cd5df9aa7" Name="Fileserver Backup" UID="urn:veeam:Job:795f2f57-6cc0-4c33-8c1b-bd7cd5df9aa7">
     <Links>
       <Link Rel="Up" Type="BackupServerReference" Href="http://localhost:9399/api/backupServers/15942270-fb56-4dcc-96e9-5f80e4725a15" Name="localhost" />
       <Link Rel="Alternate" Type="Job" Href="http://localhost:9399/api/jobs/795f2f57-6cc0-4c33-8c1b-bd7cd5df9aa7?format=Entity" Name="Fileserver Backup" />
       <Link Rel="Down" Type="BackupJobSessionReferenceList" Href="http://localhost:9399/api/jobs/795f2f57-6cc0-4c33-8c1b-bd7cd5df9aa7/backupSessions" />
     </Links>
   </Ref>
   <Ref Type="JobReference" Href="http://localhost:9399/api/jobs/6c1375ec-e666-4b65-9537-d2d4b4b64dc8" Name="DC Replication" UID="urn:veeam:Job:6c1375ec-e666-4b65-9537-d2d4b4b64dc8">
     <Links>
       <Link Rel="Up" Type="BackupServerReference" Href="http://localhost:9399/api/backupServers/15942270-fb56-4dcc-96e9-5f80e4725a15" Name="localhost" />
       <Link Rel="Alternate" Type="Job" Href="http://localhost:9399/api/jobs/6c1375ec-e666-4b65-9537-d2d4b4b64dc8?format=Entity" Name="DC Replication" />
       <Link Rel="Down" Type="ReplicaJobSessionReferenceList" Href="http://localhost:9399/api/jobs/6c1375ec-e666-4b65-9537-d2d4b4b64dc8/replicaSessions" />
     </Links>
   </Ref>
 </Refs>
 <PagingInfo PagesCount="1" PageSize="100" PageNum="1">
   <Links>
     <Link Rel="First" Href="http://localhost:9399/api/query?type=job&filter=(jobtype%3d%3dreplica%3b+scheduleconfigured%3d%3dtrue)%2c(jobtype%3d%3dbackup%3bname%3d%3d%22FileServer+Backup%22)&pageSize=100&page=1" />
     <Link Rel="Last" Href="http://localhost:9399/api/query?type=job&filter=(jobtype%3d%3dreplica%3b+scheduleconfigured%3d%3dtrue)%2c(jobtype%3d%3dbackup%3bname%3d%3d%22FileServer+Backup%22)&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.