• 0

API - Alerts - Filter by location


Question

6 answers to this question

Recommended Posts

  • 0

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'

Link to post
Share on other sites
  • 0

Thanks!

There was another page that suggested you could do that. 

https://www.logicmonitor.com/support/rest-api-developers-guide/v1/collector-groups/get-collector-groups/

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.