Skip to content

2. Creating an exam by LMS

Usually an exam in the proctoring system is created automatically along with the first session for that exam, when the test taker follows the link. However, sometimes it is useful to create an exam in advance. The client system can call the Constructor Proctor API to create or update an exam.

API URL:

https://[proctor-url]/api/v2/integration/simple/[integration_name]/exams/

Request method:

POST

Request headers:

Content-Type: application/json  
Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTI5OTQxMzF9.PRzN

The JWT signature is used to verify that the request sender is the client’s system and that the token was generated exactly when the request was sent. In the payload the JWT contains the expiration date and time of the token in the numeric timestamp format. The time can be calculated using the formula “current time + 30 seconds”.

JWT Payload example:

json
{
    "exp": 1234567890  
}

JSON body of the request contains the same organization / company and exam parameters as are required for starting a proctored test.

Request body example:

json
{
  "accountId": 123,
  "accountName": "Corporate university",
  "examId": "a3875623",
  "courseName": "Physics",
  "examName": "Final test",
  "userAgreementUrl": "https://school.org/eula",
  "duration": 120,
  "schedule": true,
  "auxiliaryCamera": false,
  "proctoring": "online",
  "identification": "passport",
  "trial": false,
  "rules": {
    "allow_to_use_paper": true,
    "allow_to_use_calculator": false
  },
  "startDate": "2018-03-27T00:00:00Z",
  "endDate": "2018-03-30T12:55:00Z",
  "scoreConfig": {
    "cheaterLevel": 80,
    "extraUserInFrame": 1.0,
    "substitutionUser": 1.0,
    "noUserInFrame": 1.0,
    "avertEyes": 1.0,
    "changeActiveWindowOnComputer": 1.0,
    "forbiddenDevice": 1.0,
    "voiceDetected": 1.0,
    "phone": 1.0
  },
  "visibleWarnings": {
    "warning_extra_user_in_frame": false,
    "warning_timeout": false
  }
}

Constructor Proctor responds with a 201 Created status if the exam has been created, or with a 200 OK status if the existing exam has been updated. The JSON body of the response contains actual exam parameters.