Documentation

Everything you need to integrate Monaco into your institution's assessment workflow.

API Reference

Complete REST API and WebSocket reference for integrating with Monaco.

Base URL
https://api.ishikabhoyar.tech

REST Endpoints

POST/api/submit

Submit 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/:id

Connect to the WebSocket endpoint using the execution ID returned from /api/submit.

Server → Clientoutput

Code execution output

{"type": "output", "content": {"text": "Hello!", "isError": false}}
Server → Clientstatus

Execution status update

{"type": "status", "content": "completed"}
Server → Clienterror

Error message

{"type": "error", "content": "Execution timeout"}
Client → Serverinput

Send user input to program

{"type": "input", "content": "user input here"}

Error Codes

CodeDescription
400Bad Request - Invalid input (missing code/language)
404Not Found - Submission ID not found
500Internal Server Error - Server-side error