Hi, I want to export all group devices with their GPS location. How can i do that?

Thanks in advance


Article Comments

Hi Luis,

You can find the documentation of the API in your webinterface under "Setup > PRTG API".
To retrieve your desired values, you can use the following API call:

/api/table.csv?content=devices&columns=name,host,location=raw&count=*

This will export all devices with their location into a csv file.


Best regards.


Jun, 2017 - Permalink

Thanks Dariusz, This export the sensors, but what i need is the groups. is it possible?

Thanks in advance.


Jun, 2017 - Permalink

Hi luis,

The API call actually exports all devices. To export the groups, could have included this in the first answer, use the following call:

/api/table.csv?content=groups&columns=objid,name,location=raw&count=*&sortby=name

Please note, when you have entered GPS coordinates into the group settings, then you will see the GPS coordinates. But, if you have entered addresses, then you only will see the entered address and no GPS coordinates.


Best regards.


Jul, 2017 - Permalink

Hi again, I just tested this solution you share but it's not working. No GPS coordinates or location are show.

we are in last version 17.2.32.2279+

Thanks


Jul, 2017 - Permalink

Hi Luis,

As described before:

Please note, when you have entered GPS coordinates into the group settings, then you will see the GPS coordinates. But, if you have entered addresses, then you only will see the entered address and no GPS coordinates.

Have you entered a location or GPS coordinates in the settings of a certain group/device? If not, then it is clear why they are empty. :)

Best regards.


Jul, 2017 - Permalink

Hi again, No GPS coordinates or Location are exported by this API.

Thanks.


Jul, 2017 - Permalink

Hi Luis,

Have you actually entered any GPS-data or location data into the group/device settings?

Best regards


Jul, 2017 - Permalink

Hi Dariusz, Yes, i have the location data introduced at group settings.


Jul, 2017 - Permalink

Hi there,

Strange, can you check if they are displayed for the devices instead of the groups?

/api/table.csv?content=devices&columns=objid,name,location=raw&count=*&sortby=name

Best regards.


Jul, 2017 - Permalink