This feature allows on-site contestants (e.g. ICPC) to submit source code directly from contest terminals. Authentication is handled by an IP-based authentication backend.
API Contract
Submit Solution
POST /problem/{problem_code}/api_submit
Description
Creates a new submission for the specified problem.
Authentication
IP-based authentication (handled by a dedicated authentication backend).
Request
- Content-Type: multipart/form-data
- Path Parameters
- problem_code: unique code of the problem
- Form Fields
- language (string): ID of the submission language
- Files
- submission_file (file): source code file
Responses
✅ 201 Created
Submission successfully created.
❌ 400 Bad Request
Validation failed.
{
"errors": {
"language": "Unsupported language",
"submission_file": "File is required"
}
}
❌ 403 Forbidden
Request rejected by the authentication backend.
Notes
- Each request creates a new submission.
- The judging process is asynchronous.
- File size and language constraints are enforced by the server.
This feature allows on-site contestants (e.g. ICPC) to submit source code directly from contest terminals. Authentication is handled by an IP-based authentication backend.
API Contract
Submit Solution
POST /problem/{problem_code}/api_submit
Description
Creates a new submission for the specified problem.
Authentication
IP-based authentication (handled by a dedicated authentication backend).
Request
Responses
✅ 201 Created
Submission successfully created.
{ "id": 12345 }❌ 400 Bad Request
Validation failed.
{ "errors": { "language": "Unsupported language", "submission_file": "File is required" } }❌ 403 Forbidden
Request rejected by the authentication backend.
Notes