The API is deprecated. Please, contact me directly by E-mail [email protected] if you are interesting in API.
This document describes Cloud Compiler API.
POST https://_deprecated_/tasks
- Authorization header is required, contains a client API key.
- Content-Type header is required, should equal to "multipart/form-data".
The body should be a form-data (detect multipart).
language- A language name. See the table below for supported languages. Required.version- A language version tag. See the table below for supported languages version tags. Required.platform- A platform name. See the table below for supported platforms. Required.project- Project files within a ZIP archive. Required.pre-exec-command- The command that will be executed after unzipping the project and before the execution. You can compile code here or prepare the environment. Optional.exec-command- The command to run the program. It can contain input arguments. Required.
The JSON object will be returned on success:
{
"id": "29e986f3-b2d0-4929-8e5c-e62311f89e60"
}401- API Key missed or invalid.400- One of the following:TOO_MANY_CONCURRENT_TASKS- Limit of simultaneously running tasks reached.TOO_MANY_TASKS- Limit of tasks per month reached.
, where id - task id.
Once Task id obtained from the API, you can connect to Websocket real-time API and bind input and output channels to
a user interface (like a console). Right after Websocket will be connected and the connection will be initiated
pre-exec-command (is any) and exec-command commands will be executed automatically on the API side.
Websocket endpoint to connect: https://api-v2.cloud-compiler.com
The Websocket connection itself, should be established from a client side (no API keys will be needed at this point).
initiate- Client must initiate a connection right after connect is established.taskIdshould be provided in this event.kill- Once API receiveskilleventpre-exec-commandorexec-command(depends on what's currently running) will be killed and the task will be terminated.stdin- Once API receivesstdinit forward it to a process with runningexec-command-finishedcommand.
pre-exec-command-started- The event fired oncepre-exec-commandcommand has started on API side. The command itself will be available in adataevent property.pre-exec-command-finished- The event fired oncepre-exec-commandcommend has finished on API side. The event will containexitCodeandkilledproperties.exec-command-started- The event fired onceexec-commandcommand has started on API side. The command itself will be available in adataevent property.exec-command-finished- The event fired onceexec-commandcommend has finished on API side. The event will containexitCodeandkilledproperties.stdout- The event fired onstdoutevent frompre-exec-commandorexec-command. The output string will be available in adataevent property.stderr- The event fired onstderrevent frompre-exec-commandorexec-command. The output string will be available in adataevent property.
| Language | Version Tag |
|---|---|
| C | gcc-9.2.0, gcc-8.3.0, gcc-7.4.0 |
| C++ | gcc-9.2.0, gcc-8.3.0, gcc-7.4.0 |
| JavaScript (Node.js) | 12.10.0, 10.16.3, 8.16.1 |
| Java | openjdk-14, openjdk-13, openjdk-12 |
| PHP | 7.4, 7.3, 7.2 |
| Python | 3.8, 3.7, 3.6, 2.7.13 |
| Ruby | 2.7, 2.6, 2.5 |
| Swift | 5.0, 4.2, 4.1 |
| Go | 1.13, 1.12 |
| Kotlin | 1.3, 1.2, 1.1 |
| Platform |
|---|
| Linux |
| Windows |
| MacOS |