Basic survey system which creates survey and takes response
- Java
- Spring Boot
- H2 Database(In-memory database service provided by spring framework for testing)
- PostgreSQL
- Postman (for API Testing)
- Create Survey
- Get One Survey / Result of Survey
- Get All Survey
- Take Survey
- Get Single Response
- Get result of survey
All parameters are required, so apply it properly
No. | Name | Link | Method | Query Parameters | Body Parameters |
---|---|---|---|---|---|
1 | Create Survey | localhost:8080/survey/ |
POST | NONE |
|
2 | Get One Survey | localhost:8080/{id} |
GET | id : integer id of survey |
NONE |
3 | Get All Survey | localhost:8080/survey/ |
GET | NONE | NONE |
4 | Take a Survey | localhost:8080/survey/response/ |
POST | NONE |
|
4 | Single Response | localhost:8080/survey/response/{id} |
GET | id : integer id of response |
NONE |
4 | Result of Survey | localhost:8080/survey/result/{id} |
GET | id : integer id of survey |
NONE |
-
Create Survey =
localhost:8080/survey/
, TYPE = POST- Body =
{ "title" : "First Survey", "description" : "This is my First survey", "question" : [ { "question" : "this is First first question" }, { "question" : "this is First second question" }, { "question" : "this is First third question" } ] }
- Body =
-
Take a Survey =
localhost:8080/survey/response/
, TYPE = POST- Body =
{ "name" : "Harshvardhan", "email" : "ojhaharsh7@gmail.com", "city" : "surat", "survey" : { "surveyId" : 1 }, "answers" : [ { "question" : { "questionId" : 2 }, "answer" : false }, { "question" : { "questionId" : 3 }, "answer" : true } ] }
- Body =