For the complete documentation index, see llms.txt. This page is also available as Markdown.

SurveyVotes

Introduction

SurveyVotes record a user's submitted choices for a Survey.

Model Definition

Alias

surveyVote

Relations

Key
Relation
Type
Relation Field(s)

user

Belongs to

user_id

groupAccountUser

Belongs to

group_account_user_id

department

Belongs to

department_id

survey

Belongs to

survey_id

selectedAnswerOptions

Has many

survey_vote_id

List by Survey

List visible SurveyVotes for one Survey.

Definition

GET /api/surveys/{survey}/votes

Route Parameters

Parameter
Type
Description

survey

integer

Survey ID.

Request Keys

Key
Type
Default
Description

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

Parameter
Type
Description

survey

integer

Survey ID.

Request Keys

Key
Type
Default
Description

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

Parameter
Type
Description

survey

integer

Survey ID.

surveyVote

integer

Vote ID belonging to the survey.

Request Keys

Key
Type
Default
Description

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

Parameter
Type
Description

survey

integer

Survey ID.

Request Keys

Key
Type
Default
Description

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

Parameter
Type
Description

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

Parameter
Type
Description

survey

integer

Survey ID.

Request Keys

Key
Type
Default
Description

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

Parameter
Type
Description

survey

integer

Survey ID.

surveyVote

integer

Vote ID belonging to the survey.

Request Keys

Key
Type
Default
Description

selects

string

All fields

Comma-separated fields to return.

relations

string

Default relations

Pipe-separated relations to include.

Example Request

Example Response

Last updated