Open application services as API

Hi, We have developed an application which is running fine. Our next step is to open our application services as the RESTFUL API for other applications.

Can anyone tell me how could I proceed to this?

Thanks, Mike


Without a few more details it's hard to say, so I'll make some assumptions:

* You have token based authentication. * Your controllers and routes are already setup in a RESTful pattern. * Serializing your models is not a big deal.

If these assumptions hold, all you need to is follow the pattern set forth by the scaffold generators: depending on the format requested, respond in kind with the serialization format you desire. If the middle assumption does not hold, make an "/api/" namespace and define new routes for your API.