Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/chamals3n4/OpenATS/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Assessment endpoints allow you to create technical tests with questions, options, and scoring criteria. These assessments can be attached to jobs and automatically sent to candidates.

List All Assessments

curl -X GET http://localhost:8080/api/assessments
Retrieve all assessments in the system.

Response

{
  "data": [
    {
      "id": 1,
      "title": "Backend Node.js Assessment",
      "description": "Technical screening for backend developers",
      "timeLimit": 60,
      "passScore": 70,
      "createdBy": 1,
      "createdAt": "2024-01-15T10:00:00Z",
      "updatedAt": "2024-01-15T10:00:00Z"
    }
  ]
}

Get Assessment Details

curl -X GET http://localhost:8080/api/assessments/1
Retrieve a specific assessment with all its questions and options.

Path Parameters

id
integer
required
The unique identifier of the assessment

Response

{
  "data": {
    "id": 1,
    "title": "Backend Node.js Assessment",
    "description": "Technical screening for backend developers",
    "timeLimit": 60,
    "passScore": 70,
    "createdBy": 1,
    "createdAt": "2024-01-15T10:00:00Z",
    "questions": [
      {
        "id": 1,
        "title": "Which of the following are Node.js core modules?",
        "description": null,
        "questionType": "multiple_choice",
        "points": 1,
        "position": 1,
        "options": [
          {
            "id": 1,
            "label": "fs",
            "isCorrect": true,
            "position": 1
          },
          {
            "id": 2,
            "label": "express",
            "isCorrect": false,
            "position": 2
          }
        ]
      },
      {
        "id": 2,
        "title": "Explain the difference between async/await and Promises",
        "description": "Provide a detailed answer",
        "questionType": "short_answer",
        "points": 2,
        "position": 2,
        "options": []
      }
    ]
  }
}

Create Assessment

curl -X POST http://localhost:8080/api/assessments \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Backend Node.js Assessment",
    "description": "Technical screening test",
    "timeLimit": 60,
    "passScore": 70
  }'
Create a new assessment bank. Questions can be added separately or included in the creation request.

Body Parameters

title
string
required
Assessment name (max 255 characters)
description
string
Optional description of the assessment
timeLimit
integer
required
Time limit in minutes for completing the assessment
passScore
number
required
Minimum percentage score required to pass (0-100)
createdBy
integer
default:"1"
User ID of the assessment creator (defaults to 1 until auth is implemented)
questions
array
Optional array of questions to add during creation

Response

{
  "data": {
    "id": 2,
    "title": "Backend Node.js Assessment",
    "description": "Technical screening test",
    "timeLimit": 60,
    "passScore": 70,
    "createdBy": 1,
    "createdAt": "2024-01-20T14:30:00Z",
    "updatedAt": "2024-01-20T14:30:00Z"
  }
}

Update Assessment

curl -X PUT http://localhost:8080/api/assessments/1 \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Advanced Node.js Assessment",
    "timeLimit": 90,
    "passScore": 75
  }'
Update assessment basic information. Use question-specific endpoints to manage questions.

Path Parameters

id
integer
required
The unique identifier of the assessment

Body Parameters

All parameters are optional. Only include fields you want to update.
title
string
Updated assessment title (max 255 characters)
description
string
Updated description
timeLimit
integer
Updated time limit in minutes
passScore
number
Updated pass score percentage (0-100)

Response

{
  "data": {
    "id": 1,
    "title": "Advanced Node.js Assessment",
    "description": "Technical screening test",
    "timeLimit": 90,
    "passScore": 75,
    "createdBy": 1,
    "updatedAt": "2024-01-20T15:00:00Z"
  }
}

Delete Assessment

curl -X DELETE http://localhost:8080/api/assessments/1
Permanently delete an assessment and all its questions.

Path Parameters

id
integer
required
The unique identifier of the assessment to delete

Response

{
  "data": {
    "id": 1,
    "title": "Advanced Node.js Assessment"
  }
}

Add Question to Assessment

curl -X POST http://localhost:8080/api/assessments/1/questions \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Which of the following are Node.js core modules?",
    "questionType": "multiple_choice",
    "points": 1,
    "position": 1,
    "options": [
      {"label": "fs", "isCorrect": true, "position": 1},
      {"label": "express", "isCorrect": false, "position": 2}
    ]
  }'
Add a new question to an existing assessment.

Path Parameters

id
integer
required
The unique identifier of the assessment

Body Parameters

title
string
required
The question text (max 500 characters)
description
string
Optional additional context or instructions
questionType
string
required
Type of question. Options: short_answer, multiple_choice
points
number
default:"1"
Point value for this question
position
integer
required
Display order of the question
options
array
Array of answer options (required for multiple_choice, minimum 2 options)
options[].label
string
required
The option text (max 500 characters)
options[].isCorrect
boolean
default:"false"
Whether this is a correct answer
options[].position
integer
required
Display order of this option

Response

{
  "data": {
    "id": 5,
    "assessmentId": 1,
    "title": "Which of the following are Node.js core modules?",
    "questionType": "multiple_choice",
    "points": 1,
    "position": 1,
    "options": [
      {
        "id": 10,
        "label": "fs",
        "isCorrect": true,
        "position": 1
      },
      {
        "id": 11,
        "label": "express",
        "isCorrect": false,
        "position": 2
      }
    ]
  }
}

Update Question

curl -X PUT http://localhost:8080/api/assessments/1/questions/5 \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Select all Node.js core modules from the list",
    "points": 2
  }'
Update an existing question in an assessment.

Path Parameters

id
integer
required
The unique identifier of the assessment
questionId
integer
required
The unique identifier of the question

Body Parameters

All parameters are optional.
title
string
Updated question text
description
string
Updated description
questionType
string
Updated question type
points
number
Updated point value
position
integer
Updated position
options
array
Updated options array

Response

{
  "data": {
    "id": 5,
    "assessmentId": 1,
    "title": "Select all Node.js core modules from the list",
    "points": 2,
    "position": 1
  }
}

Delete Question

curl -X DELETE http://localhost:8080/api/assessments/1/questions/5
Remove a question from an assessment.

Path Parameters

id
integer
required
The unique identifier of the assessment
questionId
integer
required
The unique identifier of the question to delete

Response

{
  "data": {
    "id": 5,
    "assessmentId": 1,
    "title": "Select all Node.js core modules from the list"
  }
}

Build docs developers (and LLMs) love