Hello everyone.
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)
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Apr 06, 2023 11:37 am
- Contact:
-
- VeeaMVP
- Posts: 678
- Liked: 364 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 *.
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">
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">
-
- 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 *.
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,
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,
Who is online
Users browsing this forum: No registered users and 1 guest