Basically what I want to do is to create a SilverStripe CMS that allows users to enter information. Instead of displaying this information on a webpage like normal I want to output it using JSON to a hybrid mobile app. I know I have to use the RESTful server API and dataobjects but I’m a little unclear about how it will actually work.
Would appreciate a little enlightenment on this.
Saving the data into the database is very easy, this is even covered in one of the 5 basic tutorials.
Providing this information via REST isn’t that hard either, if you just need basic functionality.
SilverStripe already comes with REST support, but at least in 2.4 this REST support is rather limited and really closely tied to the database model.
As far as I can tell, the REST Server has been removed in SS 3.0
Here a link to the API docs on the RestfulServer class in SS 2.4: http://api.silverstripe.org/2.4/sapphire/api/RestfulServer.html#class_details
as taken from that docs, its rather simple to allow api access to objects:
and than access it via
http://mysite.com/api/v1/ArticleIf this does not cover your needs, I see 2 alternatives you could take: