{ "info": { "_postman_id": "enrollment-api-collection", "name": "Enrollment Feature API", "description": "Complete API collection for testing enrollment endpoints", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Authentication", "item": [ { "name": "Register Student", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"email\": \"student@example.com\",\n \"password\": \"Password123!\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phone\": \"1234567890\"\n}" }, "url": { "raw": "http://localhost:8081/api/auth/register", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "auth", "register" ] } }, "response": [] }, { "name": "Login Student", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"email\": \"student@example.com\",\n \"password\": \"Password123!\"\n}" }, "url": { "raw": "http://localhost:8081/api/auth/login", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "auth", "login" ] } }, "response": [] }, { "name": "Get Current User", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/auth/me", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "auth", "me" ] } }, "response": [] } ] }, { "name": "Enrollment - Student Operations", "item": [ { "name": "Get My Courses", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/enrollments/my-courses", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "my-courses" ] }, "description": "Get all courses enrolled by the authenticated student" }, "response": [] }, { "name": "Get My Courses (with semester filter)", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/enrollments/my-courses?semester=1", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "my-courses" ], "query": [ { "key": "semester", "value": "1" } ] }, "description": "Get courses for a specific semester" }, "response": [] }, { "name": "Get Available Courses", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/enrollments/available?departmentId=1&semesterId=1&search=&level=freshman&page=1&limit=20", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "available" ], "query": [ { "key": "departmentId", "value": "1", "disabled": true }, { "key": "semesterId", "value": "1", "disabled": true }, { "key": "search", "value": "", "disabled": true }, { "key": "level", "value": "freshman", "disabled": true }, { "key": "page", "value": "1" }, { "key": "limit", "value": "20" } ] }, "description": "Get list of available courses for student enrollment" }, "response": [] }, { "name": "Enroll in Course", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"sectionId\": 1\n}" }, "url": { "raw": "http://localhost:8081/api/enrollments/register", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "register" ] }, "description": "Enroll a student in a course section" }, "response": [] }, { "name": "Get Enrollment Details", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/enrollments/1", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "1" ] }, "description": "Get enrollment details by ID" }, "response": [] }, { "name": "Drop Course", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"reason\": \"student_request\",\n \"notes\": \"No longer interested in this course\"\n}" }, "url": { "raw": "http://localhost:8081/api/enrollments/1", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "1" ] }, "description": "Drop/withdraw from a course enrollment" }, "response": [] } ] }, { "name": "Enrollment - Instructor Operations", "item": [ { "name": "Get Section Students", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{instructor_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/enrollments/section/1/students", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "section", "1", "students" ] }, "description": "Get all enrolled students in a section (instructor/admin only)" }, "response": [] }, { "name": "Get Section Waitlist", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{instructor_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/enrollments/section/1/waitlist", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "section", "1", "waitlist" ] }, "description": "Get waitlist for a section (instructor/admin only)" }, "response": [] } ] }, { "name": "Enrollment - Admin Operations", "item": [ { "name": "Update Enrollment Status", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{admin_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"status\": \"completed\"\n}" }, "url": { "raw": "http://localhost:8081/api/enrollments/1/status", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "1", "status" ] }, "description": "Update enrollment status (admin only)" }, "response": [] }, { "name": "Force Drop Enrollment", "request": { "method": "DELETE", "header": [ { "key": "Authorization", "value": "Bearer {{admin_token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"reason\": \"admin_removal\",\n \"notes\": \"Student removed by admin\"\n}" }, "url": { "raw": "http://localhost:8081/api/enrollments/1", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "enrollments", "1" ] }, "description": "Force drop enrollment (admin can drop any enrollment)" }, "response": [] } ] }, { "name": "Test Data Setup", "item": [ { "name": "Get All Courses", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/courses?page=1&limit=20", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "courses" ], "query": [ { "key": "page", "value": "1" }, { "key": "limit", "value": "20" } ] }, "description": "Get all available courses" }, "response": [] }, { "name": "Get Course Sections", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/sections/course/1?semesterId=1", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "sections", "course", "1" ], "query": [ { "key": "semesterId", "value": "1", "disabled": true } ] }, "description": "Get sections for a specific course" }, "response": [] }, { "name": "Get All Semesters", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/semesters", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "semesters" ] }, "description": "Get all semesters" }, "response": [] }, { "name": "Get All Departments", "request": { "method": "GET", "header": [ { "key": "Authorization", "value": "Bearer {{access_token}}", "type": "text" } ], "url": { "raw": "http://localhost:8081/api/campuses/1/departments", "protocol": "http", "host": [ "localhost" ], "port": "8081", "path": [ "api", "campuses", "1", "departments" ] }, "description": "Get all departments for a campus" }, "response": [] } ] } ], "variable": [ { "key": "access_token", "value": "", "type": "string", "description": "Student access token from login response" }, { "key": "instructor_token", "value": "", "type": "string", "description": "Instructor access token from login response" }, { "key": "admin_token", "value": "", "type": "string", "description": "Admin access token from login response" }, { "key": "base_url", "value": "http://localhost:8081", "type": "string", "description": "Base URL for API" } ] }