RESTful API error
Posted: Wed Jun 05, 2019 3:31 pm
Hello,
I got a developer's key and I think I have everything setup to develop on top of the FHIR RESTful API. I'm new to using OpenDental (OD) and to the FHIR model. I'm using this doc as reference: https://www.opendental.com/resources/Op ... -1Spec.pdf
My code is written in Scala so I do as described in that doc:
This request seems correct, for example, if I remove the key then the FHIR RESTful API test server will complain that the authorization key is invalid etc.
For every valid request I get back the following:
Is this an issue on the test server or am I doing something wrong? maybe some misconfiguration in my test OD installation?
TIA,
Best regards,
Giovanni
I got a developer's key and I think I have everything setup to develop on top of the FHIR RESTful API. I'm new to using OpenDental (OD) and to the FHIR model. I'm using this doc as reference: https://www.opendental.com/resources/Op ... -1Spec.pdf
My code is written in Scala so I do as described in that doc:
Code: Select all
//val url = "https://api.opendental.com/fhir/organization?name=Relaxation%20Dental"
val url = "https://api.opendental.com/fhir/capabilitystatement"
val fhirRequest: WSRequest = ws.url(url)
.withHttpHeaders(
"Content-Type" -> "application/json",
"Authorization" -> "FHIRAPIKey=%s".format(config.get[String]("fhir.api.key")),
"Accept" -> "application/json"
)
.withRequestTimeout(10000.millis)
val futureResponse = fhirRequest.get()
futureResponse.map { response =>
Ok(response.json)
}
For every valid request I get back the following:
Code: Select all
{"issue":[{"severity":"error","code":"exception","details":{"text":"The server has encountered an error."}}]}TIA,
Best regards,
Giovanni