I need a list of the devices I added most recently...
4 Replies
This URL gives you a list of devices, sorted by "objectID" (descending)
https://prtg.ip/devices.htm?sortby=-objid&columns=objid,probegroupdevice,checkbox&id=0
Since new object IDs are always assigned in increasing numerical order you will get a list of the most recently added devices by sorting all devices using the descending object id.
- Note 1: The "checkbox" column enables the multiedit feature for this list.
- Note 2: The "id=" string can be used to filter the devices for a specific group.
- Note 3: add the following strings to the "columns" parameter to get the sensor counts for each device
&columns=objid,probegroupdevice,downsens,downacksens,upsens,warnsens,pausedsens,unusualsens,undefinedsens,checkbox
Created on Feb 9, 2010 3:29:30 PM by
Dirk Paessler [Founder Paessler AG]
(11,025)
●3
●6
Last change on Feb 9, 2010 3:34:43 PM by
Dirk Paessler [Founder Paessler AG]
(11,025)
●3
●6
The desired functionality is realised with PRTG's application programming interface. For other HTTP API functions, please see Introduction to the PRTG API Interface
Created on Feb 9, 2010 3:38:48 PM by
Daniel Zobel [Product Manager]
Last change on Feb 12, 2010 8:59:23 AM by
Daniel Zobel [Product Manager]
Unfortunately, the answer doesn't work because sortby incorrectly sorts objid alphabetically rather than numerically. For example:
https://172.16.2.235/api/table.xml?content=devices&output=xml&columns=objid&sortby=objid&username=admin&passhash=123456789
Results in:
<?xml version="1.0" encoding="UTF-8"?>
<devices totalcount="20" listend="1">
<prtg-version>18.4.46.1754</prtg-version>
<item>
<objid>10359</objid>
</item>
<item>
<objid>10360</objid>
</item>
<item>
<objid>2419</objid>
</item>
<item>
<objid>2470</objid>
</item>
<item>
<objid>2517</objid>
</item>
<item>
<objid>2539</objid>
</item>
<item>
<objid>2555</objid>
</item>
<item>
<objid>2561</objid>
</item>
<item>
<objid>2573</objid>
</item>
<item>
<objid>2574</objid>
</item>
<item>
<objid>2575</objid>
</item>
<item>
<objid>2589</objid>
</item>
<item>
<objid>2605</objid>
</item>
<item>
<objid>2610</objid>
</item>
<item>
<objid>2618</objid>
</item>
<item>
<objid>2620</objid>
</item>
<item>
<objid>2621</objid>
</item>
<item>
<objid>3812</objid>
</item>
<item>
<objid>40</objid>
</item>
<item>
<objid>9445</objid>
</item>
</devices>
As you can see, the most recent object is neither 10359 nor 9945, but 10360.
Please log in or register to enter your reply.
Add comment