-
Notifications
You must be signed in to change notification settings - Fork 1
API and API Documentation
This document outlines the acceptance criteria and provides examples for API endpoints, expected inputs, outputs, and associated documentation to ensure clear and comprehensive evaluation.
-
Functionality:
- The API must fulfill its intended purpose and perform the required operations without errors.
- All endpoints should adhere to RESTful principles (if applicable).
-
Error Handling:
- Clear and descriptive error messages must be returned for all invalid requests.
- Standardized error codes should be used (such as HTTP status codes).
-
Security:
- All sensitive data must be transmitted over HTTPS.
- API keys or Bearer tokens must be used for authentication.
-
Documentation:
- API documentation must include clear descriptions of each endpoint, required inputs, outputs, and examples.
- Documentation must be easily accessible and regularly updated.
URL: /quiz/create/
Method: POST
Headers:
{
"Content-Type": "application/json",
"Authorization": "Bearer <JWT_TOKEN>"
}
Request Body:
{
"quiz": {
"title": "Learn Common English Phrases",
"level": "A1",
"description": "A quiz designed to help Turkish learners master essential English phrases.",
"tags": ["phrases", "A1"]
},
"questions": [
{
"question_text": "What does 'How are you?' mean in Turkish?",
"choice1": "Merhaba",
"choice2": "Nasılsınız?",
"choice3": "Hoşçakal",
"choice4": "Teşekkürler",
"correct_choice": 2
},
{
"question_text": "Which word means 'thank you' in English?",
"choice1": "Lütfen",
"choice2": "Güle güle",
"choice3": "Teşekkürler",
"choice4": "Thank you",
"correct_choice": 4
}
]
}
Response (Success - 201):
{
"id": 1,
"title": "Learn Common English Phrases",
"level": "A1",
"description": "A quiz designed to help Turkish learners master essential English phrases.",
"tags": ["phrases", "A1"],
"question_count": 2,
"author": "user123"
}
Response (Error - 400):
{
"error": "quiz and questions must be provided"
}
URL: /feed/quiz/
Method: GET
Headers:
{
"Authorization": "Bearer <JWT_TOKEN>"
}
Response (Success - 200):
[
{
"id": 1,
"title": "Learn Common English Phrases",
"level": "A1",
"description": "A quiz designed to help Turkish learners master essential English phrases.",
"tags": ["phrases", "A1"],
"question_count": 2
},
{
"id": 2,
"title": "Intermediate English Vocabulary",
"level": "intermediate",
"description": "A quiz for expanding your English vocabulary.",
"tags": ["vocabulary", "intermediate"],
"question_count": 10
}
]
Response (Error - 401):
{
"error": "Authentication credentials were not provided."
}
URL: /quiz/submit/
Method: POST
Headers:
{
"Content-Type": "application/json",
"Authorization": "Bearer <JWT_TOKEN>"
}
Request Body:
{
"quiz_progress_id": 1
}
Response (Success - 200):
{
"result_url": "/quiz/result/5"
}
Response (Error - 400):
{
"error": "Please answer all questions"
}
URL: /quiz/start/
Method: POST
Headers:
{
"Content-Type": "application/json",
"Authorization": "Bearer <JWT_TOKEN>"
}
Request Body:
{
"quiz_id": 1
}
Response (Success - 200):
{
"quiz_progress_id": 3,
"quiz_title": "Learn Common English Phrases",
"question_count": 2,
"questions": [
{
"question_number": 1,
"question": "What does 'How are you?' mean in Turkish?",
"choices": ["Merhaba", "Nasılsınız?", "Hoşçakal", "Teşekkürler"],
"previous_answer": null
},
{
"question_number": 2,
"question": "Which word means 'thank you' in English?",
"choices": ["Lütfen", "Güle güle", "Teşekkürler", "Thank you"],
"previous_answer": null
}
]
}
Response (Error - 400):
{
"error": "Multiple quiz progresses found"
}
We can consider the backend team as the main contributors to the following work (Aras, Kaan, Oktay, Halil). Here are some of the PRs regarding API development:
Title | PR | Description |
---|---|---|
BACKEND-530: Modify docker-compose for database volume and create separate yml for BACKEND-DEV | #533 | Improved docker-compose setup by adding separate YML for development. |
feat(backend): quiz recommendation | #659 | Added functionality for quiz recommendations. |
fix(backend): fix quiz feed endpoint data structure | #393 | Fixed data structure issues in the quiz feed endpoint. |
BACKEND-519: Preliminary quiz endpoints | #573 | Introduced preliminary endpoints for quizzes. |
feat(backend): improve quiz result endpoint and add quiz review endpoint | #628 | Enhanced quiz result endpoint and added support for reviews. |
Backend like unlike post | #481 | Implemented functionality for liking and unliking posts. |
Here's the Milestone 2 Report commit in which we listed the complete documentation of our API up to Milestone 2.
Here are some of the issues regarding API development:
Title | Issue | Description |
---|---|---|
Backend: Get latest quiz review endpoint | #666 | The system shall provide an endpoint to fetch the latest quiz review. |
Backend: Implement Quiz Recommendation Endpoint | #657 | The system shall implement functionality to provide quiz recommendations. |
Backend: Implement Quiz Progress Functionality | #520 | The system shall enable functionality to track and manage quiz progress. |
Create, Delete, Get Posts Endpoints Coding | #518 | The system shall support endpoints for creating, deleting, and fetching posts. |
Activity Streams Addition to All Views | #517 | The system shall integrate activity streams into all relevant views. |
[Backend]: Comments Coding | #473 | The system shall provide robust functionality for handling comments. |
[Backend]: Post Like/Unlike Functionality Coding | #471 | The system shall allow users to like and unlike posts. |
🏠 Home
- Oktay Özel
- Aras Taşçı
- Yunus Emre Özdemir
- Kaan Yolcu
- Elif Nur Deniz
Eymen Çeliktürk- Anıl Köse
Battal Hazar- Halil Özkan
Ebru Özçakı- Ali Tarık Şahin
- Ahmet Oğuz Engin
- Yağız Güldal
- Lab Report 1
- Lab Report 2
- Lab Report 3
- Lab Report 4
- Lab Report 5
- Lab Report 6
- Lab 7 PR
- Lab 8 PR
- Lab Report 9
- Lab Meeting 1
- Weekly Meeting 1
- Lab Meeting 2
- Weekly Meeting 2
- Frontend Meeting 1
- Lab Meeting 3
- Weekly Meeting 3
- Lab Meeting 4
- Frontend Meeting 2
- Weekly Meeting 4
- Weekly Meeting 5
- Frontend Meeting 3
- Lab Meeting 5
- Weekly Meeting 6
- Weekly Meeting 7
- Lab Meeting 6
- Weekly Meeting 8
- Lab Meeting 7
- Lab Meeting 8
- Weekly Meeting 9
- Requirements
- Elicitation Questions
- Project Plan
- Use Case Diagram
- Sequence Diagrams
- Class Diagrams
- Front-End Mockups
- Mobile Mockups
- User Scenario 1
- User Scenario 2
- User Scenario 3
- User Scenario 4
- User Scenario 5
- RAM
- Tags Documentation
- Domain Specific Improvement Ideas
- Lab-6 User Stories
- Customer Milestone 2 Plan
- Software Quality Plan
- Implemented Requirements For Milestone 2
- Customer Milestone 3 Plan
📅 Meetings
- Meeting 1
- Meeting 2
- Meeting 3
- Meeting 4
- Meeting 5
- Meeting 6
- Meeting 7
- Meeting 8
- Meeting 9
- Meeting 10 - Class Diagrams
- Meeting - Frontend 1
- Meeting - Backend 1
- Meeting 11
- Meeting - Backend 2 Wikidata
- Meeting - Frontend 2
- Meeting - Deployment
- Meeting - Frontend 3
- Meeting 12
- Meeting - Backend 3
- Meeting - Backend 4
- Meeting - Frontend 4
- Meeting 13
- Meeting 14
- Meeting 15
- Meeting 16
💻 Project
- Class Diagrams
- Sequence Diagrams
- Use Case Diagrams
- Requirements
- Elicitation Questions
- Project Plan
- Work Done By Each Member
- Milestone Report 1
- Scenarios-Mockups
- Responsibility Assignment Matrix
- Responsibility Assignment Matrix Old Version
- Related Software Analysis
- Workdone Each Member Milestone 2
- Milestone 2 Report
- Work Done By Each Member Milestone 3
- RAM 3
- Milestone Report 3