-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate API documentation from README.md to API-docs.md for bet…
…ter organization
- Loading branch information
1 parent
5f05333
commit 0f3bc5d
Showing
2 changed files
with
186 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
# Student Service API | ||
|
||
This API provides CRUD operations for managing students, academic histories, and courses. | ||
|
||
## Endpoints | ||
|
||
### Students | ||
|
||
- **Create Student** | ||
- **URL:** `/students/` | ||
- **Method:** `POST` | ||
- **Request Body:** | ||
```json | ||
{ | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
- **Get Student** | ||
- **URL:** `/students/{student_id}` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
- **Get Students** | ||
- **URL:** `/students/` | ||
- **Method:** `GET` | ||
- **Query Parameters:** | ||
- `skip`: integer (default: 0) | ||
- `limit`: integer (default: 10) | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
] | ||
``` | ||
|
||
- **Delete Student** | ||
- **URL:** `/students/{student_id}` | ||
- **Method:** `DELETE` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
### Academic History | ||
|
||
- **Create Academic History** | ||
- **URL:** `/students/{student_id}/academic-history/` | ||
- **Method:** `POST` | ||
- **Request Body:** | ||
```json | ||
{ | ||
"course_name": "string", | ||
"grade": "string" | ||
} | ||
``` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"course_name": "string", | ||
"grade": "string", | ||
"student_id": "integer" | ||
} | ||
``` | ||
|
||
- **Get Academic History** | ||
- **URL:** `/students/{student_id}/academic-history/` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"course_name": "string", | ||
"grade": "string", | ||
"student_id": "integer" | ||
} | ||
] | ||
``` | ||
|
||
### Courses | ||
|
||
- **Create Course** | ||
- **URL:** `/courses/` | ||
- **Method:** `POST` | ||
- **Request Body:** | ||
```json | ||
{ | ||
"name": "string", | ||
"description": "string" | ||
} | ||
``` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
``` | ||
|
||
- **Get Course** | ||
- **URL:** `/courses/{course_id}` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
``` | ||
|
||
- **Get Courses** | ||
- **URL:** `/courses/` | ||
- **Method:** `GET` | ||
- **Query Parameters:** | ||
- `skip`: integer (default: 0) | ||
- `limit`: integer (default: 10) | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
] | ||
``` | ||
|
||
### Enrollments | ||
|
||
- **Enroll Student in Course** | ||
- **URL:** `/students/{student_id}/courses/{course_id}` | ||
- **Method:** `POST` | ||
- **Response:** | ||
```json | ||
{ | ||
"student_id": "integer", | ||
"course_id": "integer" | ||
} | ||
``` | ||
|
||
- **Get Student Courses** | ||
- **URL:** `/students/{student_id}/courses/` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,186 +1,3 @@ | ||
# Student Service API | ||
|
||
This API provides CRUD operations for managing students, academic histories, and courses. | ||
|
||
## Endpoints | ||
|
||
### Students | ||
|
||
- **Create Student** | ||
- **URL:** `/students/` | ||
- **Method:** `POST` | ||
- **Request Body:** | ||
```json | ||
{ | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
- **Get Student** | ||
- **URL:** `/students/{student_id}` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
- **Get Students** | ||
- **URL:** `/students/` | ||
- **Method:** `GET` | ||
- **Query Parameters:** | ||
- `skip`: integer (default: 0) | ||
- `limit`: integer (default: 10) | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
] | ||
``` | ||
|
||
- **Delete Student** | ||
- **URL:** `/students/{student_id}` | ||
- **Method:** `DELETE` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"age": "integer", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
### Academic History | ||
|
||
- **Create Academic History** | ||
- **URL:** `/students/{student_id}/academic-history/` | ||
- **Method:** `POST` | ||
- **Request Body:** | ||
```json | ||
{ | ||
"course_name": "string", | ||
"grade": "string" | ||
} | ||
``` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"course_name": "string", | ||
"grade": "string", | ||
"student_id": "integer" | ||
} | ||
``` | ||
|
||
- **Get Academic History** | ||
- **URL:** `/students/{student_id}/academic-history/` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"course_name": "string", | ||
"grade": "string", | ||
"student_id": "integer" | ||
} | ||
] | ||
``` | ||
|
||
### Courses | ||
|
||
- **Create Course** | ||
- **URL:** `/courses/` | ||
- **Method:** `POST` | ||
- **Request Body:** | ||
```json | ||
{ | ||
"name": "string", | ||
"description": "string" | ||
} | ||
``` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
``` | ||
|
||
- **Get Course** | ||
- **URL:** `/courses/{course_id}` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
``` | ||
|
||
- **Get Courses** | ||
- **URL:** `/courses/` | ||
- **Method:** `GET` | ||
- **Query Parameters:** | ||
- `skip`: integer (default: 0) | ||
- `limit`: integer (default: 10) | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
] | ||
``` | ||
|
||
### Enrollments | ||
|
||
- **Enroll Student in Course** | ||
- **URL:** `/students/{student_id}/courses/{course_id}` | ||
- **Method:** `POST` | ||
- **Response:** | ||
```json | ||
{ | ||
"student_id": "integer", | ||
"course_id": "integer" | ||
} | ||
``` | ||
|
||
- **Get Student Courses** | ||
- **URL:** `/students/{student_id}/courses/` | ||
- **Method:** `GET` | ||
- **Response:** | ||
```json | ||
[ | ||
{ | ||
"id": "integer", | ||
"name": "string", | ||
"description": "string" | ||
} | ||
] | ||
``` |