API Events - Webhooks with append, still an issue?

For requests or help with our API
Post Reply
rinse-dental
Posts: 83
Joined: Wed Apr 06, 2022 12:04 pm

API Events - Webhooks with append, still an issue?

Post by rinse-dental » Fri May 10, 2024 6:47 pm

Hello - I hope you're well! Could there have been a change with version 24.1.24 and newer that reintroduced the issue discussed here: https://www.opendentalsoft.com:8085/for ... =9&t=7783
On 4/29 my Events stopped working and the symptoms reflect the issue re: appending to the webhook URL (e.g. API key)

Upgrade History:
- 24.1.28.0 05/10/2024 6:06:50 PM << Webhook still not working
- 24.1.24.0 04/29/2024 11:49:30 AM << Webhook stopped working
- 24.1.20.0 04/16/2024 8:24:17 AM << Webhook working

SLeon
Posts: 495
Joined: Mon Mar 01, 2021 10:00 am

Re: API Events - Webhooks with append, still an issue?

Post by SLeon » Mon May 13, 2024 8:10 am

Good morning,

There have not been any changes to ApiEvent Url formatting/sending logic since the change you linked (22.3). Can you please describe the symptoms you are observing?

rinse-dental
Posts: 83
Joined: Wed Apr 06, 2022 12:04 pm

Re: API Events - Webhooks with append, still an issue?

Post by rinse-dental » Mon May 13, 2024 10:15 am

Issue: Events are not being received by several long standing webhooks.

Context: The long standing webhooks stored in Open Dental include a url param in the endpoint: https://[some URL]/Patients?ApiKey=[some api key]

Steps to recreate Issue: Using www.webhook.site, add two subscriptions to Open Dental. The second subscription endpoint includes a forward slash ("/") at the end of the URL. The first variation (without the "/") is not working, the second is working:

1. url/endpoint: https://webhook.site/[your unique url here] << endpoint as provided by webhook.site, NOT WORKING
-- workstation: [server name]
-- watchtable: Patient
-- PollingSeconds: 5
2. url/endpoint: https://webhook.site/[your unique url here]/ << endpoint from webhook.site with and added "/" at the end, WORKING
-- workstation: [server name]
-- watchtable: Patient
-- PollingSeconds: 5

SLeon
Posts: 495
Joined: Mon Mar 01, 2021 10:00 am

Re: API Events - Webhooks with append, still an issue?

Post by SLeon » Mon May 13, 2024 10:42 am

I was unable to duplicate the issue with the steps provided.

Base Case:
  1. I updated a test dental office to the latest beta (24.1.28).
  2. I created a webhook.site url
  3. I made a subscription with this URL (no trailing '/') for the Appointment table.
  4. I made changes to an appointment via the UI and via a remote API request with an instance of OpenDental running (to process the subscription). Both changes appeared on my webhook.site as expected.
  5. I made changes to an appointment via the UI, via a remote API request, and via a service API request with only the API Service running. These three appeared on my webhook.site as expected.
Testing your issue:
  • I closed the instance of Open Dental and Stopped the API Service from the above testing.
  • I updated the same URL used in Step 2 above to contain a trailing '/'
  • I launched an instance of Open Dental.
  • I made changes to an appointment via the UI and via a remote API request. Both changes appeared on my webhook.site.
  • I Started the API Service again.
  • I made changes to an appointment via the UI, via a remote API request, and via a service API request with only the API Service running. These three appeared on my webhook.site.
WebhookTrailingSlash.jpg
WebhookTrailingSlash.jpg (26.43 KiB) Viewed 321 times
Edit: I realized you referenced the patient table in your post. I am going through the same step with that subscription type now.

rinse-dental
Posts: 83
Joined: Wed Apr 06, 2022 12:04 pm

Re: API Events - Webhooks with append, still an issue?

Post by rinse-dental » Mon May 13, 2024 10:49 am

Thank you looking into this. I re-tested as well and you are correct - the test case is working as expected. Though I'm still having trouble on the other end - I'll keep digging and let you know if anything crops up. Sorry to waste your time and thanks again for checking.

SLeon
Posts: 495
Joined: Mon Mar 01, 2021 10:00 am

Re: API Events - Webhooks with append, still an issue?

Post by SLeon » Mon May 13, 2024 10:57 am

I was able to successfully use a trailing '/' character for the Patient table subscription as well. Please share any information you are able to find in your search, or if any other questions come up.

rinse-dental
Posts: 83
Joined: Wed Apr 06, 2022 12:04 pm

Re: API Events - Webhooks with append, still an issue?

Post by rinse-dental » Mon May 13, 2024 3:23 pm

I'm still looking into this but question, does Open Dental store any record of Event responses? That might give me some clues. e.g. HTTP 200, 400, etc.

SLeon
Posts: 495
Joined: Mon Mar 01, 2021 10:00 am

Re: API Events - Webhooks with append, still an issue?

Post by SLeon » Thu May 16, 2024 8:22 am

Good morning,

Open Dental does not produce any logs for ApiEvents. However, you can look at the DateTimeStart value of your subscription to see if it was processed correctly. This time will not update if the software was unable to successfully connect to you webhook site.

Post Reply