Raw dispatch
Kalau REST sugar route belum ada buat command yang kamu butuh, pake raw dispatcher. Setiap nama Tauri command bisa diakses lewat sini.
| Method | Path | Auth | Body |
|---|---|---|---|
POST | /invoke | bearer | {cmd, args} |
POST | /x | bearer | varian terenkripsi untuk command sensitif |
Daftar lengkap nama cmd + shape args-nya ada di
src-tauri/src/api_dispatch.rs.
Contoh
curl -s -X POST http://localhost:8090/invoke \
-H 'authorization: Bearer <token>' \
-H 'content-type: application/json' \
-d '{"cmd":"list_bots","args":null}'
Kapan pake /x
/x terima body yang sama tapi di-wrap pake encrypted envelope.
Klien internal pake ini buat command yang carry credential
(add_bot dengan password, account_creator_set_config).
Integrasi external bisa lewat /invoke aja — semua command terima
keduanya.