I'm sure this has been asked before but I'm unable to find the answer. I have 1 device (example) All I want to do through the API is get just the single ID from the device. Just that one device without running through every device and trying to grep out the one I need. Is there away to just query the device name and get the device ID from it?

Thanks


Article Comments

Dear Jefferypk,

there can be multiple devices with the same name or address, so a query from device name is not possible. Instead, the whole device list has to be extracted:

/api/table.xml?content=devices&columns=objid,name,host,status,message&count=*

It is possible to narrow down by probe or devicegroup if that one is know, using the paramter

&id=1

1 is the local probe. Use the object ID for other nodes to only extract devices within that node.


Jul, 2018 - Permalink