• 0

Get LM DeviceGroup Properties REST API

Go to solution Solved by Sarah Terry,


I'm accessing the get device group properties api by using name in filters to get the hostgroupID.

I need a confirmation on get device group properties api. In the response output, is the first "items"(response['data']['tems'][0]) having an ID value is the devicegroupid ?

Is there any other way I can get the hostroupID by just the name or customerprefix of the deployment.


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1
  • LogicMonitor Staff
  • Solution

Hi Vinusha,

If you're trying to get device group id using the device group name, you can make a request like this:

GET /device/groups?filter=name~"NAME"

And the 'id', first field in the items object (as you've noted) is the group id. You can restrict the fields returned in the response using the 'fields' query parameter as well.

You can also get device group id by filtering the request by property, like this:

GET /device/groups?fields=customProperties,name,id&filter=customProperties.name:customer.name,customProperties.value:customerA

This request will return the customProperties, name and id of groups that have a property customer.name set to customerA.

Does this help with what you're trying to do?



Link to post
Share on other sites
  • 0
13 hours ago, Sarah Terry said:

Hi Sarah,

Thank you for the confirmation. I tried using filters on customProperties but few of our customers are not having any custom properties. 



Edited by Vinusha
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.

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.