Integrations
- 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.
Property | Type | Description |
---|---|---|
name | string | The name of the integration. |
enabled | boolean | Boolean indicating if this integration is currently enabled. |
urgency | string | Default urgency for the alerts this integration creates. |
integration_type | object | The integration type object of this integration. |
options | hash | Options for the integration type. |
account_user_ids | string[] | |
router_ids | string[] | |
team_ids | string[] |
POST https://api.pagertree.com/api/v4/integrations
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
- name
- urgency
- at least 1 destination (Account User, Router, or Team)
POST https://api.pagertree.com/api/v4/integrations/
{
"name": "Retails Site Uptime Monitor",
"integration_type_id": "01GDBEYARHS4W4QM6X370Z5TMB",
"urgency": "high",
"team_ids": ["01GDKK569YVD2EB6E9V80VXWY1"]
}
GET https://api.pagertree.com/api/v4/integrations/:id
PUT https://api.pagertree.com/api/v4/integrations/:id
DELETE https://api.pagertree.com/api/v4/integrations/:id
GET https://api.pagertree.com/api/v4/integrations
GET https://api.pagertree.com/api/v4/integration_types/:id
GET https://api.pagertree.com/api/v4/integration_types
Last modified 5mo ago