Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

URL/api/survey
DescriptionPlace a survey into the database in order to be retrieved by the application in the future
HeaderAPI_KEY, Authorization
MethodPUT
Url Paramsurvey_name
Request Body Data

Survey to placed in the database

Response
{
"message": "Incorrect API key provided."
}
{
"message": "Survey stored!"
}, 200
If survey name not passed in,
{
"message"="Please pass in survey name to create a survey"
}, 400
Note

To add a new survey, in postman BodBody: use "form-data" and

add KEY as questions,

add VALUE as (remove questionList)

[{
"questionId": "questionDiet",
 ...
}]

...