TestSession API

Test sessions can be invigilated and using the Surpass API. Once released or voided, test sessions become result entities. Marks or Multiple Choice responses can also be assigned to paper test sessions.

The TestSession API resource is used to list and retrieve test sessions, update and reset test session states, and assign marks to questions taken on paper.

This article explains what calls can be made to the Surpass API using the TestSession resource.

Import this API into your Postman Workspace

In This Article

Listing test sessions

get /api/v2/TestSession

Send a request to the endpoint to list test sessions. Refer to the available parameters to influence the response. No request body is required.

Retrieving test session information

get /api/v2/TestSession/{id}

Send a request to the endpoint to retrieve information for a specific test session using either its ID or the candidate’s keycode. No request body is required.

Retrieving test session file information

get /api/v2/TestSession/{id}/File/{id}
NOTE: This is a retired endpoint and should therefore not be used.

Updating a test session’s state

put /api/v2/TestSession/{id}

Send a request to the endpoint to update a specific test session’s state.

Resetting a test session’s state

patch api/v2/TestSession/{keycode}

Send a request to the endpoint to reset a test session’s state back to state 1 (scheduledButNotCreated) using the test form’s unique reference code. No request body is required.

This allows the test to be re-downloaded in case any test form content and settings (including item content) have been updated since the test form was downloaded. The test form being used in the test session can also be changed.

NOTE: Only test sessions in states 1 (ScheduledButNotCreated), 2 (ScheduledButNotDownloaded), 3 (ScheduledButLocked), and 4 (Ready) can be reset.

Assigning item marks or Multiple Choice responses

post /api/v2/TestSession

Send a request to the endpoint to assign item marks, or responses to Multiple Choice questions, to paper tests.

NOTE: The test session must be in PaperResponseUpload state for item marks or Multiple Choice responses to be assigned to it.

Uploading scanned responses

post /api/v2/TestSession/{keycode}/ScannedItemResponses
NOTE: This is a retired endpoint and should therefore not be used.

Submitting a marked test

put /api/v2/TestSession/{id}/SubmitMarkedExam

Send a request to the endpoint to update a specific test session from AwaitingMarking state to Marked. No request body is required.

NOTE: This endpoint is used for a specific integration where scripts are marked (but not submitted) in Surpass from an external system.

Error Codes

Refer to the following table for information on error codes that may be encountered when using this resource.

Further reading

Read the following articles to learn more about similar APIs, how to get started with the Surpass API v2, and how to get the best out of this reference documentation:

NOTE: This form is to provide feedback to help improve the Surpass Help documentation only. If you need live support, contact support@surpass.com.