-
Notifications
You must be signed in to change notification settings - Fork 2
Vote Events Endpoints
{
"voteEvent": {
"id": "number",
"title": "string",
"startTime": "string (ISO 8601 DateTime)",
"endTime": "string (ISO 8601 DateTime)",
"voterManagement": {
"hasInternalList": "boolean",
"hasExternalList": "boolean",
"registrationStartTime": "string (ISO 8601 DateTime)",
"registrationEndTime": "string (ISO 8601 DateTime)"
},
"voteConfig": {
"maxVotes": "number",
"minVotes": "number",
"isRandomOrder": "boolean",
"instructions": "string",
"displayType": "string"
},
"resultsFilter": {
"areResultsPublished": "boolean",
"displayLimit": "number",
"showRank": "boolean",
"showVotes": "boolean",
"showPoints": "boolean",
"showPercentage": "boolean",
"studentWeight": "number",
"adviserWeight": "number",
"mentorWeight": "number",
"administratorWeight": "number",
"publicWeight": "number"
}
}
}
{
"externalVoter": {
"id": "string",
"voteEventId": "number",
}
}
{
"vote": {
"id": "number",
"voteEventId": "number",
"projectId": "number",
"userId": "number (optional)",
"externalVoterId": "string (optional)",
}
}
GET /api/vote-events
-
Authorization Required:
authorizeVoter
Description:
Returns an array of vote events the voter has access to.
GET /api/vote-events/:voteEventId
-
Authorization Required:
authorizeVoter+authorizeVoterOfVoteEvent
Description:
Returns the vote event with the specified voteEventId.
POST /api/vote-events
-
Authorization Required:
authorizeAdmin
Request Body:
{
"voteEvent": {
"title": "string",
"startTime": "string",
"endTime": "string"
}
}
Description:
Creates a new vote event and returns the created vote event.
POST /api/vote-events/:voteEventId/voter-management
-
Authorization Required:
authorizeAdmin
Request Body:
{
"voterManagement": {
"hasInternalList": "boolean",
"hasExternalList": "boolean",
"registrationStartTime": "string",
"registrationEndTime": "string",
"copyInternalVoteEventId": "number (optional)",
"copyExternalVoteEventId": "number (optional)"
}
}
Description:
Sets the voter management settings for the specified vote event. Returns the vote event with updated voter management.
DELETE /api/vote-events/:voteEventId
-
Authorization Required:
authorizeAdmin
Description:
Deletes the specified vote event and returns the deleted vote event.
POST /api/vote-events/:voteEventId/register
-
Authorization Required:
authorizeVoter
Description:
Registers the user as an internal voter for the specified vote event.
GET /api/vote-events/:voteEventId/voter-management/internal-voters
-
Authorization Required:
authorizeAdmin
Description:
Returns an array of internal voters (users) of the specified vote event.
POST /api/vote-events/:voteEventId/voter-management/internal-voters
-
Authorization Required:
authorizeAdmin
Request Body:
{
"email": "string"
}
Description:
Adds an internal voter to the specified vote event and returns the added voter (user object).
POST /api/vote-events/:voteEventId/voter-management/internal-voters/batch
-
Authorization Required:
authorizeAdmin
Request Body:
{
"emails": ["string"]
}
Description:
Adds multiple internal voters to the specified vote event and returns all internal voters of the event.
DELETE /api/vote-events/:voteEventId/voter-management/internal-voters/:internalVoterId
-
Authorization Required:
authorizeAdmin
Description:
Removes the specified internal voter from the vote event, including their votes. Returns the deleted voter.
GET /api/vote-events/:voteEventId/voter-management/external-voters
-
Authorization Required:
authorizeAdmin
Description:
Returns all external voters of the specified vote event.
POST /api/vote-events/:voteEventId/voter-management/external-voters
-
Authorization Required:
authorizeAdmin
Request Body:
{
"voterId": "string"
}
Description:
Adds an external voter to the specified vote event and returns the added voter.
POST /api/vote-events/:voteEventId/voter-management/external-voters/batch
-
Authorization Required:
authorizeAdmin
Request Body:
{
"voterIds": ["string"]
}
Description:
Adds multiple external voters to the specified vote event and returns all external voters of the event.
POST /api/vote-events/:voteEventId/voter-management/external-voters/generate
-
Authorization Required:
authorizeAdmin
Request Body:
{
"amount": "number",
"length": "number"
}
Description:
Generates external voter IDs and returns all external voters of the specified vote event.
DELETE /api/vote-events/:voteEventId/voter-management/external-voters/:externalVoterId
-
Authorization Required:
authorizeAdmin
Description:
Removes the specified external voter from the vote event and returns the deleted voter.
GET /api/vote-events/:voteEventId/candidates
-
Authorization Required:
authorizeVoter+authorizeVoterOfVoteEvent
Description:
Returns an array of candidates for the specified vote event.
POST /api/vote-events/:voteEventId/candidates
-
Authorization Required:
authorizeAdmin
Request Body:
{
"projectId": "number"
}
Description:
Adds a candidate (based on the project ID) to the specified vote event and returns the added candidate.
POST /api/vote-events/:voteEventId/candidates/batch
-
Authorization Required:
authorizeAdmin
Request Body:
{
"cohort": "number",
"achievement": "string"
}
Description:
Adds multiple candidates to the specified vote event based on the cohort and achievement. Returns all candidates of the vote event.
DELETE /api/vote-events/:voteEventId/candidates/:candidateId
-
Authorization Required:
authorizeAdmin
Description:
Deletes the specified candidate from the vote event and returns the deleted candidate.
GET /api/vote-events/:voteEventId/votes
-
Authorization Required:
authorizeVoter+authorizeVoterOfVoteEvent
Description:
Returns the votes cast by the current voter for the specified vote event.
GET /api/vote-events/:voteEventId/votes/all
-
Authorization Required:
authorizeAdmin
Description:
Returns all votes cast in the specified vote event.
POST /api/vote-events/:voteEventId/votes
-
Authorization Required:
authorizeVoter+authorizeVoterOfVoteEvent
Request Body:
{
"projectIds": ["number"]
}
Description:
Submits the voter's votes for the specified vote event. Returns the submitted votes.
DELETE /api/vote-events/:voteEventId/votes/:voteId
-
Authorization Required:
authorizeAdmin
Description:
Deletes the specified vote from the vote event and returns the deleted vote.
GET /api/vote-events/:voteEventId/results
-
Authorization Required:
authorizeVoter+authorizeVoterOfVoteEvent
Description:
Returns the published results of the specified vote event.
-
Auth Endpoints
/api/auth -
Users Endpoints
/api/users -
Students Endpoints
/api/students -
Advisers Endpoints
/api/advisers -
Mentors Endpoints
/api/mentors -
Administrators Endpoints
/api/administrators -
Cohorts Endpoints
/api/cohorts -
Deadlines Endpoints
/api/deadlines -
Projects Endpoints
/api/projects -
Dashboard Endpoints
/api/dashboard -
Evaluation Relationships Endpoints
/api/relations -
Submissions Endpoints
/api/submissions -
Announcements Endpoints
/api/announcements -
Application Endpoints
/api/application -
Vote Events Endpoints
/api/vote-events -
AI Endpoints
/api/ai