Skip to main content

Assessments

Manage exams, tests, and continuous assessments. Upload and download score sheets.

All endpoints require Authorization: Bearer <token>. Some require X-SCHOOL-ID.


List Assessments

GET /assessments

Returns a paginated list of assessments filtered by cohort, subject, and term.

Query Parameters

ParameterTypeRequiredDefaultDescription
pageNumberintegerYes0Zero-indexed page
pageSizeintegerYes50Results per page
cohortuuidYesCohort batch ID
subjectuuidYesSubject ID
termuuidYesTerm ID

Example

curl -X GET "https://api.vanillatots.com/assessments?cohort=uuid&subject=uuid&term=uuid" \
-H "Authorization: Bearer $TOKEN"

Response 200 OK

{
"page_number": 0,
"page_size": 50,
"total_pages": 1,
"total": 5,
"data": [
{
"id": "uuid",
"subject": "uuid",
"name": "First CA Test",
"abbreviation": "CA1",
"due_date": "2024-10-15",
"total_points": 20.0,
"term": "uuid",
"include_in_final": true,
"publish_scores": false,
"category": "CA1",
"file_name": "ca1_math.xlsx"
}
]
}

Create Assessment

POST /assessments

Create a new assessment (exam, CA test, etc.).

Request Body

FieldTypeRequiredDescription
categoryenumYesOne of: CA1, CA2, CA3, EXAM, FIRST_TERM, SECOND_TERM, THIRD_TERM
subjectuuidYesSubject ID
namestringYesAssessment name
abbreviationstringYesShort code
due_datedateYesDue date (YYYY-MM-DD)
total_pointsnumberYesMaximum score
termuuidYesTerm ID
descriptionstringYesDescription
file_namestringYesAssociated file name
include_in_finalbooleanYesInclude in final grade calculation
publish_scoresbooleanYesWhether scores are published

Response 200 OK — Returns the created AssessmentResponse.


Get Assessment

GET /assessments/{id}

Retrieve a single assessment by ID.

Path Parameters

ParameterTypeDescription
iduuidAssessment ID

Response 200 OK — Returns an AssessmentResponse.


Delete Assessment

DELETE /assessments/{id}

Remove an assessment.

Path Parameters

ParameterTypeDescription
iduuidAssessment ID

Response 200 OK


Download Score Sheet

GET /assessments/{id}/download-sheet

Download the score sheet for an assessment as a binary file.

Path Parameters

ParameterTypeDescription
iduuidAssessment ID

Example

curl -X GET https://api.vanillatots.com/assessments/{id}/download-sheet \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID" \
-o scoresheet.xlsx

Response 200 OK — Returns binary file content (application/octet-stream).


Upload Score Sheet

POST /assessments/{id}/scoresheet

Upload a score sheet file for an assessment.

Path Parameters

ParameterTypeDescription
iduuidAssessment ID

Request Bodymultipart/form-data

FieldTypeRequiredDescription
scoresheetbinaryYesScore sheet file

Example

curl -X POST https://api.vanillatots.com/assessments/{id}/scoresheet \
-H "Authorization: Bearer $TOKEN" \
-H "X-SCHOOL-ID: $SCHOOL_ID" \
-F "scoresheet=@/path/to/scoresheet.xlsx"

Response 200 OK