REST API for DocumentDB
I am a Gold member of the HL7 Organization. I am on the development team of a new HL7 Standard, FHIR® – Fast Healthcare Interoperability Resources.
FHIR® has it’s own REST API. There are several FHIR® Servers, most of them use MongoDB and other no-SQL repositories. I believe there is one in Azure that uses SQL Server.
DocumentDB, with it’s REST API is the perfect repository for an FHIR® server in Azure. Mapping the FHIR® REST API to the my DocumentDB REST API is fairly easy.
The only drawback is the DocumentDB does not publish its REST API
So I started to develop a new DocumentDB REST API
I started with the creation of a Swagger.json that duplicates the operations in the DocumentDB REST API. Code can be generated in Visual Studio, using the Add REST API for a client application. I used the Select an existing Swagger metadata file option as shown in the following figure.
If I need to make changes, I can modify my HEDIDIN-DocumentDBConnector-1.0.5-swagger.json and regenerate the source code. The following figure shows my Swagger in the SwaggerHub
I have made my HEDIDIN-DocumentDBConnector-1.0.5-swagger.json and the DocumentDBRestApi source code for the API App available on my GitHub Repository.