Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manual trigger support for webhooks #4934

Merged
merged 16 commits into from
Sep 9, 2024
Merged

Conversation

matiasb
Copy link
Contributor

@matiasb matiasb commented Aug 27, 2024

Related to #4748

  • Added support for additional filters when getting webhooks:
    • GET /api/plugins/grafana-oncall-app/resources/webhooks/?integration=CALBFV7RRDH93
      (filter webhooks that are enabled for the specified integration)
    • GET /api/plugins/grafana-oncall-app/resources/webhooks/?trigger_type=0
      (filter webhooks with the given trigger type)
  • Allow triggering a Manual webhook using an alert group as context:
    POST /api/plugins/grafana-oncall-app/resources/webhooks/<webhook public ID>/trigger_manual
    Example payload: {"alert_group": "I4A4I1UPSA7IC"}
    (will return a 200 OK on success)

@matiasb matiasb added the release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes label Aug 27, 2024
Copy link
Contributor

@alyssawada alyssawada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I know you mentioned that we should probably add additional documentation around this, but we can go with this for now.

@matiasb matiasb added this pull request to the merge queue Sep 9, 2024
Merged via the queue into dev with commit e93858e Sep 9, 2024
25 checks passed
@matiasb matiasb deleted the matiasb/manual-webhooks branch September 9, 2024 12:28
brojd pushed a commit that referenced this pull request Sep 18, 2024
Related to #4748

- Added support for additional filters when getting webhooks:
- `GET
/api/plugins/grafana-oncall-app/resources/webhooks/?integration=CALBFV7RRDH93`
  (filter webhooks that are enabled for the specified integration)
- `GET
/api/plugins/grafana-oncall-app/resources/webhooks/?trigger_type=0`
  (filter webhooks with the given trigger type)
- Allow triggering a Manual webhook using an alert group as context:
`POST /api/plugins/grafana-oncall-app/resources/webhooks/<webhook public
ID>/trigger_manual`
Example payload: `{"alert_group": "I4A4I1UPSA7IC"}`
(will return a 200 OK on success)

---------

Co-authored-by: Rares Mardare <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants