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

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

icon-i-round-redAuthentication with username and passhash (or username and password) must always be included in each PRTG API request. See section Authentication for more information.

Here are quick links for ease of use.

Property/Setting of an Object

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

icon-i-roundBecause properties may contain HTML content, we recommend that you include &show=nohtmlencode in all getobjectproperty API calls.

icon-speechExamples

Get an object property/setting:

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

icon-i-roundFor propertyname, look at the name of the INPUT fields while editing an object. The propertyname parameter can be discerned by opening the Settings page 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.

Channels—Available Parameters

Name of INPUT field

Settings Name (as displayed in the 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 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)

icon-i-roundBecause properties may contain HTML content, we recommend that you include &show=nohtmlencode in all getobjectproperty API calls.

icon-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

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

Application Programming Interface (API) Definition—Topics

Keywords: