modulepackage
0.0.0-20240820203918-4d2c3178b10d
Repository: https://github.com/blackav/ejudge-api.git
Documentation: pkg.go.dev
# README
ejudge-api
An API spec and swagger UI server
# Functions
ClientGetContestStatusJSON godoc
@Summary Get the contest status (unprivileged) @Description Get the contest status (unprivileged) @ID client-get-contest-status-json @Tags unprivileged contest @Produce json @Param contest_id query int true "contest_id" @Success 200 {object} ejudge.Reply[ClientGetContestStatusJSONResult] @Router /ej/api/v1/client/contest-status-json [get] @Security ApiKeyAuth.
ClientGetDownloadRun godoc
@Summary Get the source of the run (unprivileged) @Description Get the source of the run (unprivileged) @ID client-get-download-run @Tags unprivileged run @Param contest_id query int true "contest_id" @Param run_id query int false "run_id" @Param no_disp query int false "do not generate content-disposition header" @Router /ej/api/v1/client/download-run [get] @Security ApiKeyAuth.
ClientGetDownloadRunFile godoc
@Summary Get the input/output/correct file of the run (unprivileged) @Description Get the input/output/correct of the run (unprivileged) @ID client-get-download-run-file @Tags unprivileged run @Param contest_id query int true "contest_id" @Param run_id query int true "run_id" @Param num query int true "test number" @Param index query int true "file index" @Param offset query int false "initial offset of the file fragment" @Param length query int false "length of the file fragment" @Router /ej/api/v1/client/download-run-file [get] @Security ApiKeyAuth.
ClientGetGetSubmit godoc
@Summary Get information about a submit (unprivileged) @Description get information about a submit (unprivileged) @ID client-get-submit @Tags unprivileged submit @Produce json @Param contest_id query int true "contest_id" @Param submit_id query int true "Submit ID" @Param json query int false "Submit ID" default(1) @Success 200 {object} ejudge.Reply[ejudge.Submit] @Router /ej/api/v1/client/get-submit [get] @Security ApiKeyAuth.
ClientGetGetUserprob godoc
@Summary Get VCS problem settings (unprivileged) @Description get VCS problem settings (unprivileged) @ID client-get-get-userprob @Tags unprivileged vcs @Produce json @Param contest_id query int true "contest_id" @Param prob_id query int true "Problem ID" @Param json query int false "Submit ID" default(1) @Success 200 {object} ejudge.Reply[EjudgeUserProb] @Router /ej/api/v1/client/get-userprob [get] @Security ApiKeyAuth.
ClientGetListRunsJSON godoc
@Summary Get the list of the runs (unprivileged) @Description Get the list of the runs (unprivileged) @ID client-get-list-runs-json @Tags unprivileged run @Produce json @Param contest_id query int true "contest_id" @Param problem query int false "Problem ID" @Success 200 {object} ejudge.Reply[ClientGetListRunsJSONResult] @Router /ej/api/v1/client/list-runs-json [get] @Security ApiKeyAuth.
ClientGetProblemStatementJSON godoc
@Summary Get the problem statement (unprivileged) @Description Get the problem statement (unprivileged) @ID client-get-problem-statement-json @Tags unprivileged problem @Produce html @Param contest_id query int true "contest_id" @Param problem query int true "Problem ID" @Router /ej/api/v1/client/problem-statement-json [get] @Security ApiKeyAuth.
ClientGetProblemStatusJSON godoc
@Summary Get the problem status (unprivileged) @Description Get the problem status (unprivileged) @ID client-get-problem-status-json @Tags unprivileged problem @Produce json @Param contest_id query int true "contest_id" @Param problem query int true "Problem ID" @Success 200 {object} ejudge.Reply[ClientGetProblemStatusJSONResult] @Router /ej/api/v1/client/problem-status-json [get] @Security ApiKeyAuth.
ClientGetRunMessagesJSON godoc
@Summary Get the messages associated with the run (unprivileged) @Description Get the messages associated with the run (unprivileged) @ID client-get-run-messages-json @Tags unprivileged run @Produce json @Param contest_id query int true "contest_id" @Param run_id query int true "Run ID" @Success 200 {object} ejudge.Reply[ClientGetRunMessagesJSONResult] @Router /ej/api/v1/client/run-messages-json [get] @Security ApiKeyAuth.
ClientGetRunStatusJSON godoc
@Summary Get the status of the run (unprivileged) @Description Get the status of the run (unprivileged) @ID client-get-run-status-json @Tags unprivileged run @Produce json @Param contest_id query int true "contest_id" @Param run_id query int true "Run ID" @Success 200 {object} ejudge.Reply[ClientGetRunStatusJSONResult] @Router /ej/api/v1/client/run-status-json [get] @Security ApiKeyAuth.
ClientPostCreateUserprob godoc
@Summary Create VCS problem settings (unprivileged) @Description create VCS problem settings (unprivileged) @ID client-post-create-userprob @Tags unprivileged vcs @Produce json @Param contest_id query int true "contest_id" @Param prob_id query int true "Problem ID" @Param json query int false "Submit ID" default(1) @Success 200 {object} ejudge.Reply[EjudgeUserProb] @Router /ej/api/v1/client/create-userprob [post] @Security ApiKeyAuth.
ClientPostRemoveUserprob godoc
@Summary Remove VCS problem settings (unprivileged) @Description remove VCS problem settings (unprivileged) @ID client-post-remove-userprob @Tags unprivileged vcs @Produce json @Param contest_id query int true "contest_id" @Param serial_id query int true "Serial ID of the properties" @Param json query int false "Submit ID" default(1) @Success 200 {object} ejudge.BaseReply @Router /ej/api/v1/client/remove-userprob [post] @Security ApiKeyAuth.
ClientPostSaveUserprob godoc
@Summary Save VCS problem settings (unprivileged) @Description save VCS problem settings (unprivileged) @ID client-post-save-userprob @Tags unprivileged vcs @Produce json @Param contest_id query int true "contest_id" @Param serial_id query int true "Serial ID of the properties" @Param vcs_type query string true "VCS type: gitlab | github" @Param lang_name query string true "Language name" @Param vcs_url query string true "VCS URL" @Param vcs_subdir query string true "VCS subdir" @Param vcs_branch_spec query string true "VCS branch" @Param ssh_private_key query string true "ssh private key" @Param json query int false "Submit ID" default(1) @Success 200 {object} ejudge.BaseReply @Router /ej/api/v1/client/save-userprob [post] @Security ApiKeyAuth.
ClientPostSubmitRun godoc
@Summary Submit a program for testing and scoring (unprivileged) @Description submit a program for testing and scoring (unprivileged) @ID client-submit-run @Tags unprivileged run @Consume mpfd @Produce json @Param contest_id query int true "contest_id" @Param prob_id formData string false "prob_id or the short_name of the problem" @Param lang_id formData string false "lang_id or short_name" @Param eoln_type formData int false "End-of-Line translation type" @Param file formData file false "Source code" @Param text_form formData string false "Source code" format(text) @Success 200 {object} ejudge.Reply[PostSubmitRunResult] @Router /ej/api/v1/client/submit-run [post] @Security ApiKeyAuth.
ClientPostSubmitRunInput godoc
@Summary Submit a program and its input for testing (unprivileged) @Description submit a program and its input for testing (unprivileged) @ID client-submit-run-input @Tags unprivileged submit @Consume mpfd @Produce json @Param contest_id query int true "contest_id" @Param prob_id formData string true "problem ID or short_name" @Param lang_id formData string true "language ID or short_name" @Param eoln_type formData int false "End-of-Line translation type" @Param file formData file false "Source code" @Param text_form formData string false "Source code" format(text) @Param file_input formData file false "Input data" @Param text_form_input formData string false "Input data" @Success 200 {object} ejudge.Reply[ClientPostSubmitRunInputResult] @Router /ej/api/v1/client/submit-run-input [post] @Security ApiKeyAuth.
MasterGetContestStatusJSON godoc
@Summary Get the contest status (privileged) @Description Get the contest status (privileged) @ID master-get-contest-status-json @Tags privileged contest @Produce json @Param contest_id query int true "contest_id" @Success 200 {object} ejudge.Reply[MasterGetContestStatusJSONResult] @Router /ej/api/v1/master/contest-status-json [get] @Security ApiKeyAuth.
MasterGetDownloadRun godoc
@Summary Get the source of the run (privileged) @Description Get the source of the run (privileged) @ID master-get-download-run @Tags privileged run @Param contest_id query int true "contest_id" @Param run_id query int false "run_id" @Param no_disp query int false "do not generate content-disposition header" @Router /ej/api/v1/master/download-run [get] @Security ApiKeyAuth.
MasterGetGetSubmit godoc
@Summary Get information about a submit (privileged) @Description get information about a submit (privileged) @ID master-get-submit @Tags privileged submit @Produce json @Param contest_id query int true "Contest ID" @Param submit_id query int true "Submit ID" @Param json query int false "Submit ID" default(1) @Success 200 {object} ejudge.Reply[ejudge.Submit] @Router /ej/api/v1/master/get-submit [get] @Security ApiKeyAuth.
MasterGetGetUser godoc
@Summary Get user info (privileged) @Description Get user info (privileged) @ID master-get-user @Tags privileged user @Produce json @Param contest_id query int true "contest_id" @Param other_user_id query int false "User ID to query" @Param other_user_login query int false "User Login to query" @Param global query bool false "Request global (not contest-specific) info" @Success 200 {object} ejudge.Reply[UserlistUser] @Failure 400 {object} ejudge.Reply[UserlistUser] @Failure 404 {object} ejudge.Reply[UserlistUser] @Failure 500 {object} ejudge.Reply[UserlistUser] @Router /ej/api/v1/master/get-user [get] @Security ApiKeyAuth.
MasterGetListLanguages godoc
@Summary List available languages (privileged) @Description List available languages (privileged) @ID master-get-list-languages @Tags privileged language @Produce json @Param contest_id query int true "contest_id" @Success 200 {object} ejudge.Reply[MasterListLanguagesResult] @Router /ej/api/v1/master/list-languages [get] @Security ApiKeyAuth.
MasterGetListRunsJSON godoc
@Summary List the runs (privileged) @Description List the runs (privileged) @ID master-get-list-runs-json @Tags privileged run @Produce json @Param contest_id query int true "contest_id" @Param filter_expr query string false "Filter expression" @Param first_run query int false "First run to list" @Param last_run query int false "Last run to list" @Param field_mask query int false "Fields to display" @Success 200 {object} ejudge.Reply[MasterGetListRunsJSONResult] @Router /ej/api/v1/master/list-runs-json [get] @Security ApiKeyAuth.
MasterGetProblemStatusJSON godoc
@Summary List user's problem status (privileged) @Description List user's problem status (privileged) @ID master-get-problem-status-json @Tags privileged contest @Produce json @Param other_user_login formData string false "User login" @Param other_user_id formData int false "User ID" @Param contest_id formData int true "Contest ID" @Param prob_id formData int false "Problem ID" @Param prob_short formData string false "Problem short name" @Param rel_time formData int false "Offset from the start of contest (s)" @Param abs_time formData int false "Absolute time (s)" @Success 200 {object} ejudge.Reply[MasterProblemStatusResult] @Failure 400 {object} ejudge.Reply[bool] @Failure 404 {object} ejudge.Reply[bool] @Failure 500 {object} ejudge.Reply[bool] @Router /ej/api/v1/master/problem-status-json [get] @Security ApiKeyAuth.
MasterGetRawAuditLog godoc
@Summary Get the raw audit log of the run (privileged) @Description Get the raw audit log of the run (privileged) @ID master-get-raw-audit-log @Tags privileged run @Produce plain @Param contest_id query int true "contest_id" @Param run_id query int false "run_id" @Param run_uuid query string false "run_uuid" @Router /ej/api/v1/master/raw-audit-log [get] @Security ApiKeyAuth.
MasterGetRawReport godoc
@Summary Get the raw testing report of the run (privileged) @Description Get the raw testing report of the run (privileged) @ID master-get-raw-report @Tags privileged run @Param contest_id query int true "contest_id" @Param run_id query int false "run_id" @Param run_uuid query string false "run_uuid" @Router /ej/api/v1/master/raw-report [get] @Security ApiKeyAuth.
MasterGetRunStatusJSON godoc
@Summary Get the info for the run (privileged) @Description Get the info for the run (privileged) @ID master-get-run-status-json @Tags privileged run @Produce json @Param contest_id query int true "contest_id" @Param run_id query int false "run_id" @Param run_uuid query string false "run_uuid" @Success 200 {object} ejudge.Reply[MasterGetRunStatusJSONResult] @Router /ej/api/v1/master/run-status-json [get] @Security ApiKeyAuth.
MasterPostChangeRegistration godoc
@Summary Edit the user registration data (privileged) @Description edit the user registration data (privileged) @ID master-post-change-registration @Tags privileged registration @Consume x-www-form-urlencoded @Produce json @Param other_user_login formData string false "User login to change registration" @Param other_user_id formData int false "User ID to change registration" @Param contest_id formData int true "Contest ID" @Param op formData string true "Operation: one of delete, insert, upsert, update" @Param status formData string false "New status: one of ok, rejected, pending" @Param is_invisible formData bool false "New invisible flag" @Param is_banned formData bool false "New banned flag" @Param is_locked formData bool false "New locked flag" @Param is_incomplete formData bool false "New incomplete flag" @Param is_disqualified formData bool false "New disqualified flag" @Param is_privileged formData bool false "New privileged flag" @Param is_reg_readonly formData bool false "New reg_readonly flag" @Param ignore formData bool false "Ignore errors" @Param clear_name formData bool false "Clear the user name" @Param name formData string false "New user name" @Success 200 {object} ejudge.Reply[bool] @Router /ej/api/v1/master/change-registration [post] @Security ApiKeyAuth.
MasterPostChangeRegistrations godoc
@Summary Change multiple user registrations (privileged) @Description Change multiple user registrations (privileged) @ID master-post-change-registrations @Tags privileged user @Produce json @Param new_user_id_list formData string false "User IDs (space separated)" @Param op formData string true "operation: one of remove-registrations,set-pending,set-status,set-ok,set-rejected,set-invisible,clear-invisible,set-banned,clear-banned,set-locked,clear-locked,set-incomplete,clear-incomplete,set-disqualified,clear-disqualified,change-flags" @Param disq_comment formData string false "Disqualification comment for set-disqualified" @Param new_status formData int false "New user status for set-status" @Param flag_0 formData int false "Operation with BANNED flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Param flag_1 formData int false "Operation with INVISIBLE flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Param flag_2 formData int false "Operation with LOCKED flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Param flag_3 formData int false "Operation with INCOMPLETE flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Param flag_4 formData int false "Operation with DISQUALIFIED flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Param flag_5 formData int false "Operation with PRIVILEGED flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Param flag_6 formData int false "Operation with REG_READONLY flag (0 - noop, 1 - set, 2 - clear, 3 - toggle)" @Success 200 {object} ejudge.Reply[MasterPostChangeRegistrationsResult] @Failure 400 {object} ejudge.Reply[bool] @Failure 404 {object} ejudge.Reply[bool] @Failure 500 {object} ejudge.Reply[bool] @Router /ej/api/v1/master/change-registrations [post] @Security ApiKeyAuth.
MasterPostCopyUserInfo godoc
@Summary Copy user info from one user to another (privileged) @Description copy user info from one user to another (privileged) @ID master-post-copy-user-info @Tags privileged user @Consume x-www-form-urlencoded @Produce json @Param other_user_login formData string false "User login to copy info" @Param other_user_id formData int false "User ID to copy info" @Param from_contest_id formData int false "Source contest ID" @Param to_contest_id formData int false "Destination contest ID" @Success 200 {object} ejudge.Reply[bool] @Router /ej/api/v1/master/copy-user-info [post] @Security ApiKeyAuth.
MasterPostCreateUserSession godoc
@Summary Create a new session for another user (privileged) @Description Create a new session for another user (privileged) @ID master-post-create-user-session @Tags privileged user @Produce json @Param other_user_login formData string false "User login" @Param other_user_id formData int false "User ID" @Param contest_id formData int true "Contest ID" @Param sender_ip formData string false "Fake sender IP" @Param sender_ssl_flag formData bool false "HTTPS flag" @Param locale_id formData int false "Locale ID" @Param duration formData int false "Session liveness duration" @Param create_reg formData bool false "Create user registration if he/she is not registered" @Param base_contest_id formData int false "Base Contest ID (to copy user settings from)" @Success 200 {object} ejudge.Reply[UserlistCookie] @Failure 400 {object} ejudge.Reply[bool] @Failure 404 {object} ejudge.Reply[bool] @Failure 500 {object} ejudge.Reply[bool] @Router /ej/api/v1/master/create-user-session [post] @Security ApiKeyAuth.
MasterPostSubmitRun godoc
@Summary Submit a program for testing and scoring (privileged) @Description submit a program for testing and scoring (privileged) @ID master-submit-run @Tags privileged run @Consume mpfd @Produce json @Param sender_user_login formData string false "Impersonated user login" @Param sender_user_id formData int false "Impersonated user ID" @Param sender_ip formData string false "Fake sender IP" @Param sender_ssl_flag formData int false "HTTPS flag" @Param contest_id formData int true "contest ID" @Param problem_uuid formData string false "UUID of the problem" @Param problem_name formData string false "short_name or internal_name of the problem" @Param problem formData int false "prob_id of the problem" @Param variant formData int false "variant of the problem" @Param language_name formData string false "short_name of the programming language" @Param lang_id formData string false "lang_id or short_name" @Param eoln_type formData int false "End-of-Line translation type" @Param is_visible formData int false "if value > 0 the run will be visible" @Param not_ok_is_cf formData int false "if value > 0 any non OK verdict is Check failed" @Param rejudge_flag formData int false "if value > 0 the run is tested with rejudge priority" @Param file formData file false "Source code" @Param text_form formData string false "Source code" format(text) @Success 200 {object} ejudge.Reply[PostSubmitRunResult] @Router /ej/api/v1/master/submit-run [post] @Security ApiKeyAuth.
MasterPostSubmitRunInput godoc
@Summary Submit a program and its input for testing (privileged) @Description submit a program and its input for testing (privileged) @ID master-submit-run-input @Tags privileged submit @Consume mpfd @Produce json @Param sender_user_login formData string false "Impersonated user login" @Param sender_user_id formData int false "Impersonated user ID" @Param sender_ip formData string false "Fake sender IP" @Param sender_ssl_flag formData int false "HTTPS flag" @Param contest_id formData int true "contest ID" @Param prob_id formData string true "problem ID or short_name" @Param lang_id formData string false "language ID or short_name" @Param eoln_type formData int false "End-of-Line translation type" @Param file formData file false "Source code" @Param text_form formData string false "Source code" format(text) @Param file_input formData file false "Input data" @Param text_form_input formData string false "Input data" @Success 200 {object} ejudge.Reply[MasterPostSubmitRunInputResult] @Router /ej/api/v1/master/submit-run-input [post] @Security ApiKeyAuth.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author