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 V2 of Webhooks #4540

Open
albertisfu opened this issue Oct 8, 2024 · 1 comment
Open

Add V2 of Webhooks #4540

albertisfu opened this issue Oct 8, 2024 · 1 comment

Comments

@albertisfu
Copy link
Contributor

Since we're migrating from API V3 to V4, it's also a good idea to update Webhooks payloads from V1 to V2. This way, we can inform users that they should migrate to V2 webhooks or prepare for changes in V1.

This update will especially impact Opinions Search Alert Webhooks. Once we move them to Elasticsearch, some fields will be removed from the V1 webhooks.

Additionally, V2 webhooks should use the new serializers in API V4. For Opinions, this involves using a nested approach, where search results match clusters and nested Opinions. This will require adjustments to the ES query used for triggering alerts in cl_send_alerts to query parent-child documents. These changes will also affect the email template for Opinions Search Alerts.

For OA Search Alerts, we only need to update the webhook version since we're already using the latest V4 serializers for webhooks.

Once we release RECAP Search Alerts, we will simply need to update the webhook version to V2.

A couple of questions:

  1. Should Webhook version V2 be applied to all other endpoints as well?

    • Docket Alerts
    • RECAP Fetch
    • Old Docket Alerts Report

    It seems that for these endpoints, only the webhook version needs to be updated since the serializers didn’t change in V4.

  2. For Opinions, where V1 and V2 of the Webhooks will differ, you mentioned that users who don't want to migrate to V2 should be prepared for changes in V1. Does this mean we need to implement a mechanism that allows users to select which webhook version they want to use for the Opinions Search Alert webhook endpoint?

@mlissner
Copy link
Member

mlissner commented Oct 8, 2024

Should Webhook version V2 be applied to all other endpoints as well?

It'd be nice to always keep them all on the same version, yes, even if there are no changes, just like we do with the API.

Does this mean we need to implement a mechanism that allows users to select which webhook version they want to use for the Opinions Search Alert webhook endpoint?

I think so, yes, unless you can think of a simpler way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants