Jump to:

23581 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » SS WebServices

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

Page: 1
Go to End
Author Topic: 1753 Views
  • biapar
    Avatar
    Forum Moderator
    435 Posts

    SS WebServices Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5511 Posts

    Re: SS WebServices Link to this post

    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

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: SS WebServices Link to this post

    Roger...

  • CoconutDrink
    Avatar
    Community Member
    16 Posts

    Re: SS WebServices Link to this post

    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.

    1753 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.