-
- Lurker
- Posts: 2
- Liked: 1 time
- Joined: Dec 23, 2011 4:56 pm
- Full Name: Anders Westerberg
- Contact:
Veeam ONE 12.0 RestAPI 2.1 filter with item property
Hi
Been trying for a few hours to figure out how to build the get request to filter multiple expressions when querying the Veeam ONE RestAPI. Using info from here: https://helpcenter.veeam.com/docs/one/r ... ml?ver=120
Using this endpoint: /api/v2.1/alarms/triggeredAlarms
I'm just trying to filter out active alarms.
These ones work:
filter={"property":"status","operation":"notequals","collation":"ignorecase","value":"resolved"}
filter={"property":"status","operation":"notequals","collation":"ignorecase","value":"acknowledged"}
But when trying to combine those into one query like this:
filter={"property":"status","operation":"not","collation":"ignorecase","items":[{"operation":"equals","value":"resolved"},{"operation":"equals","value":"acknowledged"}]}
I receive the "SortAndFindParseException" error and I cant figure out what I'm doing wrong , anyone have a clue?
/anders
Been trying for a few hours to figure out how to build the get request to filter multiple expressions when querying the Veeam ONE RestAPI. Using info from here: https://helpcenter.veeam.com/docs/one/r ... ml?ver=120
Using this endpoint: /api/v2.1/alarms/triggeredAlarms
I'm just trying to filter out active alarms.
These ones work:
filter={"property":"status","operation":"notequals","collation":"ignorecase","value":"resolved"}
filter={"property":"status","operation":"notequals","collation":"ignorecase","value":"acknowledged"}
But when trying to combine those into one query like this:
filter={"property":"status","operation":"not","collation":"ignorecase","items":[{"operation":"equals","value":"resolved"},{"operation":"equals","value":"acknowledged"}]}
I receive the "SortAndFindParseException" error and I cant figure out what I'm doing wrong , anyone have a clue?
/anders
-
- Veeam Software
- Posts: 1372
- Liked: 619 times
- Joined: Jul 17, 2015 6:54 pm
- Full Name: Jorge de la Cruz
- Contact:
Re: Veeam ONE 12.0 RestAPI 2.1 filter with item property
Hello Anders,
I have asked internally to try to reproduce it, and will reply as soon as I hear back from the team.
Thanks so much!
I have asked internally to try to reproduce it, and will reply as soon as I hear back from the team.
Thanks so much!
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software
@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
Senior Product Manager | Veeam ONE @ Veeam Software
@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
-
- Veeam Software
- Posts: 1372
- Liked: 619 times
- Joined: Jul 17, 2015 6:54 pm
- Full Name: Jorge de la Cruz
- Contact:
Re: Veeam ONE 12.0 RestAPI 2.1 filter with item property
Hello Anders,
I have been playing with this, this has gave me some results that might be what you are expecing perhaps, give it a try:
Paste it like that on the Filter field
I have been playing with this, this has gave me some results that might be what you are expecing perhaps, give it a try:
Code: Select all
{"operation":"and","items":[{"operation":"not","items":[{"property":"status","operation":"equals","collation":"ignorecase","value":"resolved"}]},{"operation":"not","items":[{"property":"status","operation":"equals","collation":"ignorecase","value":"acknowledged"}]}]}
Jorge de la Cruz
Senior Product Manager | Veeam ONE @ Veeam Software
@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
Senior Product Manager | Veeam ONE @ Veeam Software
@jorgedlcruz
https://www.jorgedelacruz.es / https://jorgedelacruz.uk
vExpert 2014-2024 / InfluxAce / Grafana Champion
-
- Lurker
- Posts: 2
- Liked: 1 time
- Joined: Dec 23, 2011 4:56 pm
- Full Name: Anders Westerberg
- Contact:
Re: Veeam ONE 12.0 RestAPI 2.1 filter with item property
Thank you, that seems to do exactly what I want!
-
- Veeam Software
- Posts: 641
- Liked: 168 times
- Joined: Nov 01, 2016 11:26 am
- Contact:
Re: Veeam ONE 12.0 RestAPI 2.1 filter with item property
Hello Anders,
There are also some options to try.
Grouping with "and"
Grouping with "not"
It seems to me in your case it would be simpler to use the usual filter, but include only the necessary values
Thanks
PS The documentation page example will be updated soon
There are also some options to try.
Grouping with "and"
Code: Select all
{"operation":"and","items":[{"property":"status","operation":"notequals","collation":"ignorecase","value":"resolved"}, {"property":"status","operation":"notequals","collation":"ignorecase","value":"acknowledged"}]}
Code: Select all
{"operation": "not", "items": [{ "operation": "or", "items": [{ "property": "status", "operation": "equals", "collation": "ignorecase", "value": "acknowledged"}, {"property": "status", "operation": "equals", "collation": "ignorecase", "value": "resolved" }]}]}
Code: Select all
{"property":"status","value":["Information","Error", "Warning"],"operation":"in","collation":"ignorecase"}
PS The documentation page example will be updated soon
Who is online
Users browsing this forum: No registered users and 8 guests