(I’ve also tried multiple variations, including changing /openmers-standalone/ to just /openmrs/, changing /fhir2/ to just /fhir/, etc…with no luck).
Is there an additional configuration needed in order to access the FHIR endpoints? Do I need to modify the URL or my approach? Or does this module just not work with the standalone version?
@captplanet if am not mistaken , Fhir2 is an extension of Fhir , so question are you using Post man or Refapp UI ?If Refapp , I wonder wether Fhir2 has a UI extension,I manipulted that by using Fhir Rest Client and changing the endpoint from /openmrs/ws/fhir/ to /openmrs/ws/fhir2/
I’ve made these GET calls both using curl, and using the chrome Advanced Rest Client extension. I’ve tested all these variations:
/openmrs-standalone/ws/fhir2/
/openmrs-standalone/ws/fhir/
/openmrs/ws/fhir2/
/openmrs/ws/fhir/
Are you able to spin up the standalone app and make successful GET calls to that /openmrs/ws/fhir2/ address? If it’s working for you (specifically with the local jar-based standalone app, not the web demo), that would suggest I’m just doing something wrong on my end…
Ah! I’ve tested a bit more, and realized that the /fhir/ address isn’t actually returning 404s, it’s returning 401s (unauthorized)! Definitely missed that on my first round of testing.
Do you happen to know the header names for authenticating API calls?
You didn’t even give me feed back wether the options which provided worked.Did they work for you ?
For the standalone app, the only address that doesn’t return a 404 error is /openmrs-standalone/ws/fhir/, which is actually instead returning a 401 unauthorized error. I’m trying to figure out the expected header format for authorization is, but I can’t seem to find anything in the documentation.
I never worked with the stand lone but rather , the SDK Instance
I haven’t yet had a chance to try this with the SDK instance.
With a person or patient Id that exists in the Database .
Yep, I’ve been trying with an existing patient id.
However, I should be good now. I dug through the normal (non-FHIR) REST API documentation, and was able to find that API calls simply need Basic base64-encoded auth headers.
I’ve added those, and now the FHIR endpoints are working as expected.