Skip to content
lordmilko edited this page Aug 21, 2019 · 20 revisions

Welcome to PrtgAPI!

The PrtgAPI project provides a C#/PowerShell library for interfacing with PRTG Network Monitor.

At its core, PrtgAPI does two things

  • Serializes API requests, then
  • Deserializes their resulting responses!
C:\> Get-Sensor ping

Name                Id      Device      Group           Probe            Status
----                --      ------      -----           -----            ------
PING                2010    dc1         Servers         Local Probe      Up
Ping                2011    dc2         Servers         Local Probe      Down
Ping                2012    exch1       Servers         Remote Probe     DownAcknowledged

PrtgAPI features complete XmlDoc/Get-Help documentation. For instructions on installing PrtgAPI see Installation. To get started using PrtgAPI, see Getting Started

Project Overview

The PrtgAPI repo consists of several projects

Name Language Description
PrtgAPI C# C# Library
PrtgAPI.PowerShell C# PowerShell Library
PrtgAPI.Tests.UnitTests C#/PowerShell Unit tests for PrtgAPI, PrtgAPI.PowerShell and PrtgAPI.Build
PrtgAPI.Tests.IntegrationTests C#/PowerShell Integration tests for PrtgAPI, PrtgAPI.PowerShell and PrtgAPI.Build
PrtgAPI.CodeGenerator C# Generates the external interfaces of PrtgAPI's PrtgClient
PowerShell.TestAdapter C# Test adapter used for calculating code coverage in CI/PrtgAPI.Build
PrtgAPI.Build PowerShell PowerShell module for the PrtgAPI Build Environment

Clients are able to interface with PRTG via four types of requests

  • Synchronous
  • Asynchronous
  • Stream
  • Query

For more information on each type, please see the Requests page.

PrtgAPI implements a sophisticated object model and relies on a number of interesting techniques. If there is something you think the wiki could better elaborate on, please feel free to open an issue.