GET /api/v1/department/{id}

Path parameters

  • id string Required

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • department object Required
      Hide department attributes Show department attributes object
      • id string Required

        The unique idenitier of the department

      • name string Required

        Name of the department

      • createdAt string(date-time) Required

        The date and time the resource was created

      • updatedAt string(date-time) Required

        The date and time the resource was last updated

      • institute object Required
        Hide institute attributes Show institute attributes object
        • id string Required
        • name string Required
        • code string Required
        • type string Required
        • registration_number string Required
        • accrediting_body string Required
        • ownership string Required
        • date_established string Required
        • motto string Required
        • website_ul string Required
        • createdAt string Required
        • updatedAt string Required
  • 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
GET /api/v1/department/{id}
curl \
 --request GET 'http://localhost:3500/api/v1/department/{id}'
Response examples (200)
{
  "message": "string",
  "department": {
    "id": "string",
    "name": "string",
    "createdAt": "2025-05-04T09:42:00Z",
    "updatedAt": "2025-05-04T09:42:00Z",
    "institute": {
      "id": "fe7c1cb8-ff57-40c4-99df-44b8c596e14e",
      "name": "University of Nairobi",
      "code": "UoN",
      "type": "University",
      "registration_number": "CUE-REG-12345",
      "accrediting_body": "Commission for University Education",
      "ownership": "Public",
      "date_established": "1970-07-01",
      "motto": "In pursuit of excellence",
      "website_ul": "https://www.uonbi.ac.ke",
      "createdAt": "2025-06-24T13:45:34.754Z",
      "updatedAt": "2025-06-24T13:45:34.754Z"
    }
  }
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}