[Building Sakai] RESTful services in Sakai
Daniel Merino
daniel.merino at unavarra.es
Thu Feb 21 05:58:18 PST 2013
Thanks everybody for all these cool examples.
I have seen that there are mainly User and Announcements services, but
Gradebook, Assignments and Samigo don't have them, so I imagine that our
teacher won't be able to do what he wants.
Thanks a lot
Best regards.
Adrian Fish escribió:
> 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 <mailto: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
> <http://udl.cat>
> =====================
> University of Lleida
> Information and Communication Systems Service
> Analyst / Programmer
> Twitter: @sinmsinm
>
> Tlf: +34 973 702148 <tel:%2B34%20973%20702148>
> Fax: +34 973 702130 <tel:%2B34%20973%20702130>
> =====================
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> <mailto: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
> <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a
> subject of "unsubscribe"
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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"
--
Daniel Merino Echeverría
daniel.merino at unavarra.es
Gestor de teleformación - Centro Superior de Innovación Educativa.
Tfno: 948-168489 - Universidad Pública de Navarra.
--
La inteligencia me persigue pero yo soy mas rápido. (Les Luthiers)
More information about the sakai-dev
mailing list