Adds a execution task to the queue, it returns immediatly with a task ID that then can be polled to receive the result. Alternativly POST /execute (config option bypass_task_queue must be set true) accepts the same request data but executes and returns the result directly.
| Name |
Type |
Description |
backend |
string |
The backend to execute this with. |
options |
hash |
Backend-specific options. |
files |
hash |
Input files are created in a temporary location. |
compile |
hash |
Settings for the compilation stage. |
run |
hash |
Settings for the execution stage. |
| Name |
|
Type |
Description |
<filename> |
|
string |
Filename (including directories) this is referring to. |
| `data` | string | Contents in plaintext.
| Name |
Type |
Description |
env |
hash |
Environment variables to set. |
argv |
array |
Command and arguments. |
| Name |
Type |
Description |
env |
hash |
Environment variables to set. |
argv |
array |
Command and arguments. |
{
"backend": "gcc",
"options": {},
"files": {
"main.c": {
"data": "#include<stdio.h>\nint main() {\n printf("test\\n");\n return 0;\n}\n"
}
},
"compile": {
"argv": ["gcc", "-O3", "main.c"]
},
"run": {
"argv": ["./a.out"]
}
}
For the response object see GET /task/{Id}
Queries task information should be polled to receive the execution response.
| Name |
Type |
Description |
| id |
string |
Identifies this task. |
| createdAt |
date |
When the task was created. |
| startedAt |
date |
When the task started executing. |
| finishedAt |
date |
When the task finished. |
| terminated |
bool |
If the task is terminated. |
| response |
object |
Execution result object. |
| Name |
|
Type |
Description |
compile |
code |
int |
Return code. |
| `stderr` | string | STDERR pipe output.
| `stdout` | string | STDOUT pipe output.
run | code | int | Return code.
| stderr | string | STDERR pipe output.
| stdout | string | STDOUT pipe output.
Returns a list of all available backends with name and description.
| Name |
|
Type |
Description |
backends |
name |
string |
|
| `description` | string |