API discovering with REST shell

The highlight of the Designing REST-ful APIs with Spring 3 presentation at Devoxx was a demonstration of the REST shell. In this post I will give you a updated version of the source and outline of the steps to run the demo yourself.

First let’s set up the REST service. I forked the original source tree in GitHub to fix some dependency issues (and sent the pull request to upstream). For now you can use the following:

1
2
3
git clone https://github.com/javascript-enabled/devoxx-2012.git
cd devoxx-2012
mvn tomcat:run

And the RESTful service is running! The next step is to get REST shell running, by first clone the source and second to launch the shell with:

1
2
3
get clone https://github.com/SpringSource/rest-shell.git
cd rest-shell-1.2.1.RELEASE/bin/
./rest-shell

Now you ready to run the Quiz Door Game. Below you can find the steps according to the presentations demo,

1
2
3
4
5
6
7
8
9
10
11
baseUri http://localhost:8080/lets-make-a-deal/games
post 
follow 0
get
follow doors
get
put  1 --data {status:"SELECTED"}  
get
put  2 --data {status:"OPEN"}   # or take door 3
up
delete 0
 

One thought on “API discovering with REST shell

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>