key features
What Webportal actually exposes in 0.1.0a8. README.rst lists login, attendance, registration, exam events, and explicit exceptions. The wrapper also covers marks PDFs, grade cards, SGPA/CGPA, fees, subject choices, bank info, and password change.
Login and session#
student_login(username, password, captcha: Captcha) -> WebportalSession. You must pass a Captcha. The usage docs use from pyjiit.default import CAPTCHA because the portal does not bind the challenge tightly to the client.
flowchart LR C["Captcha or default.CAPTCHA"] --> L["student_login"] L --> S["WebportalSession"] S --> H["Bearer token plus LocalName"]
get_captcha() GETs /token/getcaptcha and returns Captcha.from_json with an empty answer field until you fill captcha.
@authenticated is the gate. There is no logout method. Drop the instance or set session = None.
flowchart TD
Call["authenticated method"] --> Check{"session is None?"}
Check -->|yes| NL["NotLoggedIn"]
Check -->|no| Body["run method"]Attendance#
flowchart LR Meta["get_attendance_meta"] --> AM["AttendanceMeta"] AM --> H["latest_header"] AM --> S["latest_semester"] H --> G["get_attendance"] S --> G G --> D["attendance dict"]
get_attendance_meta POSTs /StudentClassAttendance/getstudentInforegistrationforattendence as plain JSON (clientid, instituteid, membertype). get_attendance(header, semester) encrypts registrationcode, registrationid, and stynumber and POSTs /StudentClassAttendance/getstudentattendancedetail. Sphinx usage notes that this call can sit for over 10 seconds on the server.
Registration#
flowchart LR Sems["get_registered_semesters"] --> Sem["Semester"] Sem --> Fac["get_registered_subjects_and_faculties"] Fac --> R["Registrations"] Sem --> Ch["get_subject_choices"]
get_registered_semesters hits /reqsubfaculty/getregistrationList. get_registered_subjects_and_faculties(semester) hits /reqsubfaculty/getfaculties and returns Registrations (total_credits, list of RegisteredSubject). get_subject_choices(semester) hits /studentchoiceprint/getsubjectpreference. Allocated rows in subjectpreferencegrid have subjectrunning == "Y".
Exams#
flowchart LR S["get_semesters_for_exam_events"] --> Sem["Semester"] Sem --> E["get_exam_events"] E --> Ev["ExamEvent"] Ev --> Sch["get_exam_schedule"]
The exam-events payload uses the portal typo registationid. get_exam_schedule sends instituteid, registrationid, exameventid.
Marks and grades#
flowchart TB SM["get_semesters_for_marks"] --> DM["download_marks PDF bytes"] SG["get_semesters_for_grade_card"] --> GC["get_grade_card"] GC --> P["__get_program_and_branch_id"] GPA["get_sgpa_cgpa(stynumber=0)"] --> Dict["SGPA/CGPA dict"]
download_marks GETs /studentsexamview/printstudent-exammarks/{instituteid}/{registration_id}/{registration_code} and returns response.content on HTTP 200. get_grade_card first calls private __get_program_and_branch_id (/studentgradecard/getstudentinfo) then /studentgradecard/showstudentgradecard.
Fees and account#
flowchart LR F["get_fines_msc_charges"] --> Pend["pending payments dict"] Fee["get_fee_summary"] --> Sum["fee summary dict"] Bank["get_student_bank_info"] --> B["bank dict"] Pw["set_password"] --> Acc["AccountAPIError on failure"]
get_fines_msc_charges documents that an empty queue comes back as Failure "NO APPROVED REQUEST FOUND", which __hit turns into APIError. get_fee_summary sends unencrypted JSON with only instituteid.
Encryption on the wire#
flowchart LR P["dict"] --> S["serialize_payload"] S --> AES["AES-CBC daily key"] AES --> Body["POST body"] LN["generate_local_name"] --> H["LocalName header"]
Login always encrypts. Several later methods encrypt too. __hit always adds LocalName.
Exception map#
classDiagram Exception <|-- APIError APIError <|-- LoginError Exception <|-- SessionError SessionError <|-- SessionExpired SessionError <|-- NotLoggedIn Exception <|-- AccountAPIError
| Feature | Raises |
|---|---|
student_login |
LoginError |
Any @authenticated method with no session |
NotLoggedIn |
HTTP 401 from __hit |
SessionExpired |
set_password |
AccountAPIError |
Other failed responseStatus |
APIError |
download_marks non-200 |
APIError |
Endpoint map#
flowchart TB
subgraph auth [Auth]
A1["/token/getcaptcha"]
A2["/token/pretoken-check"]
A3["/token/generate-token1"]
end
subgraph data [Student data]
D1["/StudentClassAttendance/..."]
D2["/reqsubfaculty/..."]
D3["/studentcommonsontroller/..."]
D4["/studentsttattview/getstudent-examschedule"]
D5["/studentsexamview/printstudent-exammarks"]
D6["/studentgradecard/..."]
D7["/studentsgpacgpa/getallsemesterdata"]
D8["/collectionpendingpayments/getpendingpaymentsdata"]
D9["/studentfeeledger/loadfeesummary"]
D10["/studentbankdetails/getstudentbankinfo"]
D11["/clxuser/changepassword"]
D12["/studentchoiceprint/getsubjectpreference"]
end
Webportal --> auth
Webportal --> dataBase URL is always https://webportal.jiit.ac.in:6011/StudentPortalAPI.