RESTful knowledge exchange
Post Reply
virtualGain
Novice
Posts: 5
Liked: 2 times
Joined: Aug 26, 2015 5:13 pm
Full Name: Michael Degain
Contact:

using filters in a querie to get partial string match

Post by virtualGain » 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.

veremin
Product Manager
Posts: 16710
Liked: 1396 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

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

Post by veremin » 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.

virtualGain
Novice
Posts: 5
Liked: 2 times
Joined: Aug 26, 2015 5:13 pm
Full Name: Michael Degain
Contact:

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

Post by virtualGain » 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>

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests