10390 Posts in 2201 Topics by 1712 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 513 Views |
-
Restful Server in Silverstrip 3

29 July 2012 at 1:30am
Hello Friends,
I am using Silverstripe 3 and fount Restful server class is missing in SS3,So i installed the Restful server module for SS3,
In my DataObject class i have enabled the Resetful service like
static $api_access = array(
'view' => array('data'),
);But when i try to use the link domain.com/api/v1/tablename/?xyz=123 ,it returns
<DataList totalSize="5">
</DataList> ,bu not the recoreds which i want i.e data form the tablename.
Any help appriciated....
Thank You -
Re: Restful Server in Silverstrip 3

29 July 2012 at 8:14pm
Make sure you have defined a canView() function on your DataObject and that it returns true (or does whatever permission checking you need)
-
Re: Restful Server in Silverstrip 3

31 July 2012 at 2:46pm
Thanks Willr it worked,
But one thng is if i am using date in the url like
domain.com/api/v1/tablename/?xyz=2012-01-12I am getting all the records from database instead of only one corresponding to that date.
I have only one record for xyz=2012-01-12,but i get all.
What can be the reason for this? -
Re: Restful Server in Silverstrip 3

3 August 2012 at 2:43am
I know this is a little away from what you were discussing but I am having trouble with the RESTful Server API in 2.4.7 but it asks me to log in when I put this in http://localhost:8888/2.4.7/api/v1/ArticlePage/1
It then says my name and password are wrong. I've checked and rechecked and it is definitely right because it is the one I gave when installing SilverStripe. I know it must be something obvious but I'm stuck.
Thanks in advance.
| 513 Views | ||
|
Page:
1
|
Go to Top |



