Surveys - Survey Questions API
Bu içerik henüz dilinizde mevcut değil.
- List all questions of a survey
- Get a single question of a survey
- Add a question to a survey
- Update a question of a survey
- Remove a question from a survey
- Remove all questions from a survey
- Fields
List all questions of a survey
Заголовок раздела «List all questions of a survey»List all questions of a survey with a specific ID.
GET /surveys/:id/survey_questionsResponse
Заголовок раздела «Response»Status: 200 OK[ { "id": 2, "survey": { "id": 1, "name": "My Survey", "nodeID": "..." }, "type": "text", "question": "What could we do to improve?", "position": 1, "created_at": "2021-07-21T06:41:08-05:00", "updated_at": "2021-07-21T06:41:08-05:00", "...": "..." }, "..."]The response contains these fields by default.
Collection Fields
Заголовок раздела «Collection Fields»By default the following fields will appear in collections of survey questions:
id
survey
type
question
created_at
updated_at
Obtain a different set of fields using the ?fields= parameter .
Get a single question of a survey
Заголовок раздела «Get a single question of a survey»GET /surveys/:id/survey_questions/:question_idResponse
Заголовок раздела «Response»Status: 200 OK{ "id": 2, "survey": { "id": 1, "name": "My Survey", "nodeID": "..." }, "type": "text", "question": "What could we do to improve?", "position": 1, "created_at": "2021-07-21T06:41:08-05:00", "updated_at": "2021-07-21T06:41:08-05:00", "...": "..."}The response contains these fields .
Add a question to a survey
Заголовок раздела «Add a question to a survey»Add a question to a survey with a specific ID.
POST /surveys/:id/survey_questionsWhen creating a new question for a survey these fields are available.
Response
Заголовок раздела «Response»Status: 200 OK{ "question": "How did we do?", "...": "..."}The response contains all fields of the created survey and is similar to the response in Get a single survey question .
Update a question of a survey
Заголовок раздела «Update a question of a survey»Update a question with a specific ID of a survey with a specific ID.
PATCH /surveys/:id/survey_questions/:question_idWhen updating an existing question of a survey these fields are available.
Response
Заголовок раздела «Response»Status: 200 OK{ "question": "How did we do?", "...": "..."}The response contains all fields of the created survey and is similar to the response in Get a single survey question .
Remove a question from a survey
Заголовок раздела «Remove a question from a survey»Remove question with a specific ID from a survey with a specific ID.
DELETE /surveys/:id/survey_questions/:question_idResponse
Заголовок раздела «Response»Status: 204 No ContentRemove all questions from a survey
Заголовок раздела «Remove all questions from a survey»Remove all questions from a survey with a specific ID.
DELETE /surveys/:id/survey_questionsResponse
Заголовок раздела «Response»Status: 204 No Contentattachments
Readonly aggregated Attachments
created_at
Readonly datetime — The date and time at which the question was created.
disabled
Optional
boolean
, default:
false
— The Disabled box is checked when the question will not be shown to users completing the survey.
guidance
Optional text (max 64KB) — The Guidance field is used for additional information to aid in answering the question.
guidance_attachments
Writeonly attachments The attachments used in the Guidance field.
id
Readonly integer — The unique ID of the question.
position
Optional integer — The Position field is used to specify the position of the question, relative to the other questions of the survey. The first question has position 1.
question
Required string (max 128) — The question to pose to the user.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
type
Required enum — The Type field is used to select the type of the question. Valid values are:
star_rating: Star Ratingtext: Free Text
updated_at
Readonly
datetime
— The date and time of the last update of the question.
If the question has no updates it contains the
created_at
value.
weight
Optional integer — The Weight field is only used for rating question. It is used to specify the relative weight of the question compared to the others in the survey.