summaryrefslogtreecommitdiffstats
path: root/remote_api.txt
blob: 3c8a3489d5562660c0d264ce788bc895adffbfa2 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
API for remote control.
Current version: 0.3

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

Set VM settings.
APIv: >= 0.3
request: { "exec": "vm_set_settings", "name": "_name_", "auth": "_pass_", "param": "_value_" }
reply:   { "return": "ok" } or { "return": "err", "error": "_error_" }
param list:
  smp - CPU count, format: sockets:cores?:threads?
    typeof: string
  mem - the amount of RAM
    typeof: integer
  kvm - KVM status
    typeof: bool
  hcpu - host CPU status
    typeof: bool
  netifs - network interface count
    typeof: integer
  disk_iface - disk interface driver
    typeof: string