EMS-UGC API Docs
Manage

Subject

Subject & Program Semester Subject Management APIs

Program Semesters API

Base URL: http://192.168.100.250/


Endpoints

MethodEndpointDescription
GET/programs/{programId}/semestersList semesters for a program
POST/programs/{programId}/semestersCreate semester
PUT/programs/{programId}/semesters/{semesterId}Update semester
DELETE/programs/{programId}/semesters/{semesterId}Delete semester
GET/getProgram?faculty_id={facultyId}&level_id={levelId}Get programs by faculty/level
GET/getSemester?program_id={programId}Get semesters by program

List Semesters

GET /programs/{programId}/semesters?page=1
Accept: application/json

Create Semester

POST /programs/{programId}/semesters
Content-Type: application/json

Request Body:

{
  "semester_number": 1,
  "name": "First Semester"
}

Update Semester

PUT /programs/{programId}/semesters/{semesterId}
Content-Type: application/json

Request Body:

{
  "semester_number": 1,
  "name": "First Semester"
}

Delete Semester

DELETE /programs/{programId}/semesters/{semesterId}

Helpers (Filter Dropdowns)

Get Programs by Faculty/Level

GET /getProgram?faculty_id=36&level_id=1
Accept: application/json

Get Semesters by Program

GET /getSemester?program_id=1
Accept: application/json

Semester Subjects

MethodEndpoint
GET/programs/{programId}/semesters/{semesterId}/subjects
POST/programs/{programId}/semesters/{semesterId}/subjects
PUT/programs/{programId}/semesters/{semesterId}/subjects/{subjectId}
DELETE/programs/{programId}/semesters/{semesterId}/subjects/{subjectId}

Subject API

Base URL: http://192.168.100.250/


Endpoints

MethodEndpointDescription
GET/subjectsList all subjects
POST/subjectsCreate subjects (bulk)
PUT/subjects/{id}Update subject
DELETE/subjects/{id}Delete subject
GET/programs/{programId}/semesters/{semesterId}/subjectsList subjects in semester
POST/programs/{programId}/semesters/{semesterId}/subjectsAdd subjects to semester
PUT/programs/{programId}/semesters/{semesterId}/subjects/{subjectId}Update semester subject
DELETE/programs/{programId}/semesters/{semesterId}/subjects/{subjectId}Remove subject from semester

List

GET /subjects
Accept: application/json

Create (Bulk)

POST /subjects
Content-Type: application/json

Request Body:

{
  "subjects": [
    { "name": "Mathematics I", "code": "MTH101", "description": "Basic maths" },
    { "name": "Physics I", "code": "PHY101" }
  ]
}

Update

PUT /subjects/{id}
Content-Type: application/json

Request Body:

{
  "name": "Advanced Mathematics",
  "code": "MTH201",
  "description": "Advanced level mathematics"
}

Delete

DELETE /subjects/{id}

Program Semester Subjects

List Subjects in Semester

GET /programs/{programId}/semesters/{semesterId}/subjects?page=1
Accept: application/json

Add Subjects to Semester

POST /programs/{programId}/semesters/{semesterId}/subjects
Content-Type: application/json

Request Body:

{
  "subjects": [
    {
      "subject_id": 1,
      "code": "MTH101",
      "type": "compulsory",
      "full_mark": 100,
      "pass_mark": 35,
      "credit_hr": 3
    }
  ]
}

Update Semester Subject

PUT /programs/{programId}/semesters/{semesterId}/subjects/{subjectId}
Content-Type: application/json

Request Body:

{
  "credit_hr": 4,
  "type": "elective",
  "code": "MTH201",
  "full_mark": 100,
  "pass_mark": 40
}

Remove Subject from Semester

DELETE /programs/{programId}/semesters/{semesterId}/subjects/{subjectId}

On this page