API Availability Check?

For requests or help with our API
Post Reply
mandmdiet
Posts: 116
Joined: Tue Aug 17, 2021 9:37 am

API Availability Check?

Post by mandmdiet » Thu Mar 14, 2024 2:43 pm

We would like to be able to keep our users informed of the current connectivity status of our application to the Open Dental API. For example, if someone removes the customer API key from Open Dental or just hasn't added it yet or if something is down on the PMS machine or even if the Open Dental API is suffering an outage we want to let the user know that the API is not available before the user tries to interact with features in the software. What's the best way to determine if the Open Dental API is operational without putting load on the practice server (or as little load as possible)?

Thanks

justine
Posts: 175
Joined: Tue Dec 28, 2021 7:59 am

Re: API Availability Check?

Post by justine » Thu Mar 14, 2024 4:44 pm

mandmdiet wrote:
Thu Mar 14, 2024 2:43 pm
We would like to be able to keep our users informed of the current connectivity status of our application to the Open Dental API. For example, if someone removes the customer API key from Open Dental or just hasn't added it yet or if something is down on the PMS machine or even if the Open Dental API is suffering an outage we want to let the user know that the API is not available before the user tries to interact with features in the software. What's the best way to determine if the Open Dental API is operational without putting load on the practice server (or as little load as possible)?

Thanks
If you want to know if OD API is available, you can make a request using the public demo credentials.

mandmdiet
Posts: 116
Joined: Tue Aug 17, 2021 9:37 am

Re: API Availability Check?

Post by mandmdiet » Mon Mar 18, 2024 8:35 am

Thanks justine,

How do those public demo credentials work? What request should we send to the API using those credentials? This won't give us a valid indication as to whether we'd be successful using the API normally would it? Since something could be wrong related to our generated customer key? For example, if the customer key wasn't added to the OD configuration correctly or if the key has been disabled for some reason?

Thanks

justine
Posts: 175
Joined: Tue Dec 28, 2021 7:59 am

Re: API Availability Check?

Post by justine » Mon Mar 18, 2024 9:01 am

mandmdiet wrote:
Mon Mar 18, 2024 8:35 am
Thanks justine,

How do those public demo credentials work? What request should we send to the API using those credentials? This won't give us a valid indication as to whether we'd be successful using the API normally would it? Since something could be wrong related to our generated customer key? For example, if the customer key wasn't added to the OD configuration correctly or if the key has been disabled for some reason?

Thanks
Good morning mandmdiet,

The intention of the public demo keys is for an API developer to test API endpoints prior to having their own credentials. The public demo is hosted on the same servers that process API traffic, so if you can reach any API endpoint, using public demo keys, the API is up.

If the API keyset was added incorrectly on the customer's end, no API requests would work. At that point, you would reach out to the office and verify they pasted their key in accurately. If the office disabled their key, your API requests to that office would all return a message saying their key has been disabled.

Thanks!

mandmdiet
Posts: 116
Joined: Tue Aug 17, 2021 9:37 am

Re: API Availability Check?

Post by mandmdiet » Mon Mar 18, 2024 9:18 am

Thanks for that fast reply, I think I understand. The public demo credentials are meant to be a means by which I can determine if I have my API implementation set up correctly it sounds like.

In this case, I'm more looking for a way to be sure I have connectivity with a specific office to eliminate the possibility of a misconfigured or disabled key. I'm really just wondering if there's an API endpoint built for this specific purpose like a /status endpoint or if I should instead try to run an innocuous query against the database using the PUT query API like `SELECT COUNT(*) FROM Provider`.

Thanks Justine.

justine
Posts: 175
Joined: Tue Dec 28, 2021 7:59 am

Re: API Availability Check?

Post by justine » Mon Mar 18, 2024 9:44 am

mandmdiet wrote:
Mon Mar 18, 2024 9:18 am
Thanks for that fast reply, I think I understand. The public demo credentials are meant to be a means by which I can determine if I have my API implementation set up correctly it sounds like.

In this case, I'm more looking for a way to be sure I have connectivity with a specific office to eliminate the possibility of a misconfigured or disabled key. I'm really just wondering if there's an API endpoint built for this specific purpose like a /status endpoint or if I should instead try to run an innocuous query against the database using the PUT query API like `SELECT COUNT(*) FROM Provider`.

Thanks Justine.
Correct. The public demo keyset is for demo testing your application, in a safe way, with fake data. Changes made to that database are reset daily.

There is no API status endpoint at the office level. If you are able to retrieve data, your keyset is valid. However, a copy of the customer's API key is stored locally in the apikey table. See API Setup documentation and the database schema for more information.

Thanks!

mandmdiet
Posts: 116
Joined: Tue Aug 17, 2021 9:37 am

Re: API Availability Check?

Post by mandmdiet » Mon Mar 18, 2024 2:59 pm

Thanks justine

Post Reply