- Sphere Engine overview
- Compilers
- Overview
- API integration
- JavaScript widget
- Problems
- Overview
- API integration
- JavaScript widget
- E-learning platforms
- Problem setter's handbook
- Problems archive
- RESOURCES
- Programming languages
- Submission streams
- Webhooks
- Disk operations
- Multi-file submissions
- Generating images
- Client libraries
- API Changelog
- FAQ
This is a technical reference for Sphere Engine Containers API Version 1.1.
Here you can find complete coverage of the API methods, including:
- parameters with the type, validation rules, and description,
- interpretation of response and error codes,
- usage examples.
API Methods
Testing Containers API. Every successful usage returns identical response.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
Success Response
Field | Type | Description |
---|---|---|
message | string | message that states that it's possible to use API |
Examples
curl -X GET 'https://<endpoint>/api/v1/test?access_token=<access_token>'
Response example
{
"message": "You can use Sphere Engine Containers API."
}
Return usage statistics.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
Success Response
Field | Type | Description |
---|---|---|
items[].all | integer | the number of total workspace slots |
items[].free | integer | the number of free workspace slots |
Examples
curl -X GET 'https://<endpoint>/api/v1/stats?access_token=<access_token>'
Response example
{
"workspace_slots": {
"all": 200,
"free": 185
}
}
Returns the list of workspaces of the quantity given by limit parameter.
Request parameters
Name | Located in | Type | Default value | Description |
---|---|---|---|---|
access_token |
query | string | - | access token |
project_id | query | string | - | filter by project id |
states | query | array | - |
filter by states example: states[]=1&states[]=2 see section: workspace state |
limit | query | integer | 10 |
limit of workspaces to get max: 30 |
page_token | query | boolean | - |
a token identifying a page of results to return this should be a page token returned from a previous call if empty, the first page of results is returned |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
400 | 10 | invalid request data |
Success Response
Field | Type | Description |
---|---|---|
items[].id | string | workspace id |
items[].project.id | string | project id |
items[].project.name | string | project name |
items[].project.config | string | configuration of the project in JSON format |
items[].state.code | string |
workspace state code see section: workspace state |
items[].state.name | string | workspace state name |
items[].created_at | string |
date and time of the workspace creation [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
items[].terminated_at | string |
date and time of the workspace termination [yyyy-mm-dd hh:mm:ss TZD] note that server time is used null if workspace is not terminated |
items[].last_usage | string |
date and time the workspace was last used [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
items[].lifetime | integer | lifetime of workspace [minutes] |
items[].workspace_url | string | url to the workspace IDE |
pagination.previous_page_token | string | a token to retrieve the previous page of results; this field is null if there are no more results to retrieve |
pagination.next_page_token | string | a token to retrieve the next page of results; this field is null if there are no more results to retrieve. |
Examples
curl -X GET 'https://<endpoint>/api/v1/workspaces?project_id=<id>&access_token=<access_token>'
Response example
{
"items": [
{
"id": "93086f6043984e63b696c710317ee6eb",
"project": {
"id": "eef024c1d14f46319517a65edafb5ee3",
"name": "EXAMPLE",
"config": "{content of the configuration}"
},
"created_at": "2021-01-01 10:27:44 +0000",
"terminated_at": "2021-01-01 10:44:08 +0000",
"last_usage": "2021-01-01 10:28:51 +0000",
"lifetime": 15,
"state": {
"code": 4,
"name": "removed"
},
"workspace_url": "https://<endpoint>/workspace/93086f6043984e63b696c710317ee6eb"
},
{
"id": "dec2d11d17054f0c84ab38415221bdb8",
"project": {
"id": "eef024c1d14f46319517a65edafb5ee3",
"name": "EXAMPLE",
"config": "{content of the configuration}"
},
"created_at": "2021-01-01 10:16:50 +0000",
"terminated_at": null,
"last_usage": "2021-01-01 10:40:07 +0000",
"lifetime": 15,
"state": {
"code": 2,
"name": "running"
},
"workspace_url": "https://<endpoint>/workspace/dec2d11d17054f0c84ab38415221bdb8"
}
],
"paging": {
"previous_page_token": null,
"next_page_token": "MTA="
}
}
Create a new workspace.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
project_id |
form | string | project id |
project_config | form | string | project config to override; use the encoded JSON format |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
201 | - | success |
401 | 1 | unauthorized access |
400 | 10 | invalid request data |
400 | 1003 | creation failed |
409 | 200611 | the maximum number of workspaces has been reached |
409 | 200510 | the project is temporarily unavailable |
409 | 200612 | another edit session is already active |
Success Response
Field | Type | Description |
---|---|---|
message | string | message confirming that the workspace creation has been initialized |
workspace.id | string | workspace id |
workspace.project.id | string | project id |
workspace.project.name | string | project name |
workspace.project.config | string | configuration of the project in JSON format |
workspace.state.code | string |
workspace state code see section: workspace state |
workspace.state.name | string | workspace state name |
workspace.created_at | string |
date and time of the workspace creation [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
workspace.terminated_at | string |
date and time of the workspace termination [yyyy-mm-dd hh:mm:ss TZD] note that server time is used null if workspace is not terminated |
workspace.last_usage | string |
date and time the workspace was last used [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
workspace.lifetime | integer | lifetime of workspace [minutes] |
workspace.workspace_url | string | url to the workspace IDE |
Examples
curl -X POST --form "project_id=82da33ed1b7e" "https://<endpoint>/api/v1/workspaces?access_token=<access_token>"
Response example
{
"message": "Workspace has been created",
"workspace": {
"id": "48dba362e85e4aebac3dc8e6b0677ff7",
"project": {
"id": "eef024c1d14f46319517a65edafb5ee3",
"name": "EXAMPLE",
"config": "{content of the configuration}"
},
"created_at": "2021-01-01 10:20:37 +0000",
"terminated_at": null,
"last_usage": null,
"lifetime": 15,
"state": {
"code": 1,
"name": "starting"
},
"workspace_url": "https://<endpoint>/workspace/48dba362e85e4aebac3dc8e6b0677ff7"
}
}
Retrieve information about a workspace.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
id |
path | string | workspace id |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
404 | 1001 | workspace not found |
Success Response
Field | Type | Description |
---|---|---|
id | string | workspace id |
project.id | string | project id |
project.name | string | project name |
project.config | string | configuration of the project in JSON format |
state.code | string |
workspace state code see section: workspace state |
state.name | string | workspace state name |
created_at | string |
date and time of the workspace creation [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
terminated_at | string |
date and time of the workspace termination [yyyy-mm-dd hh:mm:ss TZD] note that server time is used null if workspace is not terminated |
last_usage | string |
date and time the workspace was last used [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
lifetime | integer | lifetime of workspace [minutes] |
workspace_url | string | url to the workspace IDE |
Examples
curl -X GET 'https://<endpoint>/api/v1/workspaces/<id>?access_token=<access_token>'
Response example
{
"id": "93086f6043984e63b696c710317ee6eb",
"project": {
"id": "eef024c1d14f46319517a65edafb5ee3",
"name": "EXAMPLE",
"config": "{content of the configuration}"
},
"created_at": "2021-01-01 10:27:44 +0000",
"terminated_at": "2021-01-01 10:44:08 +0000",
"last_usage": "2021-01-01 10:28:51 +0000",
"lifetime": 15,
"state": {
"code": 4,
"name": "removed"
},
"workspace_url": "https://<endpoint>/workspace/93086f6043984e63b696c710317ee6eb"
}
Retrieve information about submissions.
Request parameters
Name | Located in | Type | Default value | Description |
---|---|---|---|---|
access_token |
query | string | - | access token |
ids |
query | string | - |
comma separated list of submission identifiers maximum number of identifiers: 20 |
limit | query | integer | 10 | limit of submissions to get; max: 20 |
page_token | query | boolean | - |
a token identifying a page of results to return this should be a page token returned from a previous call if empty, the first page of results is returned |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
400 | 205104 | identifiers are not provided |
400 | 205105 | invalid format of identifiers |
400 | 205106 | maximum number of identifiers exceeded |
400 | 10 | invalid request data |
Success Response
Field | Type | Description |
---|---|---|
items[].id | integer | submission id |
items[].executing | boolean | indicates whether submission is being executed |
items[].date | string |
date and time of submission creation [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
items[].project.id | string | project id |
items[].project.name | string | project name |
items[].project.config | string | configuration of the project in JSON format |
items[].result.status.code | integer |
status code see section: submission status |
items[].result.status.name | string | status name |
items[].result.time | float | execution time [seconds] |
items[].result.memory | integer | memory consumed by the program [kilobytes] |
items[].result.signal | integer | signal raised by the program |
items[].result.score | float | obtained score |
items[].streams.source.size | integer | source code length [bytes] |
items[].streams.source.uri | string | link to the file with source code |
items[].streams.auxdata.size | integer | size of auxiliary data data [bytes] |
items[].streams.auxdata.uri | string | link to the file with auxiliary data generated by the submission |
items[].streams.debug_log.size | integer | size of debug log data [bytes] |
items[].streams.debug_log.uri | string | link to the file with debug log generated by the submission |
items[].streams.stage_init_output.size | integer | size of the init stage's output [bytes] |
items[].streams.stage_init_output.uri | string | link to the file with the init stage's output |
items[].streams.stage_init_error.size | integer | size of the init stage's error [bytes] |
items[].streams.stage_init_error.uri | string | link to the file with the init stage's error |
items[].streams.stage_compilation_output.size | integer | size of the compilation stage's output [bytes] |
items[].streams.stage_compilation_output.uri | string | link to the file with the compilation stage's output |
items[].streams.stage_compilation_error.size | integer | size of the compilation stage's error [bytes] |
items[].streams.stage_compilation_error.uri | string | link to the file with the compilation stage's error |
items[].streams.stage_execution_output.size | integer | size of the execution stage's output [bytes] |
items[].streams.stage_execution_output.uri | string | link to the file with the execution stage's output |
items[].streams.stage_execution_error.size | integer | size of the execution stage's error [bytes] |
items[].streams.stage_execution_error.uri | string | link to the file with the execution stage's error |
items[].streams.stage_judge_output.size | integer | size of the judge stage's output [bytes] |
items[].streams.stage_judge_output.uri | string | link to the file with the judge stage's output |
items[].streams.stage_judge_error.size | integer | size of the judge stage's error [bytes] |
items[].streams.stage_judge_error.uri | string | link to the file with the judge stage's error |
items[].streams.stage_post_output.size | integer | size of the post stage's output [bytes] |
items[].streams.stage_post_output.uri | string | link to the file with the post stage's output |
items[].streams.stage_post_error.size | integer | size of the post stage's error [bytes] |
items[].streams.stage_post_error.uri | string | link to the file with the post stage's error |
items[].stages.init.status.code | integer |
status code see section: submission status |
items[].stages.init.status.name | string | status name |
items[].stages.init.time | float | stage execution time [seconds] |
items[].stages.init.skipped | boolean | whether the stage has been skipped |
items[].stages.init.signal | integer | stage termination exit code |
items[].stages.compilation.status.code | integer |
status code see section: submission status |
items[].stages.compilation.status.name | string | status name |
items[].stages.compilation.time | float | stage execution time [seconds] |
items[].stages.compilation.skipped | boolean | whether the stage has been skipped |
items[].stages.compilation.signal | integer | stage termination exit code |
items[].stages.execution.status.code | integer |
status code see section: submission status |
items[].stages.execution.status.name | string | status name |
items[].stages.execution.time | float | stage execution time [seconds] |
items[].stages.execution.skipped | boolean | whether the stage has been skipped |
items[].stages.execution.signal | integer | stage termination exit code |
items[].stages.judge.status.code | integer |
status code see section: submission status |
items[].stages.judge.status.name | string | status name |
items[].stages.judge.time | float | stage execution time [seconds] |
items[].stages.judge.skipped | boolean | whether the stage has been skipped |
items[].stages.judge.signal | integer | stage termination exit code |
items[].stages.post.status.code | integer |
status code see section: submission status |
items[].stages.post.status.name | string | status name |
items[].stages.post.time | float | stage execution time [seconds] |
items[].stages.post.skipped | boolean | whether the stage has been skipped |
items[].stages.post.signal | integer | stage termination exit code |
items[].uri | string | link to submission details |
Examples
curl -X GET 'https://<endpoint>/api/v1/submissions?ids=<ids>&access_token=<access_token>'
Response example
{
"items": [
{
"id": 1,
"executing": false,
"date": "2021-01-01 14:21:57 +0000",
"project": {
"id": "ef66185208fd4cce9026c5f1a4486c72",
"name": "EXAMPLE"
},
"result": {
"status": {
"code": 15,
"name": "ok"
},
"score": 0,
"time": 4.2,
"memory": 239421,
"signal": 0
},
"streams": {
"source": {
"size": 88,
"uri": "https://<endpoint>/api/v1/submissions/1/source"
},
"auxdata": {
"size": 105,
"uri": "https://<endpoint>/api/v1/submissions/1/auxdata"
},
"debug_log": {
"size": 142,
"uri": "https://<endpoint>/api/v1/submissions/1/debug_log"
},
"stage_init_output": {
"size": 97,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_init_output"
},
"stage_init_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_init_error"
},
"stage_compilation_output": {
"size": 80,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_compilation_output"
},
"stage_compilation_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_compilation_error"
},
"stage_execution_output": {
"size": 1134,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_execution_output"
},
"stage_execution_error": {
"size": 567,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_execution_error"
},
"stage_judge_output": {
"size": 900,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_judge_output"
},
"stage_judge_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_judge_error"
},
"stage_post_output": {
"size": 97,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_post_output"
},
"stage_post_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_post_error"
}
},
"stages": {
"init": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"compilation": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"execution": {
"status": {
"code": 15,
"name": "ok"
},
"time": 4.2,
"skipped": false,
"signal": 0
},
"judge": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"post": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
}
},
"uri": "https://<endpoint>/api/v1/submissions/1"
},
{
"id": 42,
"executing": false,
"date": "2021-02-04 04:27:14 +0000",
"project": {
"id": "ef66185208fd4cce9026c5f1a4486c72",
"name": "EXAMPLE"
},
"result": {
"status": {
"code": 15,
"name": "ok"
},
"score": 0,
"time": 7.45,
"memory": 553353,
"signal": 0
},
"streams": {
"source": {
"size": 88,
"uri": "https://<endpoint>/api/v1/submissions/1/source"
},
"auxdata": {
"size": 105,
"uri": "https://<endpoint>/api/v1/submissions/1/auxdata"
},
"debug_log": {
"size": 142,
"uri": "https://<endpoint>/api/v1/submissions/1/debug_log"
},
"stage_init_output": {
"size": 97,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_init_output"
},
"stage_init_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_init_error"
},
"stage_compilation_output": {
"size": 80,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_compilation_output"
},
"stage_compilation_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_compilation_error"
},
"stage_execution_output": {
"size": 1134,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_execution_output"
},
"stage_execution_error": {
"size": 567,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_execution_error"
},
"stage_judge_output": {
"size": 900,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_judge_output"
},
"stage_judge_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_judge_error"
},
"stage_post_output": {
"size": 97,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_post_output"
},
"stage_post_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_post_error"
}
},
"stages": {
"init": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"compilation": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"execution": {
"status": {
"code": 15,
"name": "ok"
},
"time": 7.45,
"skipped": false,
"signal": 0
},
"judge": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"post": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
}
},
"uri": "https://<endpoint>/api/v1/submissions/42"
}
]
}
Create a new submission.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
project_id |
form | string | project id |
source | form | file | tar.gz archive |
scenario | form | string | project scenario to be executed |
project_config | form | string | project config to override; use the encoded JSON format |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
201 | - | success |
401 | 1 | unauthorized access |
400 | 10 | invalid request data |
400 | 1003 | creation failed |
Success Response
Field | Type | Description |
---|---|---|
message | string | message confirming that the workspace creation has been initialized |
id | integer | id of created submission |
Examples
curl -X POST --form "project_id=ef66185208" --form "source=@source.tar.gz" "https://<endpoint>/api/v1/submissions?access_token=<access_token>"
Response example
{
"message": "Submission has been created",
"id": 42
}
Retrieve information about a submission.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
id |
path | integer | submission id |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
404 | 1001 | submission not found |
Success Response
Field | Type | Description |
---|---|---|
id | integer | submission id |
executing | boolean | indicates whether submission is being executed |
date | string |
date and time of submission creation [yyyy-mm-dd hh:mm:ss TZD] note that server time is used |
project.id | string | project id |
project.name | string | project name |
project.config | string | configuration of the project in JSON format |
result.status.code | integer |
status code see section: submission status |
result.status.name | string | status name |
result.time | float | execution time [seconds] |
result.memory | integer | memory consumed by the program [kilobytes] |
result.signal | integer | signal raised by the program |
result.score | float | obtained score |
streams.source.size | integer | source code length [bytes] |
streams.source.uri | string | link to the file with source code |
streams.auxdata.size | integer | size of auxiliary data data [bytes] |
streams.auxdata.uri | string | link to the file with auxiliary data generated by the submission |
streams.debug_log.size | integer | size of debug log data [bytes] |
streams.debug_log.uri | string | link to the file with debug log generated by the submission |
streams.stage_init_output.size | integer | size of the init stage's output [bytes] |
streams.stage_init_output.uri | string | link to the file with the init stage's output |
streams.stage_init_error.size | integer | size of the init stage's error [bytes] |
streams.stage_init_error.uri | string | link to the file with the init stage's error |
streams.stage_compilation_output.size | integer | size of the compilation stage's output [bytes] |
streams.stage_compilation_output.uri | string | link to the file with the compilation stage's output |
streams.stage_compilation_error.size | integer | size of the compilation stage's error [bytes] |
streams.stage_compilation_error.uri | string | link to the file with the compilation stage's error |
streams.stage_execution_output.size | integer | size of the execution stage's output [bytes] |
streams.stage_execution_output.uri | string | link to the file with the execution stage's output |
streams.stage_execution_error.size | integer | size of the execution stage's error [bytes] |
streams.stage_execution_error.uri | string | link to the file with the execution stage's error |
streams.stage_judge_output.size | integer | size of the judge stage's output [bytes] |
streams.stage_judge_output.uri | string | link to the file with the judge stage's output |
streams.stage_judge_error.size | integer | size of the judge stage's error [bytes] |
streams.stage_judge_error.uri | string | link to the file with the judge stage's error |
streams.stage_post_output.size | integer | size of the post stage's output [bytes] |
streams.stage_post_output.uri | string | link to the file with the post stage's output |
streams.stage_post_error.size | integer | size of the post stage's error [bytes] |
streams.stage_post_error.uri | string | link to the file with the post stage's error |
stages.init.status.code | integer |
status code see section: submission status |
stages.init.status.name | string | status name |
stages.init.time | float | stage execution time [seconds] |
stages.init.skipped | boolean | whether the stage has been skipped |
stages.init.signal | integer | stage termination exit code |
stages.compilation.status.code | integer |
status code see section: submission status |
stages.compilation.status.name | string | status name |
stages.compilation.time | float | stage execution time [seconds] |
stages.compilation.skipped | boolean | whether the stage has been skipped |
stages.compilation.signal | integer | stage termination exit code |
stages.execution.status.code | integer |
status code see section: submission status |
stages.execution.status.name | string | status name |
stages.execution.time | float | stage execution time [seconds] |
stages.execution.skipped | boolean | whether the stage has been skipped |
stages.execution.signal | integer | stage termination exit code |
stages.judge.status.code | integer |
status code see section: submission status |
stages.judge.status.name | string | status name |
stages.judge.time | float | stage execution time [seconds] |
stages.judge.skipped | boolean | whether the stage has been skipped |
stages.judge.signal | integer | stage termination exit code |
stages.post.status.code | integer |
status code see section: submission status |
stages.post.status.name | string | status name |
stages.post.time | float | stage execution time [seconds] |
stages.post.skipped | boolean | whether the stage has been skipped |
stages.post.signal | integer | stage termination exit code |
Examples
curl -X GET 'https://<endpoint>/api/v1/submissions/<id>?access_token=<access_token>'
Response example
{
"id": 1,
"executing": false,
"date": "2021-01-01 14:21:57 +0000",
"project": {
"id": "ef66185208fd4cce9026c5f1a4486c72",
"name": "EXAMPLE"
},
"result": {
"status": {
"code": 15,
"name": "ok"
},
"score": 0,
"time": 4.2,
"memory": 239421,
"signal": 0
},
"streams": {
"source": {
"size": 88,
"uri": "https://<endpoint>/api/v1/submissions/1/source"
},
"auxdata": {
"size": 105,
"uri": "https://<endpoint>/api/v1/submissions/1/auxdata"
},
"debug_log": {
"size": 142,
"uri": "https://<endpoint>/api/v1/submissions/1/debug_log"
},
"stage_init_output": {
"size": 97,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_init_output"
},
"stage_init_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_init_error"
},
"stage_compilation_output": {
"size": 80,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_compilation_output"
},
"stage_compilation_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_compilation_error"
},
"stage_execution_output": {
"size": 1134,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_execution_output"
},
"stage_execution_error": {
"size": 567,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_execution_error"
},
"stage_judge_output": {
"size": 900,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_judge_output"
},
"stage_judge_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_judge_error"
},
"stage_post_output": {
"size": 97,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_post_output"
},
"stage_post_error": {
"size": 0,
"uri": "https://<endpoint>/api/v1/submissions/1/stage_post_error"
}
},
"stages": {
"init": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"compilation": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"execution": {
"status": {
"code": 15,
"name": "ok"
},
"time": 4.2,
"skipped": false,
"signal": 0
},
"judge": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
},
"post": {
"status": {
"code": 15,
"name": "ok"
},
"time": 0,
"skipped": false,
"signal": 0
}
}
}
Retrieve raw submission stream data.
Request parameters
Name | Located in | Type | Description |
---|---|---|---|
access_token |
query | string | access token |
id |
path | integer | submission id |
stream |
path | string |
stream name enum: source, auxdata, debug_log, stage_init_output, stage_init_error, stage_compilation_output, stage_compilation_error, stage_execution_output, stage_execution_error, stage_judge_output, stage_judge_error, stage_post_output, stage_post_error |
Response HTTP Code
HTTP Code | Error Code | Description |
---|---|---|
200 | - | success |
401 | 1 | unauthorized access |
404 | 1001 | submission not found |
404 | 1101 | stream not found |
Examples
curl -X GET 'https://<endpoint>/api/v1/submissions/<id>/output?access_token=<access_token>'
Response example
Raw data from selected stream.