forked from nemuTUI/nemu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
remote_api.txt
62 lines (53 loc) · 1.94 KB
/
remote_api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
API for remote control.
Current version: 0.2
Get API version (no auth required).
APIv: >= 0.1
request: { "exec": "api_version" }
reply: { "return": "_version_" }
Get nEMU version.
APIv: >= 0.1
request: { "exec": "nemu_version", "auth": "_pass_" };
reply: { "return": "_version_" } or { "return": "err", "error": "_error_" }
Check authentication.
APIv: >= 0.1
request: { "exec": "auth", "auth": "_pass_" };
reply: { "return": "ok" } or { "return": "err", "error": "_error_" }
Get VM list.
APIv: >= 0.1
request: { "exec": "vm_list", "auth": "_pass_" }
reply: { "return": [ { "name": "_name_", "status": _status_ } ] }
typeof: name: string, status: bool (true: running, false: stopped)
Start VM.
APIv: >= 0.1
request: { "exec": "vm_start", "name": "_name_", "auth": "_pass_"}
reply: { "return": "ok" } or { "return": "err", "error": "_error_"}
Stop VM.
APIv: >= 0.1
request: { "exec": "vm_stop", "name": "_name_", "auth": "_pass_" }
reply: { "return": "ok" } or { "return": "err", "error": "_error_" }
Force stop VM.
APIv: >= 0.1
request: { "exec": "vm_force_stop", "name": "_name_", "auth": "_pass_" }
reply: { "return": "ok" } or { "return": "err", "error": "_error_" }
Get VNC/SPICE port.
APIv: >= 0.1
request: { "exec": "vm_get_connect_port", "name": "_name_", "auth": "_pass_" }
reply: { "return": "_port_" } or { "return": "err", "error": "_error_" }
Get VM settings.
APIv: >= 0.2
request: { "exec": "vm_get_settings", "name": "_name_", "auth": "_pass_" }
reply: { "param": { "value": "_value_", "value_list": [ "_list_" ] } }
or { "return": "err", "error": "_error_" }
param list:
smp - CPU count, format: sockets:cores?:threads?
typeof: value: string
mem - the amount of RAM
typeof: value: integer
kvm - KVM status
typeof: value: bool
hcpu - host CPU status
typeof: value: bool
netifs - network interface count
typeof: value: integer
disk_iface - disk interface driver
typeof: value: string, value_list: array of string