# Quiz System API Documentation

## Overview

This directory contains comprehensive documentation for the Quiz System API. The API allows customers to take quizzes, track progress, mark difficult questions, and receive detailed scores and analytics.

## Files Included

- **api_quiz_endpoints.md** - Detailed documentation of all API endpoints with request/response formats
- **postman_documentation.md** - Instructions for setting up and using the Postman collection
- **QuizSystem.postman_collection.json** - Importable Postman collection file
- **postman_environment.json** - Importable Postman environment file

## Getting Started with Postman

1. Install [Postman](https://www.postman.com/downloads/) if you haven't already
2. Import the collection and environment files:
   - Open Postman
   - Click "Import" in the top left corner
   - Drag and drop both JSON files or browse to their location
   - Click "Import"

3. Set up the environment:
   - Select "Quiz System API - Local" from the environment dropdown in the top right
   - Adjust the `base_url` if your API is running on a different host or port

4. Authentication:
   - Use the "Login" request in the Authentication folder to obtain a token
   - The token will be automatically set for use in subsequent requests

## Testing the API Flow

Follow this recommended sequence to test the API functionality:

1. **Authentication**: Register a new user or login with existing credentials
2. **Browse Quizzes**: Use the List Quizzes endpoint to find available quizzes
3. **Start a Quiz**: Begin a quiz session 
4. **Interact with the Quiz**:
   - Submit answers
   - Mark difficult questions
   - Track time spent
5. **Complete the Quiz**: Finish the quiz and review results
6. **Review Analytics**: Explore scorecards, rankings, and history

## Additional Resources

- See `postman_documentation.md` for detailed usage instructions
- Refer to `api_quiz_endpoints.md` for complete API specifications
- Explore the Postman collection to understand request/response formats and test scripts

## Troubleshooting

If you encounter issues with the Postman collection:

1. Ensure your API server is running and accessible
2. Verify that the environment variables are correctly set
3. Check that authentication is working properly (valid token)
4. Confirm that the IDs being used in requests exist in your database

For technical support, contact the development team at support@quizsystem.com 