PingPlotter Cloud Manual

Alerts


Overview

The Alerts API lets you create, change, pause, and delete Alerts, and check which ones are triggered right now. Use it to keep Alerts in sync with your own systems, or to pause notifications during maintenance.

API keys need the Alerts Read permission to read and the Alerts Write permission to make changes. See API Key Permissions.

Alert Fields

Alerts are made of a Condition checked on each Target in the Scope, and up to 10 Actions that run when it fails. These match the Conditions and Actions in the Alert editor. Fields marked in italics only apply to that Type.

Condition

Key Type Notes
Type string Required. QualityThreshold, LatencyOverTime, LatencySamples, MOS, IPInRoute, or RouteChanged.
QualityDefinitionId string QualityThreshold. Required. Use the Settings API to get a list of these Id's.
Threshold string QualityThreshold. FairOrPoor or Poor. Default: FairOrPoor.
OverMs number LatencyOverTime, LatencySamples. Latency in milliseconds that counts as bad (1-60000). Lost packets always count. Default: 250 (LatencyOverTime) or 100 (LatencySamples).
PercentOver number LatencyOverTime. Percent of the window over OverMs that triggers the Alert (0.1-100). Default: 5.
WindowSeconds integer LatencyOverTime, MOS. Length of the window in seconds (10-86400). Default: 600 (LatencyOverTime) or 3600 (MOS).
SamplesOver integer LatencySamples. Number of bad samples that triggers the Alert. Default: 5.
SamplesToExamine integer LatencySamples. Number of recent samples to check (1-10000). Default: 10.
MOS number MOS. Triggers below this score (1-5). Default: 4.
SamplesNeeded integer MOS. Samples needed before the Alert can trigger (1-10000). Default: 10.
IP string IPInRoute. Required unless IPRange is given. Triggers when this IP address is in the route.
IPRange string IPInRoute. An IP mask to use instead of a single address, e.g. 10.0.0.0/8.
RouteMask string RouteChanged. An IP mask of the hops to watch for changes.

Leave out any value to use the same default as the Alert editor.

Scope

Use exactly one of these.

Key Type Notes
AllTargets boolean Every Target in the account, including new ones.
IPMask string Targets whose IP address matches, e.g. 10.0.0.0/8.
SessionIds string array Specific Targets, up to 500.

Alerts that pick Targets by Agent attributes are set up in the web app. They show Matching in their Scope and can't be changed through the API.

Actions

Key Type Notes
Type string Required. Email, Rest, Comment, or None. Use None for an action that only runs on recovery.
To string Email. Required. Comma separated email addresses.
Subject string Email. Subject template. Leave out to use the default.
HtmlBody string Email. HTML body template. Leave out to use the default.
TextBody string Email. Plain-text body template. Leave out to use the default.
Url string Rest. Required. Full http or https URL to call.
Method string Rest. GET, PUT, POST, or DELETE. Default: GET.
DataType string Rest. Form, Json, XML, Plain, or HTML. Default: Form.
RequestBody string Rest. Request body template.
Comment string Comment. Required. Text of the comment added to the Target.
Targets integer Run once this many Targets are failing at the same time. Leave out to run for each failing Target.
DelaySeconds integer Only run after the condition has been failing this long (0-86400). Default: 0.
RepeatEverySeconds integer Repeat while still failing, at least 60 seconds apart. Needs Targets.
Recovery object An action to run when the Alert recovers. Takes the same Type, To, Subject, HtmlBody, TextBody, Url, Method, DataType, RequestBody, and Comment fields.
Good to know
  • Sending a field that doesn't apply to the action's Type, or a field name the API doesn't know, returns a 400 error that names it.
  • When you read an Alert, Rest URLs are shortened (e.g. https://hooks.example.com/…) to keep them private. Send the shortened URL back unchanged to keep it, or send the full URL to change it.
  • Summary actions can only be added in the web app. They're included when you read an Alert; send them back unchanged to keep them.
  • Duration and cooldown filters are only available in the web app. Updating an Alert through the API keeps any it already has.

GET

GET /alerts

Retrieve all Alerts with their condition type, scope, Target count, schedules, and whether they're paused.

curl -X 'GET' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token'

200 Response

[
   {
      "AlertId": "string",
      "Name": "string",
      "Condition": "QualityThreshold",
      "Scope": "Targets",
      "TargetCount": 0,
      "AgentCount": 0,
      "ScheduleIds": [
         "string"
      ],
      "Paused": "Indefinitely"
   }
]

Scope is AllTargets, IPMask, Targets, or Matching. Paused is Indefinitely or the time the Alert resumes, and is left out when the Alert isn't paused.

GET /alerts/status

Retrieve every Alert's current status: Healthy, Triggered, or Unknown, how many Targets are triggering it, whether it's paused, whether its schedules let it notify right now, and whether its status is based on offline Agents.

curl -X 'GET' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/status' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token'

200 Response

[
   {
      "AlertId": "string",
      "Name": "string",
      "Status": "Triggered",
      "Offline": false,
      "NotificationsActive": true,
      "TriggeredTargetCount": 0
   }
]

NotificationsActive is only included when the Alert has a schedule. A paused Alert keeps the status it had when it was paused.

GET /alerts/{alertId}

Retrieve a single Alert, in the same shape you use to create one. Read an Alert before updating it.

curl -X 'GET' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/{alertId}' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token'

200 Response

{
   "AlertId": "string",
   "Name": "string",
   "Condition": {
      "Type": "LatencyOverTime",
      "OverMs": 250,
      "PercentOver": 5,
      "WindowSeconds": 600
   },
   "Scope": {
      "SessionIds": [
         "string"
      ]
   },
   "Actions": [
      {
         "Type": "Email",
         "To": "noc@example.com",
         "DelaySeconds": 120,
         "Recovery": {
            "Type": "Email",
            "To": "noc@example.com"
         }
      }
   ],
   "AlertGroups": [
      {
         "AlertGroupId": "string",
         "Name": "string",
         "AlertCount": 0
      }
   ],
   "ScheduleIds": [
      "string"
   ],
   "Paused": "2026-11-19T16:20:00.000Z",
   "TargetCount": 0
}
GET /alerts/{alertId}/status

Retrieve one Alert's current status and, when it's Triggered, the Targets triggering it.

curl -X 'GET' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/{alertId}/status' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token'

200 Response

{
   "AlertId": "string",
   "Name": "string",
   "Status": "Triggered",
   "Offline": false,
   "NotificationsActive": true,
   "TriggeredTargetCount": 0,
   "TriggeredTargets": [
      {
         "SessionId": "string",
         "TargetName": "string",
         "AgentUniqueId": "string",
         "AgentName": "string",
         "AlertId": "string",
         "Offline": false
      }
   ]
}

POST

POST /alerts

Create an Alert. An action without Targets runs for each failing Target; with Targets, it runs once that many Targets are failing at the same time, and can repeat.

curl -X 'POST' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "Name": "Call center VoIP",
      "Condition": {
         "Type": "QualityThreshold",
         "QualityDefinitionId": "string",
         "Threshold": "Poor"
      },
      "Scope": {
         "SessionIds": [
            "string",
            "string"
         ]
      },
      "Actions": [
         {
            "Type": "Email",
            "To": "noc@example.com, oncall@example.com",
            "DelaySeconds": 300,
            "Subject": "{{Host.PreferredName}} is Poor",
            "Recovery": {
               "Type": "Email",
               "To": "noc@example.com"
            }
         },
         {
            "Type": "Rest",
            "Url": "https://hooks.example.com/pingplotter",
            "Method": "POST",
            "DataType": "Json",
            "RequestBody": "{\"text\":\"{{Host.PreferredName}} is down\"}",
            "Targets": 3,
            "RepeatEverySeconds": 900
         },
         {
            "Type": "Comment",
            "Comment": "Alert triggered: Poor quality"
         }
      ],
      "ScheduleIds": [
         "string"
      ]
   }'

200 Response

{
   "AlertId": "string",
   "Name": "string",
   "Condition": {
      "Type": "LatencyOverTime",
      "OverMs": 250,
      "PercentOver": 5,
      "WindowSeconds": 600
   },
   "Scope": {
      "SessionIds": [
         "string"
      ]
   },
   "Actions": [
      {
         "Type": "Email",
         "To": "noc@example.com",
         "DelaySeconds": 120,
         "Recovery": {
            "Type": "Email",
            "To": "noc@example.com"
         }
      }
   ],
   "AlertGroups": [
      {
         "AlertGroupId": "string",
         "Name": "string",
         "AlertCount": 0
      }
   ],
   "ScheduleIds": [
      "string"
   ],
   "Paused": "2026-11-19T16:20:00.000Z",
   "TargetCount": 0
}

Request Body

Key Type Notes
Name string Required. Up to 100 characters.
Condition object Required. See Condition.
Scope object Required. See Scope.
Actions object array Required. 1 to 10 actions. See Actions.
AlertGroupIds string array Adds the Alert to these alert groups.
ScheduleIds string array Only notify during these schedules.
POST /alerts/{alertId}/targets

Add Targets to an Alert whose Scope is a list of Targets.

curl -X 'POST' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/{alertId}/targets' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "SessionIds": [
         "string"
      ]
   }'

200 Response

{
   "AlertId": "string",
   "Name": "string",
   "Condition": {
      "Type": "LatencyOverTime",
      "OverMs": 250,
      "PercentOver": 5,
      "WindowSeconds": 600
   },
   "Scope": {
      "SessionIds": [
         "string"
      ]
   },
   "Actions": [
      {
         "Type": "Email",
         "To": "noc@example.com",
         "DelaySeconds": 120,
         "Recovery": {
            "Type": "Email",
            "To": "noc@example.com"
         }
      }
   ],
   "AlertGroups": [
      {
         "AlertGroupId": "string",
         "Name": "string",
         "AlertCount": 0
      }
   ],
   "ScheduleIds": [
      "string"
   ],
   "Paused": "2026-11-19T16:20:00.000Z",
   "TargetCount": 0
}

Request Body

Key Type Notes
SessionIds string array Required. Up to 500 Session Id's.

PUT

PUT /alerts/{alertId}

Change an Alert. Only the fields you send are changed.

curl -X 'PUT' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/{alertId}' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "Name": "Call center VoIP (business hours)",
      "ScheduleIds": [
         "string"
      ]
   }'

200 Response

{
   "AlertId": "string",
   "Name": "string",
   "Condition": {
      "Type": "LatencyOverTime",
      "OverMs": 250,
      "PercentOver": 5,
      "WindowSeconds": 600
   },
   "Scope": {
      "SessionIds": [
         "string"
      ]
   },
   "Actions": [
      {
         "Type": "Email",
         "To": "noc@example.com",
         "DelaySeconds": 120,
         "Recovery": {
            "Type": "Email",
            "To": "noc@example.com"
         }
      }
   ],
   "AlertGroups": [
      {
         "AlertGroupId": "string",
         "Name": "string",
         "AlertCount": 0
      }
   ],
   "ScheduleIds": [
      "string"
   ],
   "Paused": "2026-11-19T16:20:00.000Z",
   "TargetCount": 0
}

Don't send back the whole response from GET: AlertId, AlertGroups, Paused, and TargetCount can't be updated and return a 400 error.

The response may include a Note, for example when an alert group was deleted, or a Warning if only part of the update could be saved. The Alert in the response always shows how it stands now.

Request Body

Key Type Notes
Name string New name.
Condition object Replaces the whole condition. Values you leave out go back to their defaults.
Scope object Replaces the scope.
Actions object array Replaces all of the Alert's actions. Send the full list from GET with your changes.
AlertGroupIds string array Replaces the Alert's alert groups. A group left with no Alerts is deleted.
ScheduleIds string array Replaces the Alert's schedules. Send [] to notify at any time.
PUT /alerts/pause

Pause Alerts until a time, or until they're resumed. Paused Alerts don't notify, and their status stays as it was when they were paused.

curl -X 'PUT' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/pause' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "AlertIds": [
         "string"
      ],
      "Until": "2026-11-20T08:00:00-07:00"
   }'

200 Response

{
   "AlertIds": [
      "string"
   ],
   "Paused": true,
   "Until": "2026-11-20T15:00:00.000Z"
}

Request Body

Key Type Notes
AlertIds string array Required. Alerts to pause.
Until string When to resume (ISO 8601 format), in the future. Leave out to pause until resumed.
PUT /alerts/resume

Resume paused Alerts.

curl -X 'PUT' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/resume' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "AlertIds": [
         "string"
      ]
   }'

200 Response

{
   "AlertIds": [
      "string"
   ],
   "Paused": false
}

Request Body

Key Type Notes
AlertIds string array Required. Alerts to resume.

DELETE

DELETE /alerts/{alertId}/targets

Remove Targets from an Alert whose Scope is a list of Targets.

curl -X 'DELETE' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts/{alertId}/targets' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "SessionIds": [
         "string"
      ]
   }'

200 Response

{
   "AlertId": "string",
   "Name": "string",
   "Condition": {
      "Type": "LatencyOverTime",
      "OverMs": 250,
      "PercentOver": 5,
      "WindowSeconds": 600
   },
   "Scope": {
      "SessionIds": [
         "string"
      ]
   },
   "Actions": [
      {
         "Type": "Email",
         "To": "noc@example.com",
         "DelaySeconds": 120,
         "Recovery": {
            "Type": "Email",
            "To": "noc@example.com"
         }
      }
   ],
   "AlertGroups": [
      {
         "AlertGroupId": "string",
         "Name": "string",
         "AlertCount": 0
      }
   ],
   "ScheduleIds": [
      "string"
   ],
   "Paused": "2026-11-19T16:20:00.000Z",
   "TargetCount": 0
}

Request Body

Key Type Notes
SessionIds string array Required. Up to 500 Session Id's.
DELETE /alerts

Delete Alerts and their actions. Alert groups they belong to are kept.

curl -X 'DELETE' \
   'https://yoursubdomain.api.pingplotter.cloud/alerts' \
   -H 'accept: application/json' \
   -H 'X-API-KEY: your_api_token' \
   -H 'Content-Type: application/json' \
   -d '{
      "AlertIds": [
         "string"
      ]
   }'

200 Response

[
   {
      "AlertId": "string",
      "Name": "string"
   }
]

Request Body

Key Type Notes
AlertIds string array Required. Alerts to delete. Nothing is deleted if any Id is unknown.