When using API to list all the groups, location field is shown as empty, even though location is explicitly specified for all groups. It works for devices that inherit locations from these groups (when listing devices with api).
The request I use to get all the groups is: /api/table.json?content=groups&output=json&columns=objid,probe,group,name,location
Sample output: {"objid":2558,"probe":"probe1","group":"remote-office2","name":"remote-office2","location":""}
Article Comments
Dear Arne,
Thank you for your prompt reply! Can you please tell if it is going to be available anytime soon? It would be very handy.
In case if not, I think it it worth updating it in API documentation (Setup->PRTG API->Live Data-> Table "Supported Output Columns"), as it states that this property is supported for both groups and devices.
Thank you!
Best regards, Komil
Oct, 2016 - Permalink
Dear Komil
While the groups have a location property settings which can be inherited down to devices, only the devices themselves have a location. The group setting is just for the inheritance, and cannot be listed.
However you can still read this property for individual groups:
Replace the example object ID 53 with the object ID of the group in question.
Sep, 2016 - Permalink