Exam Session
Routes
List Exam Sessions
POST /api/exam-sessions
Returns a list of exam-session records. Can be filtered by exam-config IDs. Opt in to more data with include
params.
→ Sample Request
POST /api/exam-sessions
?include[]=results
&include[]=responses
Content-Type: application/json
{
~~"include": ["responses", "results"],~~
"filter": {
"examConfigIds": {
"include": [
"0007622b-b727-4d64-8454-4b3383ed9509",
"d7a56ac9-2e3d-4a86-814a-0ddf7fbf7f8c"
]
}
}
}
← Sample Response
{
"total": 1,
"nextToken": "WyJpZD0yM2EwYzkxMy1jNjFkLTUxZmUtOWI2NC0zMjA5NmI3Yjg0YmZ8c2s9ZXhhbS1zZXNzaW9uIl0=",
"aggregations": {
"minScore": {
"value": 100
},
"avgScore": {
"value": 100
},
"maxScore": {
"value": 100
}
},
"metadata": null,
"items": [
{
"examSession": {
"id": "23a0c913-c61d-51fe-9b64-32096b7b84bf",
"studentId": "******",
"maturity": "COMPLETE",
"name": "Kevin Campbell",
"scoreActual": 100,
"scoreMin": 0,
"scoreMax": 100,
"workspaceId": "focus1f8-district",
"responses": {
"993d673c-5c8d-43aa-99ea-8e417d1300dc": {},
"b842bb5e-9957-403e-bc54-9a054b290158": {},
"cdf02148-7888-4e4b-97ff-0003846baa4d": {}
},
"results": {
"items": [
{
"id": "b842bb5e-9957-403e-bc54-9a054b290158",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
},
...
],
"objectives": {
"92de756d-f455-595c-a2f6-18fb18c4461a": {
"id": "92de756d-f455-595c-a2f6-18fb18c4461a",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
},
"scores": [
{
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
]
},
...
},
"points": {
"actual": 3,
"isScorable": true,
"min": 0,
"max": 3
}
}
},
"examConfig": {
"id": "00722246-e417-475a-b1ae-994d65fd5cc2"
}
}
]
}
Get Exam Session
GET /api/exam-session/:sessionId
Returns details for a single exam-session
record.
→ Sample Request
GET /api/exam-session/{{examSessionId}}
?include[]=results
&include[]=responses
Content-Type: application/json
Authorization: Basic *****
← Sample Response
{
"examSession": {
"id": "23a0c913-c61d-51fe-9b64-32096b7b84bf",
"studentId": "******",
"maturity": "COMPLETE",
"name": "Kevin Campbell",
"scoreActual": 100,
"scoreMin": 0,
"scoreMax": 100,
"examId": "a0829bc3-8291-43dd-9181-478e7411c1df/exam#v0",
"workspaceId": "focus1f8-district",
"responses": {
"993d673c-5c8d-43aa-99ea-8e417d1300dc": {},
"b842bb5e-9957-403e-bc54-9a054b290158": {},
"cdf02148-7888-4e4b-97ff-0003846baa4d": {}
},
"results": {
"items": [
{
"id": "b842bb5e-9957-403e-bc54-9a054b290158",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
},
{
"id": "cdf02148-7888-4e4b-97ff-0003846baa4d",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
},
{
"id": "993d673c-5c8d-43aa-99ea-8e417d1300dc",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
}
],
"objectives": {
"92de756d-f455-595c-a2f6-18fb18c4461a": {
"id": "92de756d-f455-595c-a2f6-18fb18c4461a",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
},
"scores": [
{
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
]
},
"f10e8b11-7da6-568d-a6ea-d87b3bb35c83": {
"id": "f10e8b11-7da6-568d-a6ea-d87b3bb35c83",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
},
"scores": [
{
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
]
},
"e5fac3cc-aa4c-5aaa-b5aa-178bcc60a366": {
"id": "e5fac3cc-aa4c-5aaa-b5aa-178bcc60a366",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
},
"scores": [
{
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
]
}
},
"points": {
"actual": 3,
"isScorable": true,
"min": 0,
"max": 3
}
}
},
"examConfig": {
"id": "00722246-e417-475a-b1ae-994d65fd5cc2"
}
}
Get Exam Session Results
This route is optimized for pure Multiple Choice assessments only at this time.
→ Sample Request
GET /api/exam-session/:examSessionId/results
Content-Type: application/json
Authorization: Basic *****
← Sample Response
{
"examSession": {
"id": "23a0c913-c61d-51fe-9b64-32096b7b84bf",
"maturity": "COMPLETE",
"name": "Kevin Campbell",
"scoreActual": 100,
"scoreMin": 0,
"scoreMax": 100,
"examId": "a0829bc3-8291-43dd-9181-478e7411c1df",
"examSessionData": {
"lti": {
"userId": "kevin@examspark.com"
}
}
},
"results": {
"items": [
{
"sk": "item#v0",
"name": "Cole earns $6.00 per week for his allowance. Which of the following items would he be able to buy ",
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
},
"id": "b842bb5e-9957-403e-bc54-9a054b290158",
"alignmentIds": [
"92de756d-f455-595c-a2f6-18fb18c4461a"
],
"questions": [
{
"id": "1CkpwzuRQSfg",
"interactionType": "choice",
"keys": [
{
"value": "fZosNqHDUhiG",
"index": 2
}
],
"options": [
{
"id": "wM7IvnjKcCCS",
"content": "<p>skateboard</p>",
"isKey": false,
"index": 0
},
{
"id": "6NiO4mi8zWln",
"content": "<p>new jacket</p>",
"isKey": false,
"index": 1
},
{
"id": "fZosNqHDUhiG",
"content": "<p>cupcake</p>",
"isKey": true,
"index": 2
},
{
"id": "X3RTxQQFe2E3",
"content": "<p>bike</p>",
"isKey": false,
"index": 3
}
],
"response": {}
}
]
}
],
"objectives": {
"92de756d-f455-595c-a2f6-18fb18c4461a": {
"score": {
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
},
"id": "92de756d-f455-595c-a2f6-18fb18c4461a",
"text": "explain that saving is an alternative to spending;",
"abbreviation": "2.11.B",
"scores": [
{
"actual": 1,
"isScorable": true,
"min": 0,
"max": 1
}
]
}
},
"points": {
"actual": 3,
"isScorable": true,
"min": 0,
"max": 3
}
},
"examConfig": {
"id": "00722246-e417-475a-b1ae-994d65fd5cc2"
}
}
Set Responses
This route is optimized for pure Multiple Choice assessments only at this time.
→ Sample Request
POST /api/exam-session/:examSessionId/responses
Content-Type: application/json
Authorization: Basic *****
{
"submitForScoring": true,
"responses": [
{
"itemId": "b842bb5e-9957-403e-bc54-9a054b290158",
"questions": [
{
"id": "1CkpwzuRQSfg",
"response": {
"options": [
{
"index": 2
}
]
}
}
]
},
{
"itemId": "cdf02148-7888-4e4b-97ff-0003846baa4d",
"questions": [
{
"id": "5Vkl1ZQLt3Io",
"response": {
"options": [
{
"index": 1
}
]
}
}
]
},
{
"itemId": "993d673c-5c8d-43aa-99ea-8e417d1300dc",
"questions": [
{
"id": "oRrwhIkKBBH",
"response": {
"options": [
{
"index": 3
}
]
}
}
]
}
]
}
Retake Session
Prepares a multi-attempt exam-session
to be retaken.
→ Sample Request
GET /api/exam-session/:examSessionId/retake
Content-Type: application/json
Authorization: Basic *****
Reset Session
Remove all existing responses and scores from an Exam Session.
→ Sample Request
GET /api/exam-session/:examSessionId/reset
Content-Type: application/json
Authorization: Basic *****
Reopen Session
Set maturity
of an Exam Session to IN_PROGRESS
. This will allow the assessment to be accessible again as long as other Exam Config criteria are met.
→ Sample Request
GET /api/exam-session/:examSessionId/reopen
Content-Type: application/json
Authorization: Basic *****