API Service Unable to connect

This forum is for programmers who have questions about the source code.
Post Reply
annaswaheed
Posts: 5
Joined: Wed Jul 13, 2022 8:26 am

API Service Unable to connect

Post by annaswaheed » Wed Jul 13, 2022 8:36 am

Hello,
I am developing a desktop C# application and I was able to use local APIs when the OpenDental server was running on the same machine during the development phase. Now I want to use the application to query data from another machine on the same network using APIs. I have read the documentation and followed it by setting the firewall exceptions for openDental on port 30223 on the server machine and using the address (http://{Private IP Address}:30223/api/v1/) in the API calls but this address does not response. I also checked resource monitor(network) on the server machine but the port 30223 is not being used for anything according to the resource monitor. Can anyone please guide me how I can resolve this issue?

The documentation I'm referring to is at the bottom of this page.
https://www.opendental.com/site/apilocal.html

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

Re: API Service Unable to connect

Post by SLeon » Wed Jul 13, 2022 10:36 am

It sounds like you are on the right track. Could you please confirm a few things about your setup?
  • Confirm the the API Service is installed on the server machine. It appears as OpenDentalAPIService in the Windows Service Manager.
  • If installed, in this same window make sure the Service is running (or click Start)
  • If it is running, check to see that the 30223 port has been opened. One option is to use netstat -na | find "30223" with the Command Prompt.
Our next troubleshooting steps will differ depending on if the installation was successful or not.

annaswaheed
Posts: 5
Joined: Wed Jul 13, 2022 8:26 am

Re: API Service Unable to connect

Post by annaswaheed » Wed Jul 13, 2022 12:16 pm

Hey SLeon,

Hey I checked windows services in the task manager I only see OpenDentalEconnector running there relevant to openDental. I also checked the port through cmd but it is not there. How can i install the OpenDentalAPIService and make it work? do you have guide or documentation for it?

Thank you
Siddi Waheed

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

Re: API Service Unable to connect

Post by SLeon » Wed Jul 13, 2022 12:54 pm

The OpenDentalAPIService is automatically installed and started when the Open Dental software is updated to version 22.2.16 or later.

If you are on this version or later, you can manually install the Service the same way you would the eConnector:
  • On your server, launch Open Dental as Administrator.
  • Navigate to Tools > Misc Tools > Service Manager. Double click on OpenDentalAPIService.
  • Click install and then Start.

annaswaheed
Posts: 5
Joined: Wed Jul 13, 2022 8:26 am

Re: API Service Unable to connect

Post by annaswaheed » Wed Jul 13, 2022 2:39 pm

I have tried the above steps. On my server inside Tools-> Misc Tools -> Service Manager there is a list but there is no OpenDentalAPIService and when i click on add i do not see OpenDentalAPIService in the OpenDental Folder. I have also tried uninstall and reinstalling open dental in the hopes that OpenDentalAPIService will show up but it did not. is there a way to download and install OpenDentalAPIService separately?

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

Re: API Service Unable to connect

Post by SLeon » Wed Jul 13, 2022 3:02 pm

Which version of Open Dental are you using? For reference, the OpenDentalAPIService.exe is located in the \\OpenDental\OpenDentalAPIService directory.

annaswaheed
Posts: 5
Joined: Wed Jul 13, 2022 8:26 am

Re: API Service Unable to connect

Post by annaswaheed » Thu Jul 14, 2022 8:03 am

I have two computer running openDental

1) the first one is running version 22.2.13.0, this computer has the OpenDentalAPIService folder and i was able to install the OpenDentalAPIService but in the service manager when I try to start the service while running OpenDental as an administrator i get the error "Time out has expired and the operation has not been completed." do you know why it is not starting and what can i do to fix this?

2) The second computer has openDental Version 22.1.44.0 and this computer does not have the OpenDentalAPIService folder in the OpenDental root directory. i have tried to uninstall and reinstall openDental in workstation and server mode and non of these installation option have fixed the issue. do you know how i can get OpenDentalAPIService on this computer and why it does not exist in the root directory of opendental and what can i do to fix this?

thank you

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

Re: API Service Unable to connect

Post by SLeon » Thu Jul 14, 2022 8:26 am

I see. The API Service was only added to our beta in version 22.2.13, which is why your second machine does not have the OpenDentalAPIService folder. The automatic installation of the API Service (and many other improvements) became available in 22.2.16. I strongly recommend you update machine #1 to at least this version. If the API is Enabled and the update is ran as Admin, this should be the only action you will need to take.

The API Service version is tightly coupled to the version of Open Dental; they will not work properly if there is a mismatch (similar to the eConnector).

annaswaheed
Posts: 5
Joined: Wed Jul 13, 2022 8:26 am

Re: API Service Unable to connect

Post by annaswaheed » Thu Jul 14, 2022 8:52 am

Thank you for quick response, I have updated both of the machines to the latest 22.2.19.0 beta version and now both of them have OpenDentalAPIService Installed but when I try to start the service I'm still getting the same error "Time out has expired and the operation has not been completed." Do you what causing the service to not be able to start? I'm running OpenDental on both machine as an Administrator.

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

Re: API Service Unable to connect

Post by SLeon » Fri Jul 15, 2022 7:58 am

After reaching out to the developer directly, this issue as been resolved. We strongly recommend beta customers update to version 22.2.16 or later to install the Open Dental API Service. Additional information on Manual Installation of the Service has been added to our API Modes - Local and Service page.

Post Reply