Forum Discussion
- Mike_MonizProfessor
How are you filtering alerts by location on the portal exactly?
Ah okay so my companies naming convention has fooled me into thinking that the filter was called location, when I clear the filter it calls the box Group.
When I look in the alert json data I can see monitorObjectGroups is that the same thing? If so I was trying below with no luck
$resourcePath = '/alert/alerts'
$filters = '?filter=severity>:4&filter=monitorObjectGroups.id:4773'- Mike_MonizProfessor
Yep, you're correct. monitorObjectGroups field is: "Information about the groups the object is a member of" as a JSON object, per about-the-alerts-resource.
Try $filters ='?filter=monitorObjectGroups~myspecificlocation'
I'm actually not sure if it's possible to filter within the JSON object itself (like using .id) in the call itself.
Thanks!
There was another page that suggested you could do that.
You can use the '.' character to filter values within an object
But, yes it doesn't mention that on the alert page. I tried the above and just get data that doesn't match, I can write somethingthatdefowontexist and it still return the same data
I have now found that I can go the other way round
$resourcePath = '/device/groups/2846/alerts'
This works will for the devices but I am then going to miss websites that alert.
Related Content
- 2 years ago
- 4 months ago