I have just gotten started on writing some code to interface with PRTG's API. Do you have any documentation on the basic structure? in regards to sensors,devices,objects.
If i want to get all devices in a group and then get some data on a particular device, what calls do i need to make?
What is a sensor?
if i do /api/table.xml?content=devices.....is this bound by the username/passhash, so i only see devices in that users group?
I have tried the following and i cant add more then 1 field to the names attribute:
/api/getobjectproperty.htm?id=objectid&name=uptime&show=text
based on docs, i should be able to do name,uptime,blah,blah....
I know Im missing some obvious stuff....Thanks in advance.
Article Comments
Here are the answers to your questions:
I have just gotten started on writing some code to interface with PRTG's API. Do you have any documentation on the basic structure? in regards to sensors,devices,objects.
You can see all of the documentation on the API under Setup->API in the web interface
If i want to get all devices in a group and then get some data on a particular device, what calls do i need to make?
You can find the calls to pull the information from sensors, devices and groups from the API.
What is a sensor?
A sensor is an object in PRTG that is used to measure something on a device and then show it in the interface. This is something like a memory sensor that will tell you how much memory is being used on a machine or how much bandwidth is going in or out of an interface.
if i do /api/table.xml?content=devices.....is this bound by the username/passhash, so i only see devices in that users group?
Yes, any API call will be bound by the user that is calling it so in this case that would be correct.
I have tried the following and i cant add more then 1 field to the names attribute:
/api/getobjectproperty.htm?id=objectid&name=uptime&show=text
If you add another &name with another field for the sensor you should be able to define more settings on the object at one time.
Apr, 2014 - Permalink
Here are the answers to your questions:
I have just gotten started on writing some code to interface with PRTG's API. Do you have any documentation on the basic structure? in regards to sensors,devices,objects.
You can see all of the documentation on the API under Setup->API in the web interface
If i want to get all devices in a group and then get some data on a particular device, what calls do i need to make?
You can find the calls to pull the information from sensors, devices and groups from the API.
What is a sensor?
A sensor is an object in PRTG that is used to measure something on a device and then show it in the interface. This is something like a memory sensor that will tell you how much memory is being used on a machine or how much bandwidth is going in or out of an interface.
if i do /api/table.xml?content=devices.....is this bound by the username/passhash, so i only see devices in that users group?
Yes, any API call will be bound by the user that is calling it so in this case that would be correct.
I have tried the following and i cant add more then 1 field to the names attribute:
/api/getobjectproperty.htm?id=objectid&name=uptime&show=text
If you add another &name with another field for the sensor you should be able to define more settings on the object at one time.
Apr, 2014 - Permalink