Adds rails api with example route and test.

@azevedo-252 what do you think?
Maybe just leave it for now, let's see how this grows.