What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

JSON Api Get all Sensors under Device ID

Votes:

0

Do you have an example of grabbing json data from the api I want to get all sensors / values from a device ID, can't quite figure it out.

api json php

Created on Mar 7, 2022 7:21:42 PM



1 Reply

Votes:

0

Hello,

Thank you for your message.

To get all sensors from a specific device, I invite you to use the following API call by replacing all information in uppercase with the corresponding value:

https://PRTGSERVER/api/table.json?content=sensors&columns=objid,name,probe,group,favorite,lastvalue,device,downtime,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,schedule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*&filter_parentid=DEVICEID&username=PRTGUSER&passhash=PASSHASH

If you want to get the data in CSV format, use this API call instead:

https://PRTGSERVER/api/table.xml?output=csvtable&content=sensors&columns=objid,name,probe,group,favorite,lastvalue,device,downtime,downtimetime,downtimesince,uptime,uptimetime,uptimesince,knowntime,cumsince,lastcheck,lastup,lastdown,schedule,basetype,baselink,notifiesx,intervalx,access,dependency,position,status,comments,priority,message,parentid,tags,type,active&count=*&filter_parentid=DEVICEID&username=PRTGUSER&passhash=PASSHASH

Then, simply rename the generated file to .csv to open it with Excel.

For the passhash, you can find the one linked to your account under Setup > Account Settings > My Account by using the button Show passhash.

If you have questions, do not hesitate.

Regards.

Created on Mar 8, 2022 7:03:03 AM by  Florian Lesage [Paessler Support]




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.