Skip to main content

Integrations

  • An integration connects PagerTree to 3rd party applications.
  • Integrations are Open Source. Adapter source code can be found on GitHub.
  • Integrations are responsible for transforming 3rd party webhook data into Alerts.
  • If able to successfully transform the 3rd party webhook data into an Alert and determining the webhook was a create action, the integration will send the alert to any of Account Users, Routers, or Teams.

The Integration Object

PropertyTypeDescription
namestringThe name of the integration.
enabledbooleanBoolean indicating if this integration is currently enabled.
urgencystringDefault urgency for the alerts this integration creates.
integration_typeobjectThe integration type object of this integration.
optionshashOptions for the integration type.
account_user_idsstring[]IDs of Account Users this integration routes to by default.
router_idsstring[]IDs of routers this integration routes to by default.
team_idsstring[]IDs of teams this integration routes to by default.

Create an Integration

POST https://api.pagertree.com/api/v4/integrations

Allowed Parameters

def integration_params
option_keys = params.to_unsafe_h.keys.select { |key| key.to_s.starts_with?("option_") }.map(&:to_sym)
params.permit(
:name,
:enabled,
:urgency,
:integration_type_id,
*option_keys,
account_user_ids: [],
router_ids: [],
team_ids: []
)
end

Required Parameters

  • name
  • urgency
  • integration_type_id (see how to get a list of Integration Types below)
  • at least 1 destination (Account User, Router, or Team)

Example Request

POST https://api.pagertree.com/api/v4/integrations/
{
"name": "Retails Site Uptime Monitor",
"integration_type_id": "01GDBEYARHS4W4QM6X370Z5TMB",
"urgency": "high",
"team_ids": ["01GDKK569YVD2EB6E9V80VXWY1"]
}

Retrieve an Integration

GET https://api.pagertree.com/api/v4/integrations/:id

Update an Integration

PUT https://api.pagertree.com/api/v4/integrations/:id

Delete an Integration

DELETE https://api.pagertree.com/api/v4/integrations/:id

List all Integrations

GET https://api.pagertree.com/api/v4/integrations

Retrieve an Integration Type

GET https://api.pagertree.com/api/v4/integration_types/:id

List all Integration Types

GET https://api.pagertree.com/api/v4/integration_types