OHDSI Home | Forums | Wiki | Github

WebAPI Alpha Release

I have released the initial version of the WebAPI project to GitHub. This is a source only release, there are no release packages. To leverage this release you will need to clone the repository and build the source using a maven compatible IDE. I’m currently using NetBeans. The readme file on GitHub has been updated to reflect the necessary build and configuration steps.

I’m looking forward to feedback and contributions to this API as the project moves forward. I’ll be releasing the first version of HERMES soon. HERMES will be the first application to leverage the VocabularyService of the WebAPI.

Congratulations Frank. This is a key step forward for OHDSI, and we will adding to the WebAPI project as Heracles comes online in Q1 2015.

Nice work @Frank . I was able to clone the project and build it with maven. @ajmazurie and I plan test a configuration on the knowledge base dev server. Would you please add in the WebAPI README a couple of example REST calls to vocabulary we could make for testing purposes?

Thanks. As you suggested I’ve updated the Github readme to include a few sample calls to the WebAPI that you can use to test an installation.

I’ve deployed @Frank 's cool WebAPI services as a demo on the OHDSI development server.

This deployment of the WebAPI is connected to database views that only show data from unrestricted vocabularies on the OHDSI dev server postgres vocabulary V5 database, so there should be no issues in making it publicly available.

It’s running in a tomcat docker container.

Here are the URLs (based on Frank’s examples) if you would like to try it out:

http://54.84.95.238:2020/WebAPI/vocabulary/concept/0
http://54.84.95.238:2020/WebAPI/vocabulary/concept/0/related
http://54.84.95.238:2020/WebAPI/vocabulary/search/cardiomyopathy

Lee,

This is great!

I believe the service went down though sometime between yesterday and today, as it is no longer responsive. Can you double check?

Thanks!

Jon

Hi Jon,

the service still seems to be working for me. The original urls still work and I just tried the following URL successfully:
http://54.84.95.238:2020/WebAPI/vocabulary/search/Dextromethorphan

I double checked the AWS security group and it seems like the service should be publicly available.

Is there a specific URL that is not working? One thing to keep in mind is that the URL is case sensitive, so it has to be /WebAPI/ not /webapi/.

regards,
Lee

Ah it was my VPN!

Thanks Lee!

PS Any chance we can put the docker build scripts on github?

It’s currently a manual process to set the DBMS connection configuration in the WebAPI web.xml file, build the latest WebAPI war file in Netbeans on my local computer and then copy it over to the docker server.

Basically the dockerfile just copies the war file and jdbc driver file into the right directories in a docker container that’s based off the standard tomcat docker image. It’s simple but quite powerful. I can simultaneously run multiple copies of the WebAPI on the same server in separate docker tomcat instances with different configurations (including different DBMSs) for development/unit testing/production, mapping the exposed docker containers port to different host ports in the docker run command.

I’m not sure if the Dockerfile belongs in the WebAPI project on github because it’s more of a deployment/operational detail - docker is NOT a dependency for running the WebAPI. So for now I’ll just post the Dockerfile contents below:

# use the standard docker tomcat image as the base image for this image
FROM tomcat

MAINTAINER Lee Evans <levans@ohdsi.org>

# Install the WebAPI WAR file to the tomcat webapps directory
ADD WebAPI.war /usr/local/tomcat/webapps/
    
# Install the postgresql jdbc driver to the tomcat lib directory
ADD postgresql-9.3-1102.jdbc3.jar /usr/local/tomcat/lib/
    
# expose the standard tomcat port to the host
EXPOSE 8080
    
# Start the Tomcat web server (which will auto install the above WAR file)
CMD /usr/local/tomcat/bin/catalina.sh run
t