Skip to main content

Users

This document outlines the planned features and routes for upcoming versions of the Mockpad User Service.

Version 1.0

Admin

MethodEndpointDescriptionreq.paramsreq.bodyreq.fileAccess LevelCheckbox
POST/admin/registerRegister a new admin{ adminDetails }Protected[ ]
POST/admin/loginAdmin login{ adminCredentials }Public[ ]
GET/admin/:adminIdGet admin details{ adminId }Private[ ]
PUT/admin/:adminIdUpdate admin details{ adminId }{ updatedAdmin }Private[ ]
DELETE/admin/:adminIdDelete an admin{ adminId }Private[ ]
POST/admin/teacher/bulkAdd teachers in bulkteachers.csvPrivate[ ]
POST/admin/teacherAdd a single teacher{ teacherDetails }Private[ ]
PUT/admin/teacher/bulkUpdate teachers in bulkN/APrivate[ ]
PUT/admin/teacher/:teacherIdUpdate a single teacher{ teacherId }{ updatedTeacher }Private[ ]
POST/admin/student/bulkAdd students in bulkstudents.csvPrivate[ ]
POST/admin/studentAdd a single student{ studentDetails }Private[ ]
PUT/admin/student/bulkUpdate students in bulkN/APrivate[ ]
PUT/admin/student/:studentRollnoUpdate a single student{ studentRollno }{ updatedStudent }Private[ ]

Teacher

MethodEndpointDescriptionreq.paramsreq.bodyreq.fileAccess LevelCheckbox
POST/teacher/loginTeacher login{ teacherCredentials }Public[ ]
GET/teacher/:teacherIdGet teacher details{ teacherId }Public[ ]
PUT/teacher/:teacherIdUpdate teacher details{ teacherId }{ updatedTeacher }Public[ ]
GET/teachersGet all teachersPublic (Admin only)[ ]

Student

MethodEndpointDescriptionreq.paramsreq.bodyreq.fileAccess LevelCheckbox
POST/student/loginStudent login{ studentCredentials }Public[ ]
GET/student/:studentRollnoGet student details{ studentRollno }Public[ ]
PUT/student/:studentRollnoUpdate student details{ studentRollno }{ updatedStudent }Public[ ]
GET/studentsGet all studentsPublic (Admin only)[ ]

Explanation

  • Method: HTTP method used for the route (e.g., GET, POST, PUT, DELETE).
  • Endpoint: The URL path for the route.
  • Description: A brief description of what the route does.
  • req.params: The expected URL parameters (e.g., { adminId }, { teacherId }, { studentRollno }).
  • req.body: The expected structure of the request body (e.g., { adminDetails }, { teacherCredentials }, { updatedStudent }).
  • req.file: Indicates if a file is expected in the request (e.g., teachers.csv, students.csv).
  • Access Level: Specifies if the route is public, protected, or private. If a route is public but intended for admin use only, it is noted as "Public (Admin only)".
  • Checkbox: A placeholder for tracking the implementation status of the route.