5. Getting a proctored session status
The client’s LMS can get a status of a proctored session by Constructor Proctor API.
API URL:
https://[proctor-url]/api/v2/integration/simple/[integration_name]/sessions/[session_id]/status/Request method:
GETRequest headers:
Content-Type: application/json
Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2MTI5OTQxMzF9.PRzNThe 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:
{
"exp": 1612994131
}Constructor Proctor responds with a 200 OK status, the response body contains information about the proctored session. 404 Not Found error means that the session for the requested sessionId does not exist in the Constructor Proctor system.
Response body example:
{
"accountId": "123",
"sessionId": "b3875623",
"status": "started",
"sessionStart": "2018-03-27T00:30:00Z",
"sessionEnd": null
}The method fields are described in the table below:
| Field | Type | Description |
|---|---|---|
| accountId* | string | Company identifier in the client’s LMS. |
| sessionId* | string | Session identifier in the system (ID that was passed to Constructor Proctor at the start of the test session). |
| status* | string (enum) | Status of the proctored session in Constructor Proctor. The available values: * not_scheduled — the user has not scheduled the proctored test yet (only for the exams that require scheduling). * early_to_start — the session has not yet started. * ready_to_start — the user can start the proctored session. * late_to_start — the user cannot start the proctored session because the scheduled start time has passed. * started — the user is taking the proctored test at the moment. * finished — the user has finished the proctored session. |
| sessionStart | string (datetime) | Date and time when the proctored session was started (UTC, ISO 8601). |
| sessionEnd | string (datetime) | Date and time when the proctored session was finished (UTC, ISO 8601). |