Skip to content

API Reference

DevAll exposes REST endpoints and WebSocket communication for service control.

Base URL: http://localhost:7777/api

Get all services and their status.

Terminal window
curl http://localhost:7777/api/services

Response:

{
"services": [
{
"id": "api",
"name": "API Server",
"status": "running",
"port": 3000,
"pid": 12345
}
]
}

Start a service.

Terminal window
curl -X POST http://localhost:7777/api/services/api/start

Stop a service.

Terminal window
curl -X POST http://localhost:7777/api/services/api/stop

Restart a service.

Terminal window
curl -X POST http://localhost:7777/api/services/api/restart

Clear service logs.

Terminal window
curl -X DELETE http://localhost:7777/api/services/api/logs

Get current configuration.

Terminal window
curl http://localhost:7777/api/config

Update service configuration.

Terminal window
curl -X PUT http://localhost:7777/api/services/api \
-H "Content-Type: application/json" \
-d '{"port": 3001, "autostart": true}'

Health check endpoint.

Terminal window
curl http://localhost:7777/api/health

Response:

{
"status": "ok",
"uptime": 3600,
"services": 5
}

Get system resource usage.

Terminal window
curl http://localhost:7777/api/resources

Response:

{
"cpu": {
"usage": 45.2,
"cores": 8
},
"memory": {
"used": 4294967296,
"total": 17179869184,
"percentage": 25
}
}

Connect to: ws://localhost:7777/ws

Send input to terminal services:

{
"type": "terminal-input",
"serviceId": "terminal-1",
"data": "ls -la\n"
}

Execute commands:

{
"type": "command",
"action": "start",
"serviceId": "api"
}

Sent immediately after connection:

{
"type": "init",
"services": [...],
"logs": {...}
}

Service status changes:

{
"type": "status",
"serviceId": "api",
"status": "running",
"pid": 12345
}

Service output:

{
"type": "log",
"serviceId": "api",
"level": "info",
"message": "Server started on port 3000",
"timestamp": "2024-01-20T10:30:00Z"
}

System metrics:

{
"type": "resource-update",
"cpu": 45.2,
"memory": 4294967296,
"services": {
"api": {
"cpu": 12.5,
"memory": 536870912
}
}
}

Config changes:

{
"type": "config-update",
"serviceId": "api",
"config": {
"port": 3001,
"autostart": true
}
}
CodeDescription
200Success
400Bad request
404Service not found
409Service already running
500Internal server error
  • No rate limiting on REST endpoints
  • WebSocket messages are throttled to 100/second per client
  • Log batching occurs at 16ms intervals

Currently no authentication required. DevAll is designed for local development only.

Security Note: Do not expose DevAll ports to the internet. Use tunneling services (ngrok) for secure external access.

// WebSocket connection
const ws = new WebSocket('ws://localhost:7777/ws');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Received:', data);
};
// REST API
fetch('http://localhost:7777/api/services')
.then(res => res.json())
.then(data => console.log(data));
import websocket
import requests
# REST API
response = requests.get('http://localhost:7777/api/services')
print(response.json())
# WebSocket
def on_message(ws, message):
print(f"Received: {message}")
ws = websocket.WebSocketApp("ws://localhost:7777/ws",
on_message=on_message)
ws.run_forever()
Terminal window
# Using curl
curl http://localhost:7777/api/services | jq
# Using websocat for WebSocket
websocat ws://localhost:7777/ws