Assessments
Assessments are one of the types of assignments that can be created. Assessments are referenced by questions to connect them into one full assessment.
The assessment model
The assessment model contains all the information about an assessment.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the assessment.
- Name
assignment_id
- Type
- string
- Description
Unique identifier for the assignment to be referenced.
- Name
size
- Type
- int
- Description
How many questions the assessment contains.
- Name
created_at
- Type
- string
- Description
Timestamp of when the assessment was created. Generated automatically at creation in ISO 8601 format.
Create an assessment
This endpoint allows you to create a new assessment. The size of an assessment is 0 on creation.
Required parameters
- Name
assignment_id
- Type
- string
- Description
Unique identifier for the assignment to be referenced.
Optional parameters
- Name
id
- Type
- string
- Description
Unique identifier for the assessment.
Request
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.assessments.createAssessment({
id: "118a2584-44d8-4039-a082-bca87bdd5ffd",
assignment_id: "0fa027da-6145-4ea1-8028-676eaa5c8f86"
})
Response
{
"id": "118a2584-44d8-4039-a082-bca87bdd5ffd",
"assignment_id": "0fa027da-6145-4ea1-8028-676eaa5c8f86",
"size": 0,
"created_at": "2024-07-06T14:20:46.887541+00:00"
}
Retrieve an assessment
This endpoint allows you to retrieve a assessment by providing the assessment id. Refer to the list at the top of this page to see which properties are included with assessment objects.
Request
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.assessments.getAssessment('118a2584-44d8-4039-a082-bca87bdd5ffd')
Response
{
"id": "118a2584-44d8-4039-a082-bca87bdd5ffd",
"assignment_id": "0fa027da-6145-4ea1-8028-676eaa5c8f86",
"size": 0,
"created_at": "2024-07-06T14:20:46.887541+00:00"
}
Update an assessment
This endpoint allows you to perform an update on an assessment. Currently, no properties can be updated
Delete an assessment
This endpoint allows you to delete assessments from a course. Note: This will permanently delete the assessment.
Request
import ApiClient from '@example/protocol-api'
const client = new ApiClient(token)
await client.assessments.deleteAssessment('118a2584-44d8-4039-a082-bca87bdd5ffd')