All calls to the PRTG API are performed by HTTP GET requests. The URLs consist of a path to the API function and some parameters.

  • If you are accessing the API inside your secure LAN, you can just use HTTP. In environments that are not secure (for example, when accessing your PRTG server via the internet), you should use HTTPS requests to make sure that your parameters and passwords are encrypted. This way, all communication between the PRTG server and your client is Secure Sockets Layer (SSL) encrypted.
  • For every API call, the default limit of items is 500. If you want to receive more items per call, add a count=xxx parameter with enough room for all sensors.
  • Authentication with username and passhash (or username and password) must always be included in each request.
    icon-book-arrowsSee section Authentication for more information.
  • All data in the GET parameters must be UTF-8-encoded and URL encoded.

Output Formats

Most data that you can request from the API is available in data tables in the Extensible Markup Language (XML), the JavaScript Object Notation (JSON) format, and the comma-separated values (CSV) format (using the XML format is recommended). Here are some sample calls with different output formats.








The example URLs consist of the following elements:

  • yourserver: The name of your PRTG server.
  • /api/table.xml or /api/table.json: Addresses an API function. Here, the function renders a table in the XML format or in the JSON format.
  • content=sensors: Parameter for additional control. In this case, it includes all sensors in the table.
  • columns=sensor: Parameter for additional control. In this case, only the names of all sensors are shown in the table.
  • (optional) output=csvtable: Renders a table in the CSV format.


All requests to the API are stateless, which means that there is no multi-step login process of an kind. The authentication with username and passhash (or username and password) must always be included in each request by using the username and passhash (or username and password) parameters.





The example URLs now also contain the credentials for authentication purposes:

  • username=myuser&passhash=hash (or password=mypassword)

You can request the passhash for an account with the following API call:


icon-i-round-redMake sure that username and password are URL-encoded.


Most XML replies from the API contain a <version> field that contains the program version and buildnumber of the server's PRTG installation. Your client must look at this version number and compare it to the version number that was used to develop the client. Do not accept version numbers older (smaller) than this one. You should display a warning to the user (or stop processing) if the version number differs by 0.1 or more (for example, version 18.1 vs. 18.2, or version 17.x vs. 18.x). API conventions or parameters may have changed between versions.

icon-i-roundNewer versions of the same major version of PRTG reply to API calls just as previous versions did.

Error Handling

Depending on whether your API call was successfully processed or not, the PRTG server replies with the following HTTP status codes:

HTTP Status Code





The API call was successfully completed , the XML response contains the result data.



The API call was successfully completed and a new object was created (the redirection URL contains the new object ID).


Bad Request

The API call could not be successfully completed. The XML response contains the error message.



The username/password credentials cannot be accepted.

For 400 error codes, the error .xml document includes the error message as follows:

<?xml version="1.0" encoding="UTF-8" ?>
  <error>Sorry, there is no object with the specified id.</error>


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

Application Programming Interface (API) Definition—Topics