UMIX/86 - the web API

JSON over HTTP, served by API.SYS at 0x9000. Base http://HOST:8080. Replies carry X-API-Version: 13 and an exact Content-Length; every connection closes.

GET endpoints

/apicatalogue/api/systemos, cpu, tasks, uptime
/api/taskstask count/api/psslot/name/app/term/user/seg
/api/memoryRAM/api/whologged-in sessions
/api/whoamithis session/api/usersaccount names
/api/speedbaud, tick_hz/api/timehh/mm/ss
/api/versionos/kernel/api/api/statusfeature bits
/api/appsjob applications/api/routesBASIC routes

Jobs

POST /api/jobs {"app":"prime","params":{"limit":1000}}
  -> 202 {"job_id":1,...}
GET  /api/jobs            list
GET  /api/jobs/1          detail (status, result)
GET  /api/jobs/1/result   result only
DELETE /api/jobs/1        cancel

BASIC routes

API ROUTE /api/demo APIHELLO.BAS
curl -s http://HOST:8080/api/demo

Route programs get P$, Q$, M$ and B$; their PRINT output is the response. A busy BASIC session yields 503; a runaway route times out with 500.

Chat

/api/chat, /api/chat/join, /api/chat/send, /api/chat/messages[/N] and DELETE /api/chat/join/<token>. See the chat page.

Limits

One request per connection and web sessions are serialized; request bodies cap at 767 bytes; static files at 4000 bytes. Chat answers 503 when the console ran CHAT OFF or when SLIP/TCP is on. The API is unauthenticated: keep port 8080 on a trusted network.