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.


POST/v1/assessments/create

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

POST
/v1/assessments/create
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"
}

GET/v1/assessments/:id

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

GET
/v1/assessments/118a2584-44d8-4039-a082-bca87bdd5ffd
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"
}

PATCH/v1/assessments/update/:id

Update an assessment

This endpoint allows you to perform an update on an assessment. Currently, no properties can be updated


DELETE/v1/assessments/delete/:id

Delete an assessment

This endpoint allows you to delete assessments from a course. Note: This will permanently delete the assessment.

Request

DELETE
/v1/assessments/delete/118a2584-44d8-4039-a082-bca87bdd5ffd
import ApiClient from '@example/protocol-api'

const client = new ApiClient(token)

await client.assessments.deleteAssessment('118a2584-44d8-4039-a082-bca87bdd5ffd')

Was this page helpful?