-
Notifications
You must be signed in to change notification settings - Fork 0
LMS API Design
Dominique Hosea edited this page Jul 12, 2024
·
1 revision
The API for the LMS web app will be RESTful, using JSON for request and response bodies. The endpoints will be organized around the main resources: users, courses, chapters, student interactions, and authentication.
Base URL: /api/v1
-
Authentication
-
POST /auth/register: Register a new user. -
POST /auth/login: Authenticate a user and obtain a token. -
POST /auth/logout: Log out a user. -
POST /auth/refresh: Refresh authentication token.
-
-
Users
-
GET /users: Get a list of users (Admin only). -
GET /users/{id}: Get details of a specific user. -
PUT /users/{id}: Update user profile. -
DELETE /users/{id}: Delete a user (Admin only).
-
-
Courses
-
GET /courses: Get a list of all courses. -
POST /courses: Create a new course (Admin only). -
GET /courses/{id}: Get details of a specific course. -
PUT /courses/{id}: Update a course (Admin only). -
DELETE /courses/{id}: Delete a course (Admin only).
-
-
Chapters
-
GET /courses/{courseId}/chapters: Get a list of chapters for a specific course. -
POST /courses/{courseId}/chapters: Create a new chapter (Admin only). -
GET /courses/{courseId}/chapters/{id}: Get details of a specific chapter. -
PUT /courses/{courseId}/chapters/{id}: Update a chapter (Admin only). -
DELETE /courses/{courseId}/chapters/{id}: Delete a chapter (Admin only).
-
-
Student Interactions
-
GET /interactions: Get a list of student interactions. -
POST /interactions: Record a new student interaction. -
GET /interactions/{id}: Get details of a specific interaction. -
PUT /interactions/{id}: Update a student interaction. -
DELETE /interactions/{id}: Delete a student interaction.
-
-
Payments
-
POST /payments/checkout: Create a checkout session for a premium course. -
POST /payments/verify: Verify a payment.
-
-
Admin
-
POST /admin/assign-student: Assign a student to a course. -
GET /admin/course-students/{courseId}: Get a list of students assigned to a course.
-
© 2024 Mun-e. All rights reserved.