-
Notifications
You must be signed in to change notification settings - Fork 3
Questionnaire API
Richard Thombs edited this page Dec 22, 2016
·
15 revisions
Hint: Before attempting to use this API to modify Questionnaires, make sure you are familiar with how the TeamHaven Questionnaire Designer works.
GET /api/projects/:pid/questionnaires/:id
Retrieves the Questionnaire Design of a specific Questionnaire.
The request body should be the JSON representation of the updated Questionnaire Design.
The response body is the JSON representation of the Questionnaire Design.
PUT /api/projects/:pid/questionnaires/:id
Updates the design of a Questionnaire, automatically creating a new version if the updates are significant.
The response body is the JSON representation of the updated Questionnaire Design.
This will differ from what was sent in the following ways:
- FormIDs, QuestionIDs, ChoiceIDs and ItemIDs will be assigned to those elements that didn't already have them.
- If a significant change was made to the design of the Questionnaire, then the QuestionnaireID and Version number will be updated.
Note: If the QuestionnaireID has changed, then make sure you use this new value in future API calls.