Submit a request
Submit a request

Switching Between Testing and Reviewing With States

This article covers state property, and how it is used. State controls the startup modes of the API, to allow for different behaviors during an assessment.

The state will determine the mode that the API should use to initialize.
Based on its value, you will be able to start/preview a new Activity or continue/review an existing Activity. 

It is not always necessary to define state, because the API will intelligently choose a state for you based on the session id.

If you want to specify a state for Items API, there are two possible values: "review" and "preview"


When initialising Items API, the state does not need to be set. Internally, the API will check whether a session exists for a given session_id, then do one of the following:

  • If an existing session is found the assessment will be initialized in "resume" mode.
  • If no existing session is found, a new assessment will be created (in "initial" mode).

However, if you want to initialise an assessment in review or preview mode, the state needs to be set using either "review" or "preview" as required.

Was this article helpful?
0 out of 1 found this helpful

Did you arrive here by accident? If so, learn more about Learnosity by clicking here.