I need to create a data dump for a list of my sensors. I would prefer to export the sensor list into an XML Format, but will settle for .CSV. I'm currently playing around with the API v2, but am having a difficult time in trying to figure out how and where to create the report. Can anyone assist me with this or have experience with creating such a report? It just needs to show the name of the device/sensor and it's associated IP.
How do I export a list of my sensors into an XML or CSV Format?
Modified on 2025-06-10 20:10:02 +0200
Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.
Hello,
Thanks for contacting us.
I believe this might help you in a way to use it as reference:
$response = Invoke-RestMethod -Method 'POST' -Body '{"username": "prtgadmin", "password": "prtgadmin"}' 'http://prtgserver/api/v2/session'
$token = $response.token
$devices = Invoke-RestMethod -Method 'GET' -head @{"Authorization" = "Bearer $token"} 'http://prgtgserver/api/v2/devices'
$values = $devices | Select-Object -Property id,name,host,status_info | Export-Csv file.csv
Regards,
Miguel Aikens
Aug, 2022 - Permalink