QTIEngine REST API

From QTITools Wiki

Jump to: navigation, search

The original QTIEngine doesn’t provide any web service interface for remote application to retrieve. What we have done is adding RESTful Web services to use the functions provided by QTIEngine. These methods can be found at QTIEngine/grails-app/RestController.groovy

Contents

[edit] Status

This has been merged into QTIEngine trunk (revision 2447). The installation instructions below are for the original version.

[edit] Installation

Check out the latest version from svn://svn.forge.ecs.soton.ac.uk/projects/easihemobile/QTIEnginePei, you can directly deploy the service on your server using QTIEngine-0.1.war file. If it succeeded, you could find the service running at http://yourservername/QTIEngine

[edit] Main methods

  • newSession(), sapmle url http://yourservername/QTIEngine/rest/newSession, the output is a session id as String
  • upload(), used to upload QTI file. Input parameters are required such as jsession and actionUrl that is sent through url QueryString, the output is a returned xml file
  • playItem(), used to play sigle QTI item. Input params: jsession (required), actionUrl(required), the actionUrl will be a parameter in the post form
  • playTest(), used to play QTI content package. Input params: jsession (required), actionUrl (required) ,imageUrl (optional, if it’s necessary to specify image url).
  • report(), used to generate final report only for test not item. Input params: jsession (required, in query string), actionUrl(required, we insert it in the post form). There should be a parameter with key as “report”
  • Localize (private). Localize is not a public interface. It can only been used inside QTIEngine. This method is in

RestService.groovy in QTIEngine/grails-app/services/. The detailed explanation of this method can be found on easihe technical document.

[edit] Implementation

A sample usage of the QTIEngine Web Service is Discrete Maths Website, source code can be checkout from svn://svn.forge.ecs.soton.ac.uk/projects/easihemobile/DiscreteMathsDeploy.

[edit] Documentation

The detailed technical document and user guide can be found here