does rails route provide same architecture as restful api has?
As an advice. When you’ll make a decision which technique to use take also look into grape gem.
i need to implement in rails
@rails6learner Reading a book is definitely good advice, but to clarify: Rails is one way to build a REST API. You could also use Rails to build other APIs (such as GraphQL or websockets-based). REST, however, is probably the biggest way that people have made APIs in Rails historically, so Rails definitely works for that.
grape is a gem which can work along with Rails (it can work with other frameworks too). I also recommend checking it out to maybe make things simpler
Not by itself but yes you can create RESTful APIs with RAILS. That requires from you that you set up your application in such a way that the data can be accessed as resources and that you create controllers that provide an API in a RESTful way. That said you do get a lot of support from RAILS.