SurveyVotes
Introduction
SurveyVotes record a user's submitted choices for a Survey.
Model Definition
Alias
surveyVote
Relations
List by Survey
List visible SurveyVotes for one Survey.
Definition
GET /api/surveys/{survey}/votes
Route Parameters
survey
integer
Survey ID.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
limit
integer
No limit
Maximum number of votes.
Behavior
For anonymous surveys, voter identity fields and relations are removed. Visibility also follows the survey's show_votes_type.
Example Request
Example Response
Show Current
Show the current user's SurveyVote for one Survey.
Definition
GET /api/surveys/{survey}/votes/current
Route Parameters
survey
integer
Survey ID.
Request Keys
relations
string
Default relations
Pipe-separated relations to include.
Example Request
Example Response
Show
Show one visible SurveyVote.
Definition
GET /api/surveys/{survey}/votes/{surveyVote}
Route Parameters
survey
integer
Survey ID.
surveyVote
integer
Vote ID belonging to the survey.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
Example Request
Example Response
Create
Create a new SurveyVote.
Definition
POST /api/surveys/{survey}/votes
Route Parameters
survey
integer
Survey ID.
Request Keys
survey_answer_option_ids*
array
-
Answer option IDs belonging to this survey. A single-choice survey accepts at most one.
Keys with * are required.
Behavior
The authenticated user, real group-account user, department, and survey are assigned by the server. The example selection is returned in selected_answer_options.
Example Request
Example Response
Delete
Delete an existing SurveyVote.
Definition
DELETE /api/surveys/{survey}/votes/{surveyVote}
Route Parameters
survey
integer
Survey ID.
surveyVote
integer
Vote ID.
Example Request
Example Response
Admin: List by Survey
List all SurveyVotes for one Survey in administration scope.
Definition
GET /api/administration/surveys/{survey}/votes
Route Parameters
survey
integer
Survey ID.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
limit
integer
No limit
Maximum number of votes.
Behavior
Administration results include soft-deleted votes when permitted; anonymous surveys still suppress voter identity.
Example Request
Example Response
Admin: Show
Show one SurveyVote in administration scope.
Definition
GET /api/administration/surveys/{survey}/votes/{surveyVote}
Route Parameters
survey
integer
Survey ID.
surveyVote
integer
Vote ID belonging to the survey.
Request Keys
selects
string
All fields
Comma-separated fields to return.
relations
string
Default relations
Pipe-separated relations to include.
Example Request
Example Response
Last updated