Skip to main content
Version: 2.0

Teachers

The Teachers controller provides the following endpoints:

  • /api/v2/Teachers/GetAll
  • /api/v2/Teachers/Get/{id}
  • /api/v2/Teachers/GetByName?name={name}
  • /api/v2/Teachers/Faculties/GetAll
  • /api/v2/Teachers/Faculties/Get/{id}
  • /api/v2/Teachers/Faculties/GetByName?name={name}

GetAll

Gets all teachers. Returns a list of Teacher objects.

Teacher object:

{
"id": integer,
"shortName": "string",
"fullName": "string",
"department": {
"id": integer,
"shortName": "string",
"fullName": "string"
},
"faculty": {
"id": integer,
"shortName": "string",
"fullName": "string"
}
}

Call example:

Get/{id}

Gets a teacher by its ID. Returns a Teacher object.

Parameters:

NameTypeDescription
idintegerTeacher ID

Call example:

GetByName

Gets a teacher by its name. Returns a list of Teacher objects whose names contain the specified name.

Parameters:

NameTypeDescription
namestringTeacher name

Call example:

Faculties/GetAll

Gets all faculties. Returns a list of TeachersFaculty objects.

TeachersFaculty object:

{
"id": integer,
"shortName": "string",
"fullName": "string",
"departments": [
{
"id": integer,
"shortName": "string",
"fullName": "string",
"teachers": [
{
"id": integer,
"shortName": "string",
"fullName": "string"
}
]
}
]
}

Call example:

Faculties/Get/{id}

Gets a faculty by its ID. Returns a TeachersFaculty object.

Parameters:

NameTypeDescription
idintegerFaculty ID

Call example:

Faculties/GetByName

Gets a faculty by its name. Returns a list of TeachersFaculty objects whose names contain the specified name.

Parameters:

NameTypeDescription
namestringTeacher faculty name.

Call example: