Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The 10-Minute API: Getting an API Up and Running in 10 Minutes with 3scale, Grape and Heroku

DZone's Guide to

The 10-Minute API: Getting an API Up and Running in 10 Minutes with 3scale, Grape and Heroku

· Cloud Zone ·
Free Resource

See why enterprise app developers love Cloud Foundry. Download the 2018 User Survey for a snapshot of Cloud Foundry users’ deployments and productivity.

APIs can be complex and challenging to operate – but it doesn’t have to be hard to get started. To prove it and also inaugurate our video tutorial series we figured we show how to get a very simple API up, running and hosted easily and in less time than it takes to cook a hot dinner.

To get everything up and running we used:

  • Grape: a lightweight web framework on top of Ruby similar to Sinatra but focused on REST Web APIs. The frameworks makes it very easy to declare resources, set up method calls and manage responses. Also see Michael Bleigh’s cool rubconf presentation on slideshare.
  • 3scale: providing out of the box authentication for the API and allowing us to issue developer keys right from launch.
  • Heroku: a free Heroku account to host the API when it’s done.

The example is a simple Sentiment Analysis API – the code for which you can find on github shortly. We’ll build on this example and add lots of fun stuff in future episodes.

For now, sit back and check out the video:

[UPDATE: the source code for all the examples is now available in our example Github repo].

Look out for the next episode on adding analytics coming up soon!

Cloud Foundry saves app developers $100K and 10 weeks on average per development cycle. Download the 2018 User Survey for a snapshot of Cloud Foundry users’ deployments and productivity. Find out what people love about the industry standard cloud application platform.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}