Skip to main content
See the backend API page for an explanation about how the API code is structured. All routes are found at the http://localhost:8000/api endpoint in development and the /api endpoint in production, which can be accessed on the frontend through the VITE_JURY_URL environmental variable. An example request looks like the following:
Note that this uses the getRequest and errorAlert frontend methods, which are described in the calling backend API page.

All routes

All routes are listed in server/router/init.go with their respective handlers.

Response types

OK response

Will return either as a success or failure. This will be represented with the following JSON, where 0 is failure and 1 is success.

Error response

All errors will be formatted in the following JSON:

Default routes

Errors will return with a non-success status (generally 4xx).

GET /

Heartbeat route
  • Auth: none
  • Response: OK response

Login routes

POST /judge/login

Login judge
  • Auth: none
  • Body: JSON
  • Response: JSON

POST /admin/login

Log into the admin dashboard
  • Auth: none
  • Body: JSON
  • Response: OK response

POST /judge/auth

Checks to see if judge is logged in
  • Auth: judge
  • Response: OK response

POST /admin/auth

Checks to see if admin is logged in
  • Auth: admin
  • Response: OK response

Admin panel (Judges) routes

POST /judge/new

Add a new judge
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /judge/csv

Add judges by CSV
  • Auth: admin
  • Body: FormData
    • csv: CSV file
    • hasHeader: Boolean, true if CSV has a header
    • noSend: Don’t send email to judge if true
  • Response: OK response

GET /judge/list

Get list of all judges
  • Auth: admin
  • Response: JSON List

DELETE /judge/:id

Deletes a judge by ID
  • Auth: admin
  • Parameter: ID, the ID of the judge to delete
  • Response: OK response

PUT /judge/:id

Edit judge info
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/groups/swap

Swaps the judge groups manually
  • Auth: admin
  • Response: OK response

POST /admin/qr

Generate add judge QR code
  • Auth: admin
  • Response: JSON

POST /admin/qr/:track

Generate add judge to track QR code
  • Auth: admin
  • Response: JSON

GET /admin/qr

Gets add judge QR code
  • Auth: none
  • Response: JSON

GET /admin/qr/:track

Gets add judge to track QR code
  • Auth: none
  • Response: JSON

POST /qr/check

Checks if QR code is correct
  • Auth: none
  • Body: JSON
  • Response: OK response

POST /qr/check/:track

Checks if track QR code is correct
  • Auth: none
  • Body: JSON
  • Response: OK response

POST /qr/add

Add judge from QR code
  • Auth: none
  • Body: JSON
  • Response: OK response

Admin panel (Projects) routes

POST /project/new

Add a new project
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /project/devpost

Upload a Devpost CSV
  • Auth: admin
  • Body: FormData
    • csv: CSV file
  • Response:

POST /project/csv

Add projects by CSV
  • Auth: admin
  • Body: FormData
    • csv: CSV file
    • hasHeader: Boolean, true if CSV has a header
  • Response: OK response

GET /project/list

get list of all projects
  • Auth: admin
  • Response: JSON

DELETE /project/:id

Delete project by ID
  • Auth: admin
  • Parameter: ID of project to delete
  • Response: OK response

PUT /project/:id

Edit project info
  • Auth: admin
  • Body: JSON
  • Response: OK response

Admin panel (Stats/Data) routes

GET /admin/stats

Get all stats
  • Auth: admin
  • Response: JSON

GET /admin/stats/:track

Get all stats for a track
  • Auth: admin
  • Parameter: Track, the track to fetch stats for
  • Response: JSON

GET /project/stats

Get the stats for projects
  • Auth: admin
  • Response: JSON

GET /judge/stats

Get the stats for judges
  • Auth: admin
  • Response: JSON

GET /admin/flags

Gets all flags
  • Auth: admin
  • Response: JSON List

Admin panel (Clock) routes

GET /admin/clock

Gets the current clock state
  • Auth: admin
  • Response: JSON

POST /admin/clock/pause

Pauses the clock
  • Auth: admin
  • Response: OK response

POST /admin/clock/unpause

Resumes the clock
  • Auth: admin
  • Response: OK response

POST /admin/clock/backup

Backs up the clock to the database
  • Auth: admin
  • Response: OK response

GET /admin/started

Check if the clock is running
  • Auth: admin
  • Response: OK response (1 if true)

Admin options/settings routes

POST /admin/clock/reset

Resets the clock
  • Auth: admin
  • Response: OK response

POST /admin/reset

Resets the entire database
  • Auth: admin
  • Response: OK response

POST /project/reassign

Reassign all project table numbers
  • Auth: admin
  • Response: OK response

POST /project/balance-groups

Balances project group numbers
  • Auth: admin
  • Response: OK response

POST /project/reassign

Reassign all project table numbers
  • Auth: admin
  • Response: OK response

GET /admin/timer

Gets the judge timer length
  • Auth: admin
  • Response: JSON

GET /admin/options

Gets all config options set
  • Auth: admin
  • Response: JSON

POST /admin/options

Sets config options
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/tracks

Update the list of tracks
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/track-views

Update the min views per track
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/num-groups

Sets num of groups and reassigns nums
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/group-sizes

Sets the size of groups and reassigns nums
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/block-reqs

Sets whether to block login requests
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /admin/max-reqs

Sets the maximum number of logins/min
  • Auth: admin
  • Body: JSON
  • Response:

Admin export routes

GET /admin/export/judges

Exports judges as a CSV
  • Auth: admin
  • Response: CSV Blob

GET /admin/export/projects

Exports projects as a CSV
  • Auth: admin
  • Response: CSV Blob

GET /admin/export/challenges

Exports projects by challenge as ZIP of CSVs
  • Auth: admin
  • Response: ZIP Blob

GET /admin/export/rankings

Exports a list of rankings for each judge
  • Auth: admin
  • Response: CSV Blob

Admin table actions routes

PUT /judge/hide/:id

Hides a judge
  • Auth: admin
  • Parameter: ID | judge ID to hide
  • Response: OK response

PUT /project/hide/:id

Hides a project
  • Auth: admin
  • Parameter: ID | judge ID to hide
  • Response: OK response

PUT /judge/move/group/:id

Moves a judge to a different group
  • Auth: admin
  • Parameter: ID | judge ID to hide
  • Body: JSON
  • Response: OK response

PUT /project/move/group/:id

Moves a project to a different group
  • Auth: admin
  • Parameter: ID | ID of project to move
  • Body: JSON
  • Response: OK response

PUT /project/move/:id

Moves a project to a different table number
  • Auth: admin
  • Parameter: ID | ID of project to move
  • Body: JSON
  • Response: OK response

PUT /project/prioritize/:id

Prioritizes a project
  • Auth: admin
  • Parameter: ID | ID of project to prioritize
  • Body: JSON
  • Response: OK response

POST /project/prioritize

Prioritizes multiple projects
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /judge/hide

Hides multiple judges
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /project/hide

Hides multiple projects
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /judge/move/group

Moves multiple judges to a different group
  • Auth: admin
  • Body: JSON
  • Response: OK response

POST /project/move/group

Moves multiple projects to a different group
  • Auth: admin
  • Body: JSON
  • Response: OK response

DELETE /admin/flag/:id

Removes a flag
  • Auth: admin
  • Parameter: ID, the ID of the flag to delete
  • Response: OK response

POST /admin/deliberation

Toggles deliberation mode
  • Auth: admin
  • Body: JSON
  • Response: OK response

Admin panel (Log) routes

GET /admin/log

Gets the audit log
  • Auth: admin
  • Response: JSON

Judging routes

GET /judge

Gets judge from token cookie
  • Auth: judge
  • Response: JSON

GET /judge/welcome

Checks for read_welcome for a judge
  • Auth: judge
  • Response: OK response

PUT /judge/welcome

Set read_welcome to true for a judge
  • Auth: judge
  • Response: OK response

GET /judge/projects

Gets the list of projects a judge has seen
  • Auth: judge
  • Response: JSON List

POST /judge/next

Get next project for judge to view
  • Auth: judge
  • Response: JSON

POST /judge/skip

Skips the current project with a reason
  • Auth: judge
  • Body: JSON
  • Response: OK response

POST /judge/finish

Finish viewing a project
  • Auth: judge
  • Body: JSON
  • Response: OK response

POST /judge/rank

Update judge rankings
  • Auth: judge
  • Body: JSON
  • Response: OK response

PUT /judge/star/:id

Update star ranking for a project
  • Auth: judge
  • Body: JSON
  • Response: OK response

PUT /judge/notes/:id

Update notes for a project
  • Auth: judge
  • Parameter: ID | ID for project to update notes for
  • Body: JSON
  • Response: OK response

GET /project/:id

Gets a project by ID
  • Auth: judge
  • Parameter: ID | ID for project to get
  • Response: JSON

GET /project/count

Gets the total number of projects
  • Auth: judge
  • Response: JSON

GET /judge/project/:id

Gets a judged project by a judge
  • Auth: judge
  • Parameter: ID | Project ID to get
  • Response: JSON

GET /judge/deliberation

Returns if deliberation mode is on
  • Auth: judge
  • Response: OK response | 1 if deliberation mode is on

Project expo routes

GET /project/list/public

Gets a list of all projects for expo
  • Auth: none
  • Response: JSON List

GET /challenges

Gets a list of all challenges
  • Auth: none
  • Response: JSON List

GET /group-info

Gets a list of all group names and if groups are enabled
  • Auth: none
  • Response: JSON