Rails API for an existing rails APP?

Hello, i have create an rails APP and i want to create an rails API for this app. is possible to app have the same database with the API so i can run User.all to my API and get the info from the Rails APP database

This could be difficult to maintain. One solution could be to send your “User.all” from your API to your app a Json (or a similar format).