Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

SS WebServices


Reply


4 Posts   1824 Views

Avatar
biapar

Forum Moderator, 435 Posts

6 July 2010 at 10:34pm

Is it possible to publish web services in SS?

Here http://doc.silverstripe.org/restfulservice is for consuming web services data.

Will be support JSON?

Avatar
Willr

Forum Moderator, 5513 Posts

7 July 2010 at 4:50pm

RestfulServer is the publisher (Restful Service and RestfulServer are 2 different things). And yes AFAIK it supports JSON or XML output.

See
http://doc.silverstripe.org/restfulserver
http://api.silverstripe.com/2.4/sapphire/api/RestfulServer.html

Avatar
biapar

Forum Moderator, 435 Posts

7 July 2010 at 8:10pm

Roger...

Avatar
CoconutDrink

Community Member, 16 Posts

24 September 2010 at 5:06am

Edited: 24/09/2010 5:06am

Based on the example listed in the RestFul server
class Article extends DataObject {
   static $db = array('ID'=>'int',Title'=>'Text','Published'=>'Boolean');
...
}
it is possible then to retrieve the JSON format of the Article using a URL accessing the .../v1/article/12
(assuming the there is an Article with ID= 12)

I would like to make sure that only the embeded java applets or Flash object can call the Silverstripe Restful server but
not a user that directly key in the correct URL.

Is there some way to do that? Before the RestServer return the result in Json format, it checked if there is existing user log in.

Thank you.