I’m trying to interact with the Rest API’s using curl. No matter what I try, I get
curl: (7) Failed to connect to localhost port 8300: Connection refused
Getting this error trying the auth POST command to get a bearer token, and also doing this simple request:
curl -X GET -H ‘Content-Type: application/json’ ‘http://localhost:8300/apis/api/facility’
Tried with and without the 8300, and using http and https. Nothing changes
I did a netstat -a -b and I do not see anything listening on port 8300
I did see a service listening on localhost.49221. When I tried 49221 in the curl command, I did not get an error, but also got no response
I am using xampp 7.3.21-0 on mac. Tried openemr versions 5.0.2(4) and 6.0. I enabled the Rest API in admin|globals|connectors and logged out/on to openemr
The only changes I made to xampp were to get https working with a self-signed cert. I can access openemr via http or https
I am able to see appropriate results on the InternalApiTest.php page
Don’t see any errors in apache or php error logs
I saw the comments in a different thread about /apis/.htaccess directives being overwritten by apache conf file, and I tried making the changes to the Directory section in apache conf, but no effect.
I also can’t figure out where in the openemr code that port 8300 is specified
Any ideas why there does not seem to be anything listening on port 8300, or what else to try to get openemr responding to the various curl statements listed in the api documentation?