Fixed
Details
Priority
MinorAffects versions
Fix versions
Components
Assignee
Steve SwinsburgSteve SwinsburgReporter
Diego del Blanco OrobitgDiego del Blanco Orobitg
Details
Details
Priority
Affects versions
Fix versions
Components
Assignee
Steve Swinsburg
Steve SwinsburgReporter
Diego del Blanco Orobitg
Diego del Blanco OrobitgCreated August 14, 2015 at 3:04 PM
Updated March 23, 2022 at 3:03 PM
Resolved October 20, 2015 at 6:10 PM
Here is a new webservice set called Activity that allows to query the user events. This can be very useful to control the user activity externally to Sakai.
-getUserActivityByType returns all the events of a type from a user
http://localhost:8080/sakai-ws/rest/activity/getUserActivityByType?sessionid=ed446383-8e95-48c9-9a62-d71cbe619fa1&eid=admin&eventType=annc.new
-getUserLogonActivity returns all the logins of a user
http://localhost:8080/sakai-ws/rest/activity/getUserLogonActivity?sessionid=ed446383-8e95-48c9-9a62-d71cbe619fa1&eid=admin
-getUserActivity and getUserActivityStringDates return the events of a user between 2 dates.
http://localhost:8080/sakai-ws/rest/activity/getUserActivityRestVersion?sessionid=ed446383-8e95-48c9-9a62-d71cbe619fa1&eid=admin&startDate=2013-09-10%2020:00:00&endDate=2018-09-10%2020:00:00
NOTE: There are 2 versions becuase when we call it as a REST, it needs to convert the string to dates (getUserActivityStringDates) and when calling it as a webservice, the parameters are directly dates.
There is an option to do this with only one webservice using this:
https://cirovladimir.wordpress.com/2012/09/18/apache-cxf-jax-rs-class-java-util-date-can-not-be-instantiated-using-a-constructor-with-a-single-string-argument/
But it needs to create the ParameterHandler and a lot of extra steps. If you consider that having 2 version (one for REST calls and another for the traditional calls) is fine, then this patch works.