Skip to main content

API Overview

This section will catalog REST endpoints for quizzes, questions, attempts, and admin operations. Add endpoint docs here using the standard response wrapper.

Base URLs​

Conventions​

  • Content-Type: application/json
  • All answers are strings; parsing/DSL logic lives server-side

API Response Wrapper

The API responses are wrapped in a standard format to ensure consistency across all endpoints. The response structure is as follows:

object data response format​

{
"code": "string",
"message": "string",
"data": {
...
}
}

List of object data response format​

{
"code": "string",
"message": "string",
"data": {
"results": [
...
]
}
}

Paginated list of object data response format​

{
"code": "string",
"message": "string",
"data": {
"results": [
...
],
"pagination": {
"totalItems": 1,
"totalPages": 1,
"currentPage": 1,
"perPage": 10
}
}
}

Where:

  • code: A string representing the status code of the response.
  • message: A human-readable message providing additional information about the response.
  • data: The actual payload of the response, which can be an object
  • data.results: An array of objects representing the list of items in the response.
  • data.pagination: An object containing pagination details.
    • totalItems: The total number of items available.
    • totalPages: The total number of pages available.
    • currentPage: The current page number.
    • perPage: The number of items per page.