10848 Posts in 2516 Topics by 1792 members
|Go to End|
29 July 2012 at 1:30am
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> ,bu not the recoreds which i want i.e data form the tablename.
Any help appriciated....
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)
31 July 2012 at 2:46pm
Thanks Willr it worked,
But one thng is if i am using date in the url like
I 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?
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.
|Go to Top|