GET /api/v1/unit-offerings/{id}

Retrieve detailed information about a specific unit offering including all related data like students, assignments, exams, and topics.

Path parameters

  • id string Required

    Unit offering ID

Responses

  • 200 application/json

    Unit offering found successfully

  • 400 application/json

    Default bad request error 400 response

    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • error string Required
    • statusCode number Required
  • 401

    Authentication required

  • 404 application/json

    Unit offering not found

GET /api/v1/unit-offerings/{id}
curl \
 --request GET 'http://localhost:3500/api/v1/unit-offerings/unit-offering-uuid'
Response examples (200)
{
  "message": "Unit offering found successfully",
  "offering": {
    "id": "offering-uuid",
    "Code": "CS101-2024-1",
    "lecturer": {
      "user": {
        "lastname": "Smith",
        "firstname": "Dr. John"
      }
    },
    "semester": {
      "name": "Fall 2024",
      "endDate": "2024-12-31",
      "startDate": "2024-09-01"
    },
    "examsCount": 1,
    "topicsCount": 8,
    "unitVersion": {
      "title": "Introduction to Computer Science",
      "versionNumber": 1
    },
    "courseIntake": {
      "name": "September 2024 Intake",
      "course": {
        "name": "Computer Science"
      }
    },
    "studentsCount": 25,
    "assignmentsCount": 3
  }
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}
Response examples (404)
{
  "error": "Not Found",
  "message": "Unit offering not found",
  "statusCode": 404
}