Adds rails api with example route and test.

@azevedo-252 what do you think?
@azevedo-252 what about now?