API Reference
Complete REST API and WebSocket reference for integrating with Monaco.
Base URL
https://api.ishikabhoyar.techREST Endpoints
POST
/api/submitSubmit code for execution
Request Body
json
{
"language": "python",
"code": "print('Hello, World!')",
"input": "" // Optional stdin input
}Response
json
{
"id": "6423259c-ee14-c5aa-1c90-d5e989f92aa1",
"status": "queued",
"message": "Code submission accepted and queued for execution"
}WebSocket API
WebSocket Endpoint
wss://api.ishikabhoyar.tech/api/ws/terminal/:idConnect to the WebSocket endpoint using the execution ID returned from /api/submit.
Server → Client
outputCode execution output
{"type": "output", "content": {"text": "Hello!", "isError": false}}Server → Client
statusExecution status update
{"type": "status", "content": "completed"}Server → Client
errorError message
{"type": "error", "content": "Execution timeout"}Client → Server
inputSend user input to program
{"type": "input", "content": "user input here"}Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid input (missing code/language) |
| 404 | Not Found - Submission ID not found |
| 500 | Internal Server Error - Server-side error |