This assignment consists of the API Operations using FastAPI.
101
Image Name: saif0786/python-assignment
This Docker image contains a FastAPI application that interacts with a MongoDB Atlas cluster. It provides endpoints for querying and managing course data, including retrieving course information, chapter details, and submitting ratings.
To run the Docker container, you need to type the command as follows
docker run -p 8000:80 saif0786/python-assignment
Once the container is running, access the FastAPI application at:
http://localhost:8000
Explore the API documentation and interact with the endpoints directly from your browser using FastAPI's interactive Swagger UI.
Get All Courses
GET /fetch-all-courses/
Query Parameters:
domain (optional): Filter by course domain.Get Course Overview
GET /fetch-specific-record/{course_id}/
Path Parameters:
course_id: ID of the course to retrieve.Get Chapter Information
GET /fetch-specific-chapter-from-record/{chapter_id}/
Path Parameters:
chapter_id: ID of the chapter.Rate a Chapter
POST /add-rating/{chapter_id}/
Path Parameters:
chapter_id: ID of the chapter.Request Body:
{
"rating_value": integer
}
Content type
Image
Digest
sha256:76d29b8a3…
Size
372 MB
Last updated
about 2 years ago
docker pull saif0786/python-assignment