SurveyAnswerOptions

Introduction

SurveyAnswerOptions represent the selectable answer choices for a Survey. Answer options can be sorted and are protected from modification if the survey already has SurveyVotes.

Model Definition

Alias

surveyAnswerOption

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

survey

Belongs to

survey_id

List by Survey

Get a list of all SurveyAnswerOptions for a given Survey and the authenticated user.

Definition

GET /api/surveys/{survey}/answer-options

Example Request

Example Response

Show

Show a single SurveyAnswerOption by id.

Definition

GET /api/administration/surveys/{survey}/answer-options/{id}

Example Request

Example Response

[Adm.] List by Survey

Get a list of all SurveyAnswerOptions for a given Survey.

Definition

GET /api/administration/surveys/{survey}/answer-options

Example Request

Example Response

[Adm.] Show

Show a single SurveyAnswerOption by id.

Definition

GET /api/administration/surveys/{survey}/answer-options/{id}

Example Request

Example Response

Create

Create a new SurveyAnswerOption for a survey.

Definition

POST /api/administration/surveys/{survey}/answer-options

Request Keys

Key
Type
Default
Description

title *

string

-

The answer option text.

sort_number

integer

Current highest +1

The index of the SurveyAnswerOption related to the Survey.

Keys with * are required.

Example Request

Example Response

[Adm.] Update

Update an existing SurveyAnswerOption by id.

Definition

PUT /api/administration/surveys/{survey}/answer-options/{id}

Request Keys

Key
Type
Description

title

string

The answer option text.

sort_number

integer

The index of the SurveyAnswerOption related to the Survey.

Example Request

Example Response

Delete

Delete an existing SurveyAnswerOption by id.

Definition

DELETE /api/administration/surveys/{survey}/answer-options/{id}

Example Request

Example Response

Last updated