Over a million developers have joined DZone.

Authoring Interactive APIs Using Neo4j Swagger

DZone's Guide to

Authoring Interactive APIs Using Neo4j Swagger

· Java Zone
Free Resource

Bitbucket is for the code that takes us to Mars, decodes the human genome, or drives your next car. What will your code do? Get started with Bitbucket today, it's free.

When developing web applications it becomes very useful to start by authoring an API over your data model in order to expose certain services to data-driven components of your front-end application.

For Neo4j, the best API authoring solution out there is Neo4j Swagger.

What does Neo4j Swagger do?

Neo4j Swagger is an API authoring solution that runs exclusively on top of a Neo4j graph database and was created by Mat Tyndal as an open-source project forked from Swagger.

Swagger is a Node.js open-source project that enables you to author interactive APIs on top of your data model.

What does the architecture look like?

Your front-end web app, which looks like this:


Makes HTTP REST requests to Neo4j Swagger, which looks like this:


Which then makes parameterized Cypher queries to a Neo4j database instance, which can be easily hosted in the cloud on either http://graphhost.com/ or http://www.graphenedb.com/

Neo4j then returnsresultstoSwagger, which then returnsresults back to your web app.

That's it. It's a super simple architecture and it's all open-source and ready for you to start programming with. You can clone my movie recommendation example app in the links above.

If you're interested in reviewing some slides from a recent talk I did about authoring this API and front-end application, head on over to SlideShare: http://www.slideshare.net/KennyBastani/building-killer-apps-with-neo4j-20

Bitbucket is the Git solution for professional teams who code with a purpose, not just as a hobby. Get started today, it's free.


Published at DZone with permission of Kenny Bastani, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}