RESTful knowledge exchange
Post Reply
rencinaspartitio
Lurker
Posts: 2
Liked: never
Joined: Apr 06, 2023 11:37 am
Contact:

Make an api request with backup session on a name with *.

Post by rencinaspartitio »

Hello everyone. :D

I am making this post because I have a problem with a query.

Indeed, I want to recover the result of a backup of a client. For example, the test client:

I have a query already done and it works if I give it the machine name. I have names that are similar for example: test-files, test-tse etc... But sometimes it's the name FQDN because it's linux agents that do the backups.

Here is the request that I would like to set up but that does not work:

https://localhost:9398/api/query?type=B ... ame==*test*

In order to get all the information of the backups containing the name "*test*"

I thank you in advance for your help.

Best regards,

Translated with www.DeepL.com/Translator (free version)
chris.arceneaux
VeeaMVP
Posts: 668
Liked: 359 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: Make an api request with backup session on a name with *.

Post by chris.arceneaux »

Welcome to the Veeam forums!

As you've tested, wildcards are not supported in a filter query. I recommend using a different filter method for your query.

For example, using the JobUid or JobName would limit the responses to items protected in a specific job during that backup session. Then, you could look for the VmDisplayName in the response to validate.

<BackupTaskSession Href="..." Type="BackupTaskSession" Name="..." UID="..." VmDisplayName="dc2.arsano.lab">
rencinaspartitio
Lurker
Posts: 2
Liked: never
Joined: Apr 06, 2023 11:37 am
Contact:

Re: Make an api request with backup session on a name with *.

Post by rencinaspartitio »

Hello,

Thank you very much for your feedback.

However, I did not understand the relationship between the two requests. The initial query I used allows me to retrieve the status of a backup thanks to the name of the virtual machine using the vmdisplayname. I wanted to know if it was possible to use this query using the * operator to say if the vmdisplayname contains a string for example "test".

And in the idea it would recover:

- test1.conso.com
- test2.conso.com
- test3.conso.com

Then I also wondered if it was possible using the /query?type=BackupJobSession. I will do some tests.

Thanks in advance for your answers.

See you soon,

Best regards,
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest