Create session

Create new sessions for the (possibly randomised) exercises from AlgebraKiT’s CMS. To save round trips to AlgebraKiT’s web service, you can create multiple sessions in one call. For each session, a unique session id is returned. The reply also contains the optimised html code to create and initialise the widget for each session. You can insert this html in your web page at the appropriate location.

Endpoint /session/create


   snapshotId?: <string> 
   scoringModel?: <string> 
   exercises: [{
      exerciseId?: <string>
      versionId?: <string>
      exerciseSpec?: {...}
      level?: <int>
      nr?: <int>
   attributes: [{key: value}]


   success: <boolean>
   msg?: <string>
   sessions: [{
     success: <boolean>
     msg?: <string>
     sessionId: <string>
     appId: <string>
     html: <string>

Input parameters

exerciseId ID of the exercise in the CMS. Either exerciseId or exerciseSpec is required.
snapshotId A snapshot contains a collection of published exercises, defined in AlgebraKiT's CMS. Either snapshot or version is required if exerciseId is given.
version The published version number of the exercise (number) or 'latest' to indicate the current version in the CMS. Either snapshot or version is required if exerciseId is given.
exerciseSpec Exercise Definition of the exercise. Either exerciseId or exerciseSpec is required.
scoringModel Optional. Reference to a predefined scoring model that is to be applied for the exercise and all interactions in it. If given, AlgebraKiT calculates the total marks and the marks earned, based on the evaluations of the student's input and taking into account errors and hint requests.
level Optional. Difficulty level for the exercise. Applicable for randomised exercise arrangements, which generally offer multiple levels of difficulty. Default value is 0, which represents the lowest level. The number of levels of difficulty offered by the exercise, can be retrieved from /exercise-info.
nr Optional. Number of sessions to generate for this exercise. Only relevant for randomised exercises. Default value is 1.
attributes Optional. List of key-value pairs to influence the widget (see attributes ).


For each element of input array exercises, an array of length nr with session results.

success Indicates if creation of the session succeeded
msg If creation of the session was not successful, information about the error.
sessionId A unique id for this session.
html Optimised html code to create the appropriate widget. For optimal performance, this html code contains already the initialization data that the widget requires.
about algebrakit contact us
Demo +31 85 1308316
Privacy Policy Eindhoven, the Netherlands
Copyright AlgebraKiT 2018