Online Quiz Micro Service API ( Using NodeJs, ExpressJs, MongoDB)
- In Postman, select the "GET" method and enter the URL http://localhost:3000/api/v1/quizzes.
- Click on "Send" button, you will receive a JSON response containing a list of all the quizzes in the database.
- In Postman, select the "POST" method and enter the URL http://localhost:3000/api/v1/quizzes.
- Select "Body" tab and set it to raw JSON, and enter the title, description, and questions for the quiz in the request body.
- Click on "Send" button, you will receive a JSON response containing the details of the quiz created.
- In Postman, select the "GET" method and enter the URL http://localhost:3000/api/v1/quizzes/:id, where :id is the id of the quiz you want to retrieve.
- Click on "Send" button, you will receive a JSON response containing the details of the quiz with the specified id.
- In Postman, select the "POST" method and enter the URL http://localhost:3000/api/v1/quizzes/:id/participate, where :id is the id of the quiz you want to participate in.
- Select "Body" tab and set it to raw JSON, and enter the details of the participant in the request body.
- Click on "Send" button, you will receive a JSON response containing the details of the quiz with the new participant added.