API Reference

Routers

  • Routers are simple YAML configurations that dictate how to route and transform Alerts.
  • Alerts can be sent to routers by Integrations or Account Users.
  • Routers are part of the Advanced Functionality in PagerTree. Please see the routers documentation in-depth details on how to use them.

The Router Object

PropertyTypeDescription
namestringThe name of the router
enabledbooleanBoolean indicating if this router is currently enabled. If false, it will just route to the default receiver.
rulesstringYAML definition of the router. See routers documentation.
default_receiver_account_user_idstringThe ID of the Account User to receive the alert if no rules match.
default_receiver_router_idstringThe ID of the Router to receive the alert if no rules match.
default_receiver_team_idstringThe ID of the Team to receive the alert if no rules match.

Create a Router

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

Allowed Parameters

def router_params
  params.permit(
    :name,
    :enabled,
    :rules,
    :default_receiver_account_user_id,
    :default_receiver_router_id,
    :default_receiver_team_id,
  )
end

Required Parameters

  • name
  • at least 1 default_receiver

Retrieve a Router

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

Update a Router

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

Delete a Router

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

List all Routers

GET https://api.pagertree.com/api/v4/routers
Previous
Notification Rules