[Building Sakai] RESTful services in Sakai

Adrian Fish adrian.r.fish at gmail.com
Mon Feb 18 06:21:43 PST 2013


You could also have a look at the CLOG code in contrib. There's a file
called clog_utils.js that does lots of entityprovider calls.

Stuff like:

jQuery.ajax( {

url : "/direct/clog-post.json?siteId=" + clogSiteId + "&autosaved=true",

       dataType : "json",

       async : false,

cache: false,

   success : function(data) {

clogCurrentPosts = data['clog-post_collection'];

                ClogUtils.addFormattedDatesToPosts(clogCurrentPosts);

},

error : function(xmlHttpRequest,status,errorThrown) {

alert("Failed to get posts. Reason: " + errorThrown);

}

   });

Cheers again,
Adrian.


On 18 February 2013 13:58, Alexandre Ballesté <alexandre.balleste at udl.cat>wrote:

> Hi Daniel, You cant take a look to these "dirty" js/html examples [1].
> You could  see how to start.
>
> [1]
> https://cv.udl.cat/access/content/group/html-avan-2011/sakai-rest.tar.gz
>
>
> On 02/18/2013 02:32 PM, Daniel Merino wrote:
> > Hi everybody.
> >
> > One of our teachers has asked us how could he retrieve data from their
> > sites (specifically Assignments and Gradebook items) for their own
> > applications.
> >
> > I have tried to take a look on REST services, but I have not found too
> > much documentation about how to use them.
> >
> > I understand that the available services are described in
> > /direct/<TOOL>/describe, but I'm not able to retrieve nothing but site
> > generic XML info.
> >
> > For example, using /direct/announcement/<siteid>.xml should retrieve all
> > the site's announcements but it shows an empty xml document.
> >
> > And direct/gradebook/<siteid> shows a form to add an announcement even
> > without being logged. Trying to get direct/gradebook/<siteid>.xml throws
> > an exception.
> >
> > I'm sorry if this is a simple question, but does somebody know where
> > could I find simple use examples of REST services calls?
> >
> > Thanks in advance.
>
>
> --
> Alexandre Ballesté Crevillén  alexandre.balleste at udl.cat
> =====================
> University of Lleida
> Information and Communication Systems Service
> Analyst / Programmer
> Twitter: @sinmsinm
>
> Tlf: +34 973 702148
> Fax: +34 973 702130
> =====================
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130218/2863f220/attachment.html 


More information about the sakai-dev mailing list