submission

查询评测状态 (submission:read)

get/submission/{submission}

Path parameters

submissioninteger required
Example:42

提交编号

Response

查询成功

idinteger
friendly_namestring

提交者昵称

publicboolean

代码是否公开可见

language'cpp' | 'python' | 'git' | 'verilog' | 'quiz'
scoreinteger
messagestring nullable
detailsobject nullable

评测点详情。格式可能在未来变动,请以 API 实际返回值为准。

time_msecsinteger nullable
memory_bytesinteger nullable
status'accepted' | 'wrong_answer' | 'compile_error' | 'runtime_error' | 'time_limit_exceeded' | 'memory_limit_exceeded' | 'disk_limit_exceeded' | 'memory_leak' | 'pending' | 'compiling' | 'judging' | 'void' | 'aborted' | 'skipped' | 'system_error' | 'bad_problem' | 'unknown_error'
should_auto_reloadboolean

是否应该轮询评测状态(为 true 表示评测尚未结束)

should_show_scoreboolean

是否应该显示分数(如评测未完成、中止、分数无效等情况不应显示分数)

created_atstring date-time
code_urlstring

使用时需要携带 Authorization header

abort_urlstring nullable

若不能中止,则为 null

html_urlstring

Example response

{
  "id": 42,
  "friendly_name": "ACM",
  "problem": {
    "id": 1000,
    "title": "A+B",
    "url": "/OnlineJudge/api/v1/problem/42",
    "submit_url": "/OnlineJudge/api/v1/problem/42/submit",
    "html_url": "/OnlineJudge/problem/42"
  },
  "score": 100,
  "time_msecs": 2233,
  "memory_bytes": 1048576,
  "code_url": "/OnlineJudge/api/v1/submission/42/code",
  "abort_url": "/OnlineJudge/api/v1/submission/42/abort",
  "html_url": "/OnlineJudge/code/42/"
}

Changes

Changed in 4 of the 11 revisions of this API.91212

    • added the optional property should_auto_reload to the response with the 200 status

      response-optional-property-added

    • the response property abort_url became nullable for the status 200

      response-property-became-nullable

    • the response property details became nullable for the status 200

      response-property-became-nullable

    • the response property memory_bytes became nullable for the status 200

      response-property-became-nullable

    • the response property message became nullable for the status 200

      response-property-became-nullable

    • the response property problem/html_url became nullable for the status 200

      response-property-became-nullable

    • the response property problem/submit_url became nullable for the status 200

      response-property-became-nullable

    • the response property problem/title became nullable for the status 200

      response-property-became-nullable

    • the response property problem/url became nullable for the status 200

      response-property-became-nullable

    • the response property time_msecs became nullable for the status 200

      response-property-became-nullable

  • 31431aaf46d365See the full diff
    • removed the optional property problem_id from the response with the 200 status

      response-optional-property-removed

    • added the new cpp enum value to the language response property for the response status 200

      response-property-enum-value-added

    • added the new git enum value to the language response property for the response status 200

      response-property-enum-value-added

    • added the new python enum value to the language response property for the response status 200

      response-property-enum-value-added

    • added the new quiz enum value to the language response property for the response status 200

      response-property-enum-value-added

    • added the new verilog enum value to the language response property for the response status 200

      response-property-enum-value-added

    • added the optional property abort_url to the response with the 200 status

      response-optional-property-added

    • added the optional property created_at to the response with the 200 status

      response-optional-property-added

    • added the optional property details to the response with the 200 status

      response-optional-property-added

    • added the optional property html_url to the response with the 200 status

      response-optional-property-added

    • added the optional property problem to the response with the 200 status

      response-optional-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • abf18f0fc1b366See the full diff
    • removed the optional property abort_url from the response with the 200 status

      response-optional-property-removed

    • removed the optional property created_at from the response with the 200 status

      response-optional-property-removed

    • removed the optional property details from the response with the 200 status

      response-optional-property-removed

    • removed the optional property html_url from the response with the 200 status

      response-optional-property-removed

    • removed the optional property problem from the response with the 200 status

      response-optional-property-removed

    • removed the optional property should_auto_reload from the response with the 200 status

      response-optional-property-removed

    • added the optional property problem_id to the response with the 200 status

      response-optional-property-added

    • removed the cpp enum value from the language response property for the response status 200

      response-property-enum-value-removed

    • removed the git enum value from the language response property for the response status 200

      response-property-enum-value-removed

    • removed the python enum value from the language response property for the response status 200

      response-property-enum-value-removed

    • removed the quiz enum value from the language response property for the response status 200

      response-property-enum-value-removed

    • removed the verilog enum value from the language response property for the response status 200

      response-property-enum-value-removed

    This revision also has 17 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog