Web service API

This page details the subset of the web service API that exposes functionality for your application’s backend.

/session/create/spec

Creates a new session id for an exercise, defined through an Exercise Definition Object. This session id is the handle that you supply to the frontend widgets. For interactive exercises, every intermediate step (with evaluation result and feedback) and every requested hint is stored by AlgebraKiT and is referenced by this unique session id. The session id is also used to retrieve scoring information after an exercise is finished.

Input parameters

exerciseSpec Exercise Definition of the exercise.
options General options to AlgebraKiT. The most important one being the format for mathematical expressions (MathML or Latex).

Returns

session-id A unique id for this session.

/session/create/cms

Creates a new session id for a (possibly randomized) exercise from AlgebraKiT’s CMS. This session id is the handle that you supply to the frontend widgets. For interactive exercises, every intermediate step (with evaluation result and feedback) and every requested hint is stored by AlgebraKiT and is referenced by this unique session id. The session id also used to retrieve scoring information after an exercise is finished.

The exercise definition is available in AlgebraKiT’s CMS and can be a predefined exercise from AlgebraKiT, or an exercise that was defined by you earlier. Exercises are typically stored (‘published’) using a separate publish-id, such that changes made in the CMS do not affect the exercises that are used in a production situation.

Input parameters

courseId Reference to the repository of exercises. You should have received this id from AlgebraKiT.
exerciseId Id of the exercise in the CMS.
publishId Id of the published version in the CMS. If absent, the current (unpublished) exercise specification is taken from the CMS.
level Difficulty level for the exercise. Applicable for randomized exercises, which generally offer multiple difficulty levels. Default value is 0, which represents the lowest level. The number of difficulty levels offered by the exercise, can be retrieved from /exercise-info.
options General options to AlgebraKiT. The most important one being the format for mathematical expressions (MathML or Latex).

Returns

session-id A unique id for this session.

/session/result

Get all results for a session. Returns a list of all ‘events’ (evaluate or hint) that occurred during the course of the exercise, including the evaluation result of AlgebraKiT.

Input parameters

sessionId Id of the session
appId Id of the client application.

Returns

events An array containing extensive information on every evaluation or hint.
status Overall status of the exercise: FINISHED, CORRECT (‘not finished’) or ERRORR (last input of student was incorrect).
progress Indication of what percentage of the exercise was completed.

/exercise-info

Get general information about a randomized exercise, such as its name and the number of difficulty levels. This is an HTTP GET endpoint that can be called from anywhere and does not require credentials.

Input parameters

HTTP GET: /exercise-info/publishId/{publishId}/courseId/{courseId}/exerciseId/{exerciseId}
publishId Id of the published version in the CMS.
courseId Id of your math course in the CMS.
exerciseId Id of the exercise in the CMS.

Returns

name Name of the exercise, e.g. "Factoring with the Method of Products and Sums"
numberOfLevels The number of difficulty levels.
audience The student level (seniority) for which this exercise is intended.

/exercise/generate/cms

Generates multiple Exercise Definitions from a single randomized exercise. AlgebraKiT offers many randomized exercises, ordered by learning goal and difficulty level. Use /create/session/spec to initiate a session from such an Exercise Definition.

Input parameters

exerciseId Id of the exercise in the CMS.
courseId Id of your math course in the CMS.
publishId Id of the published version in the CMS.
nr Number of exercises to generate (max 20).
level Difficulty level, an integer value starting at zero. The number of difficulty levels can be obtained from /exercise-info.

Returns

An array of:
view Information relevant for display in the front end, such as instruction text, assignment expression and required buttons for the formula editor.
exerciseSpec Exercise Definition object.
about algebrakit contact us
Contact info@algebrakit.nl
Try our demos +31 624827648
Disclaimer Helmond, the Netherlands
Copyright AlgebraKiT 2017