Skip to content

Support judge by API #468

@magnified103

Description

@magnified103

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.

{
  "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

  • Each request creates a new submission.
  • The judging process is asynchronous.
  • File size and language constraints are enforced by the server.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions