using filters in a querie to get partial string match

RESTful knowledge exchange

using filters in a querie to get partial string match

Veeam Logoby virtualGain » Tue Jun 13, 2017 11:58 pm

Is this possible? I tried using >= as the comparative operator to find any job name with a partial string match. Hoping to not have to write the regex myself and loop through everything.
virtualGain
Novice
 
Posts: 5
Liked: 2 times
Joined: Wed Aug 26, 2015 5:13 pm
Full Name: Michael Degain

Re: using filters in a querie to get partial string match

Veeam Logoby v.Eremin » Wed Jun 14, 2017 3:33 pm

You can use these comparison operators to have partial string match. Say, there is a tenant account named "Johny", if you use this filter (name>"joh") within your query, the account named "Johny" will be found. Thanks.
v.Eremin
Veeam Software
 
Posts: 13734
Liked: 1027 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: using filters in a querie to get partial string match

Veeam Logoby virtualGain » Wed Jun 14, 2017 4:42 pm

Any idea why this query: svc_url='/query?type=job&filter=(jobtype==backup;scheduleconfigured==true;name>"TRW")'

returns this job (1 example):

Code: Select all
<Ref Href="http://veeambackup.myco.net:9399/api/jobs/be89ba81-4634-4fba-8387-0a0bce3dc42d" Name="WAB_LNX_30D_00W_00M_00Y_REP_0900" Type="JobReference" UID="urn:veeam:Job:be89ba81-463xxxxce3dc42d">
<Links>
<Link Href="http://veeambackup.myco.net:9399/api/backupServers/73becae6-da56-47xxxx1f8" Name="myco.net" Rel="Up" Type="BackupServerReference"/>
<Link Href="http://veeambackup.myco.net:9399/api/jobs/be89ba81-46xxx-0a0bce3dc42d?format=Entity" Name="WAB_LNX_30D_00W_00M_00Y_REP_0900" Rel="Alternate" Type="Job"/>
<Link Href="http://veeambackup.myco.net:9399/api/jobs/be89ba81-4xxx3dc42d/backupSessions" Rel="Down" Type="BackupJobSessionReferenceList"/>
</Links>
</Ref>
virtualGain
Novice
 
Posts: 5
Liked: 2 times
Joined: Wed Aug 26, 2015 5:13 pm
Full Name: Michael Degain


Return to RESTful API



Who is online

Users browsing this forum: No registered users and 1 guest