Skip to content

feat(pagerduty): add client and client_url support for Events API v2#6241

Open
jyoti369 wants to merge 1 commit intokeephq:mainfrom
jyoti369:feat/pagerduty-event-api-client
Open

feat(pagerduty): add client and client_url support for Events API v2#6241
jyoti369 wants to merge 1 commit intokeephq:mainfrom
jyoti369:feat/pagerduty-event-api-client

Conversation

@jyoti369
Copy link
Copy Markdown

@jyoti369 jyoti369 commented Apr 11, 2026

What

Add optional client and client_url parameters to the PagerDuty Events API v2 integration, per the Events API v2 spec.

These fields allow a clickable "View in [client]" link to appear in PagerDuty event details.

Why

The current Events API implementation is missing client and client_url attributes. Without them, events created via Keep don't show the monitoring client link in PagerDuty.

Changes

  • Added client and client_url as optional named parameters in _notify, _send_alert, and _build_alert
  • Both fields are placed at the top level of the event payload (not inside payload.payload), matching the API spec
  • Fixed images and links to also be top-level (they were incorrectly nested inside payload.payload)
  • Added unit tests covering:
    • client/client_url included when provided
    • client/client_url omitted when not provided
    • images/links at correct top level
    • Full payload structure validation

Usage in workflows

actions:
  - name: pagerduty-alert
    provider:
      type: pagerduty
      config: "{{ providers.pagerduty }}"
    with:
      title: "CPU at 99%"
      severity: critical
      client: "Keep"
      client_url: "https://keep.example.com/alerts/123"

Closes #6233


Note

Medium Risk
Changes the PagerDuty Events API v2 payload structure (moving images/links and adding client/client_url), which could affect how PagerDuty renders or validates events if any downstream code relied on the prior nesting.

Overview
Adds optional client and client_url parameters to the PagerDuty Events API v2 alert path (_notify_send_alert_build_alert) and includes them in the outgoing event payload.

Fixes the event payload schema by placing images and links at the top level (instead of under payload), and adds unit tests asserting the correct placement/omission of these fields.

Reviewed by Cursor Bugbot for commit af1d6f9. Bugbot is set up for automated code reviews on this repo. Configure here.

Add optional client and client_url parameters to the PagerDuty Events API v2
payload, allowing users to configure a clickable link in PagerDuty events.
Also fixes images and links placement to be top-level per API spec.

Closes keephq#6233
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Feature A new feature Provider Providers related issues labels Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature Provider Providers related issues size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[➕ Feature]: [PagerDuty Provider] Fully support Event API

1 participant