https://github.com/scholarx-assesment/api-gateway
API gateway to manage the inter service communication
https://github.com/scholarx-assesment/api-gateway
api-gateway docker fastapi microservices-architecture swagger
Last synced: about 2 months ago
JSON representation
API gateway to manage the inter service communication
- Host: GitHub
- URL: https://github.com/scholarx-assesment/api-gateway
- Owner: scholarX-Assesment
- Created: 2024-12-14T03:18:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-18T08:56:51.000Z (over 1 year ago)
- Last Synced: 2025-05-22T23:11:30.442Z (about 1 year ago)
- Topics: api-gateway, docker, fastapi, microservices-architecture, swagger
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# API Gateway
This API Gateway routes requests to the appropriate microservices: Student Service, Class Schedule Service, and Notification Service.
## Microservices
- **Student Service**: Runs on port `5001`
- **Class Schedule Service**: Runs on port `5002`
- **Notification Service**: Runs on port `5003`
## Endpoints
### Students
- **Create Student**
- **POST** `/students/`
- Request Body:
```json
{
"name": "string",
"email": "string",
"address": "string",
"contactNo": "string",
"cgpa": 0
}
```
- **Get Student by ID**
- **GET** `/students/{student_id}`
- **Get All Students**
- **GET** `/students/`
- **Delete Student**
- **DELETE** `/students/{student_id}`
### Class Schedules
- **Create Class Schedule**
- **POST** `/class_schedules/`
- Request Body:
```json
{
"teacher_id": "int",
"student_id": "int",
"time_slot": "string",
"schedule_name": "string"
}
```
- **Get Class Schedule by ID**
- **GET** `/class_schedules/{schedule_id}`
- **Get All Class Schedules**
- **GET** `/class_schedules/`
### Teachers
- **Create Teacher**
- **POST** `/teachers/`
- Request Body:
```json
{
"name": "string",
"email": "string",
"address": "string",
"contactNo": "string"
}
```
- **Get Teacher by ID**
- **GET** `/teachers/{teacher_id}`
- **Get All Teachers**
- **GET** `/teachers/`
- **Update Teacher**
- **PUT** `/teachers/{teacher_id}`
- Request Body:
```json
{
"name": "string",
"email": "string",
"address": "string",
"contactNo": "string"
}
```
- **Delete Teacher**
- **DELETE** `/teachers/{teacher_id}`
## Notification
- **Send Email**
- **POST** `/send-email/`
- Request Body:
```json
{
"recipient": "string",
"content": "string"
}
```
## Running the API Gateway
1. Install dependencies:
```sh
pip install -r requirements.txt