HTTP REST API
Seraph membuka HTTP server lokal di port 8090 (bisa diatur di
settings) yang menjalankan Tauri command. Setiap command bisa
dipanggil lewat dua cara:
POST /invoke— JSON mentah{cmd, args}. Format yang sama dipakai webview Tauri internal. Lihat Raw dispatch.- REST sugar routes — URL yang readable seperti
POST /api/bots/{id}/warp. Mereka bikinInvokeBodylalu forward ke dispatcher yang sama; auth + business logic identik.
Quick links
- Authentication — tukar PIN lokal jadi bearer token
- Raw dispatch —
/invokedan/x - Scripts — manage SeraphRuntime Lua scripts
- Jobs — list + bulk-stop running scripts lintas bot
- Bots — connect, warp, walk, snapshot per-bot state
- Events stream — Server-Sent Events live mirror
- Errors — status code + bentuk error envelope
Source-of-truth
Semua REST sugar route adalah shell tipis di atas dispatch() di
src-tauri/src/api_dispatch.rs.
File itu adalah daftar lengkap canonical setiap command: shape
argumen, return type, dan Tauri command mana yang dipanggil. Kalau
suatu route belum ada di sini, selalu bisa dijangkau via
POST /invoke dengan nama cmd yang cocok.