<%NUMBERING1%>.<%NUMBERING2%>.<%NUMBERING3%> PRTG Manual: Single Object Property

You can access live data and live status data of single objects using the PRTG API.

i_round_redAuthentication with user name and passhash (or user name and password) must always be included in each PRTG API request. See section HTTP API for more information.

In this section:

Property/Setting of an Object

You can get the properties or settings of an object (name, hostname, url) using the following API calls.

i_round_blueBecause properties might contain HTML content, we recommend that you include &show=nohtmlencode in all getobjectproperty API calls.

i_speechExamples

Get an object property/setting:

/api/getobjectproperty.htm?id=objectid&name=propertyname&show=nohtmlencode

i_round_blueFor propertyname, look at the name of the INPUT fields while editing an object. You can discern the propertyname parameter by opening the Settings tab of an object and looking at the HTML source of the INPUT fields. For example, the INPUT field for the tags of an object has the name tags_. Leave away the underscore _ and use tags as a value for the propertyname parameter.
 
Get a list of all tags for object ID 1003

/api/getobjectproperty.htm?id=1003&name=tags&show=nohtmlencode

The Extensible Markup Language (XML) result looks like this:

  <?xml version="1.0" encoding="UTF-8" ?>
   <prtg>
       <version>18.3.45.1224+</version>
       <result>probehealthsensor</result>
   </prtg>

Supported Object Types

getobjectproperty.htm supports the following object types:

  • probe
  • group
  • device
  • sensor
  • channel
  • library
  • map
  • notification
  • report
  • schedule
  • user account

getobjectproperty.htm does not support the object types ticket and user group.

Available Channel Parameters

Name of Input Field

Setting Name (as displayed in the PRTG web interface)

name

Name

limitmode

Limit disabled or enabled (0 or 1)

limitmaxerror

Upper Error Limit

limitmaxwarning

Upper Warning Limit

limitminwarning

Lower Warning Limit

limitminerror

Lower Error Limit

limiterrormsg

Error Limit Message

limitwarningmsg

Warning Limit Message

Property of a Channel

With this API call, you can get a sensor's channels settings, for example channel limits. In general, this works like getting properties of any other object. To get channel properties via the PRTG API, you need to provide

  • the ID of a sensor (parameter id),
  • a subtype (channel for channels), and
  • a subid (ID of the channel that you want to edit)

i_round_blueBecause properties might contain HTML content, we recommend that you include &show=nohtmlencode in all getobjectproperty API calls.

i_speechExamples

Get a channel limit

/api/getobjectproperty.htm?id=sensorid&subtype=channel&subid=channelid&name=limitname&show=nohtmlencode

For example, the following API call gets the upper warning limit of a channel with the ID 0 of a sensor with the ID 1003

/api/getobjectproperty.htm?id=1003&subtype=channel&subid=0&name=limitmaxwarning&show=nohtmlencode

The XML result looks like this:

  <?xml version="1.0" encoding="UTF-8" ?>
   <prtg>
       <version>18.3.45.1224+</version>
       <result>25</result>
   </prtg>

More

i_square_blueKnowledge Base

How can I use the PRTG Application Programming Interface (API)?